Skip to content

This is a Content Management System for a nursery to keep the daily information about their students. Student Data Bank was built with Sinatra, extended with Rake for working with an SQL database using ActiveRecord ORM.

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
app
 
 
 
 
db
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

student_data_bank

This is a Content Management System for a nursery to keep the daily information about their students. This daily information will be referred to as activities.

The app provides a database and web interface for users to:

  • Sign up, log in or log out securely as a nursery staff or parent.
  • Nursery staff can create, read, update, and delete (CRUD) an activity.
  • Parents can read only the personal profile page of their children.
  • User inputs are validated for account creation.

Student Data Bank was built with Sinatra, extended with Rake for working with an SQL database using ActiveRecord ORM.

Link to my blog post.

Getting Started

Prerequisites

Gems you need to install the software:

  • bundler
$ sudo gem install bundler

Installation

To install this app onto your local machine:

  • Clone this repository with HTTPS
  • Open your terminal and change to the local directory where you want to clone your repository and run:
$ git clone + the link copied before.

After checking out the repository, run the following code and automatically a file will be created or updated in your directory: Gemfile.lock with all the gems installed.

$ bundle install

And finally run:

$ rake db:migrate

Usage

You can start one of Rack's supported servers using the shotgun command.

$ shotgun

Model Classes

Student Data Bank database includes three model classes: User, Activity and Student.

  1. User: stores user attributes, including:
  • Username
  • Email
  • Password (Secured with Bcrypt hashing algorithm)
  • Nursery_staff, a boolean value to indicate if a user is a nursery staff
  1. Activity: stores activity attributes, including:
  • Date
  • User_id, to associate Activity to User
  • Student_id, to associate Activity to Student
  • Breakfast
  • Morning Snacks
  • Lunch
  • Afternoon Snacks
  • Sleep
  • Nappies
  • Comments
  1. Student: stores student attributes, including:
  • Name
  • User_id, to associate Student to User
  • Key person
  • Room

Model Associations

User has many students and has many activities. Student has many activities and belongs to a User (parent). Activity belongs to a Student and belongs to User.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/DianaBaRo/student_data_bank. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

Author

License

The gem is available as open source under the terms of the MIT License.

About

This is a Content Management System for a nursery to keep the daily information about their students. Student Data Bank was built with Sinatra, extended with Rake for working with an SQL database using ActiveRecord ORM.

Resources

License

Releases

No releases published

Packages

No packages published