This project is a E-commerce Site: Explore a wide range of home interior items including tiles, furniture and artifacts for all your decorating needs.
- Built with the MERN stack, featuring Admin, Company, and Customer dashboards for comprehensive management and shopping experience, including Stripe payment integration.
- GitHub for version control, GitHub Actions for CI/CD, Docker for containerization, Vercel for frontend & Render for backend deployment, database indexing, Redis caching, and RESTful API implementation for B2B/B2C interactions.
-
Clone the repository:
git clone https://github.com/gauravbhaskar080/Velvet-WBD
-
Install dependencies:
Navigate to the project directory and run:
cd Velvet-WBD cd frontend npm install cd backend npm install
-
Set up .env:
-
Create a
.env
file in the root directory and add your MongoDB URL:MONGO_URI = 'your_mongo_db_url' CLOUDINARY_CLOUD_NAME = dx2suxgxm CLOUDINARY_API_KEY = your cloudinary_api_key CLOUDINARY_API_SECRET = your cloudinary_api_secret STRIPE_KEY = your_stripe_key CLIENT_URL = http://localhost:3000
-
-
Start the server:
In a new terminal window, navigate to the
backend
directory and run:cd backend npm start
The server will start at
http://localhost:5000
. -
Start the client:
In a new terminal window, navigate to the
frontend
directory and run:cd frontend npm start
The client will start at
http://localhost:3000
. -
Access the website:
Open a web browser and go to
http://localhost:3000
.
-
frontend/
: Contains the React frontend.public/
: Holds static files like CSS, images, and JavaScript.src/
: Contains the main source code.Components/
: React components used in the application.features\login
: Redux ToolKit for Login & Logout.Pictures/
: All the images that use in website.redux/
: Import Login from features and configureStore , to create centralized store.Screens/
: Website pages used in the application.stylesheets/
: All the style pages used in website.api.js
: In this file your deployed backend link, that deployed on render.App.js
: The main application component.index.js
: Entry point of the React application.dockerfile
: All commands for frontend deployment on docker
-
backend/
: Contains the Node.js backend.controllers/
: Controllers for handling routes and data.data/
: Sample data for initial setup.middleware/
: Custom middleware functions.models/
: Mongoose models for MongoDB.public/
: Static files.routes/
: Express.js route handlers..env
: Configuration file for environment variables.dockerfile
: All commands for backend deployment on dockerindex.js
: Entry point of the Node.js application.
-
docker-compose.yml
: Run commands for frontend dockerfile & backend dockerfile
If you'd like to contribute to this project, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes and commit them with descriptive messages.
- Push your changes to your forked repository.
- Create a pull request to the original repository.
This project is licensed under the MIT License. Feel free to use, modify, and distribute the code for your own purposes.