Author: Wycliffe Ndiba
This project is a web application that allows users to browse fantasy novels and sort them how they want. The user can also add novels to their cart and checkout. The application is built using the sinatra framework and uses a rakefile to manage the database.
Ruby
Sinatra
Active Record
React
Javascript
CSS
To install this application, clone the backend and frontend repositories.
-
Clone the backend repository from here
-
Run
bundle install
to install the required gems. -
Run
bundle exec rake db:migrate
to create the database. -
Run
bundle exec rake db:seed
to seed the database. -
Finally run
bundle exec rake server
to run the backend.
-
Clone the frontend repository from here
-
Run
npm install
to install the required packages. -
Run
npm start
.
Key:
One to Many 1 ----< ∞
Many to Many ∞ ----< ∞
Readers --------------< Reviews >----------- Books >-------------- Author
:reader_name :reader_id :author_id :series_title
:email :book_id :title :author_name
:birthday :title :genre :series
:phone_no :content :publication_date
has_many :reviews
has_many :books, through: :reviews
belongs_to :reader
belongs_to :book
has_many :reviews
has_many :readers, through: :reviews
belongs_to :author
has_many :books
The backend is currently complete. It has all the required routes and controllers. The database is seeded with data.
Any other informational data will be added to this section as the project progresses.
The frontend is coming along but is not complete. The application can currently do the following:
- Displays all the book details from the Backend database.
- Displays all the author details from the Backend database.
- Displays all the review details from the Backend database.
Functionality to be added:
- Functionality to add, edit and delete books, authors and reviews.
- Styling to make the application look better.
- Added Firebase authentication but rolled it back because it was not working properly and wasted my time.
- Added a search bar but it broke my application so I rolled it back.
Note: These features will be added back in the future. This might be a good project to present as a portfolio piece so I want to make it look good.
The MIT Licence (MIT)