The LeafLine Book Store is an online platform that aims to provide a user-friendly and efficient way for customers to explore, purchase, and manage books.
Live Demo: Link
LeafLine API Docs: Link
Software Requirements Specification for LeafLine: Link
Jump to What's new?
- Backend: Node.js, Express.js
- Frontend: Tailwind CSS, React, RTK Query
- Database: MongoDB, Redis
- Payment Gateway Integration: Stripe
- Software Design: Clean Architecture
- Authentication: JSON Web Tokens (JWT)
- Devops: Github Actions, Docker
- Tests: Jest, Supertest
- Version Control: Git
- Tools: Swagger (API Documentation), VS Code, Postman, Notion
Follow these steps to set up and run the Node.js application locally on your machine.
- Node.js installed on your machine.
-
Clone the Repository:
git clone <repository-url> cd <repository-folder>
-
Install Dependencies:
npm install
- Environment Variables:
- Create a
.env
file in the root directory of the project. - Define the necessary environment variables in the
.env
file. For example:NODE_ENV= MONGO_URL = JWT_SECRET = EMAIL = PASSWORD = FRONTEND_URL = http://localhost:5173 # localhost:5173 does not work on production STRIPE_API_KEY=
- Create a
-
Development Mode:
npm run dev
This will start the server in development mode using nodemon, which will automatically restart the server when changes are detected.
-
Production Mode:
npm start
This will start the server in production mode.
By default, the application will be accessible at http://localhost:3000
. You can change the port number in the .env
file if needed.
Explain how to run tests, if applicable.
npm test