It's a web app that is used to help registered users or guests to view the different products on the platform, add it into their carts and checkout by using the payment gateway for their orders made according to their shopping cart.
- Runtime Environment: Node.js
- Data Tier Aka "Model": MongoDB, Mongoose
- Application Tier Aka "Control": Express.js
- Presentation Tier Aka "View": React.js
- Documentation & API-Documentation: JSDoc, and Swagger
- Containerization: Docker, Docker-Compose
containers/
: used to hold docker-compose configurations for different environments (e.g., Development, Test, and Production)env/
: used to hold the environment variables for the different environmentsscripts/
: used to hold bash scripts to automate different operationsserver/
: used to hold the server side business logic, models, test, etc.
- User Authentication
- Product Management
- Shopping Cart
- Checkout
- Frontend UI
- Clone the repository:
https://github.com/AAEmara/E-commerce-Shopping-Cart.git
cd E-commerce-Shopping-Cart
- Set up environment variables:
ls env # shows the different directories for services that contains the .env
vim env/server/.env.dev
NODE_ENV=development
PORT=5000
MONGO_URI=your_mongodb_connection_string
ACCESS_TOKEN_EXP_MS=your_access_token_expiration_period_in_milliseconds
ACCESS_TOKEN_SECRET=your_access_token_secret
REFRESH_TOKEN_EXP_MS=your_refresh_token_expiration_period_in_milliseconds
REFRESH_TOKEN_SECRET=your_refresh_token_secret
SESSION_SECRET=your_express_session_secret
EMAIL_USER=your_application_email
EMAIL_PASS=your_application_email_password
- Build Docker Image:
./scripts/docker-compose/dev/build # at the root of the project
- Backend API: localhost:5000/api-docs
- Frontend API: localhost:5001/