This is a Ruby on Rails and VueJS-based web application for a Book Store. The project allows administrators to manage books, while users can browse and purchase books.
Users For Testing in BookStore 🧪
-
Admin (John Doe): (You can access admin page from here)
- Email: admin@example.com
- Password: 123456
-
Client (Samantha Miller):
- Email: client@example.com
- Password: 123456
(For Stripe transactions, you can use test cards available here)
- Ruby On Rails
- VueJS
- ViteRuby
- StripeJS
To set up the project, follow these steps:
-
Enviroment Configuration: Copy the
.env.example
file and rename it to.env
. Proceed to configure the Stripe integration by referring to the documentation at Stripe Keys and database configurations -
Dependency Installation: Install project dependencies by executing the following commands:
bundle install yarn install
-
Supabase Storage Setup: Set up Supabase Storage to enable image storage functionalities within the application.
-
Database Migrations: Apply database migrations using the command:
rails db:migrate
-
JavaScript Routes Generation: Generate JavaScript routes files for middleware using the following command:
rails generate js_routes:middleware --pretend
-
Project Start: Initiate the project by running the following command, which starts the Rails server and Vue.js concurrently:
foreman start -f Procfile.dev
-
Accessing the Project: The project is now accessible at http://127.0.0.1:5100. Explore and interact with the application locally.
The project includes the following models:
- Users
- Profiles
- Addresses
- Genres
- Authors
- Publishers
- Books
- BookImages
- Orders
- OrderDetails
Each model has specific relationships. Refer to the model files for detailed information.
RSpec is used for testing the project. Run tests using the rspec
command.
Authentication is handled using JSON Web Tokens (JWT).
There are two types of users:
- ADMIN: Administrators who have access to book management functionalities.
- CUSTOMER: Regular customers who can browse and purchase books.
The project is deployed on Render.com. Follow these steps for deployment:
- Render.com: Hosted on Render.com. Follow the Render.com deployment process.
Ensure proper configuration for both frontend and backend for seamless integration.
This project is licensed under the MIT License.