Welcome to Ratna Supermarket β an online shopping platform that delivers a complete and seamless e-commerce experience. From product browsing to order management, this project simulates a fully functional online store with an intuitive interface.
Ratna Supermarket is designed to provide users with a real-world shopping experience. It includes essential features such as product listings, cart management, user authentication, and order processing. Developed as part of a college project, it showcases a fully-fledged e-commerce platform using modern web development tools.
Our Objective is to create a user-friendly and responsive online shopping platform that allows customers to explore, add products to their cart, and place orders effortlessly.
π Live Demo: Ratna Supermarket
- π Product Management: Users can browse, search, and filter products by categories.
- ποΈ Cart System: Add or remove products, adjust quantities, and view the total price in the cart.
- π User Authentication: Secure login, sign-up, and logout functionalities.
- πΈ Order Management: Place and manage orders, track purchase history.
- π€ Admin Dashboard: Admin can manage products, users, and orders (admin-specific features).
- π± Responsive Design: Optimized for mobile, tablet, and desktop devices.
- Frontend: React.js, Tailwind CSS
- Backend: Node.js, Express.js
- Database: MongoDB
- Hosting: Firebase
Follow these steps to set up and run the Ratna Supermarket project on your local machine:
Ensure that the following software is installed on your system:
To set up the Ratna Supermarket project on your local machine, follow these detailed instructions for both the frontend and backend.
Don't want to setup with all of the below steps? Use Docker Compose (Note: Docker should be installed)
-
Set ENV File Use this starter env file for setting up Docker, Client and Server. It should be at root level(In another words at same level where docker-compose.yml is)
MONGO_URI=mongodb://mongodb PORT=3000 JWT_SECRET=secret MONGODBPORT=27017 MONGOEXPPORT=8081 SERVERPORT=3000 CLIENTPORT=5173
-
Run Docker Compose
docker compose up --watch
Note: --watch paramter helps docker to track changes in files if you don't use it you will not be able to see changes and would have to restart everytime/
-
Stop Docker
docker compose down
This commands stops docker containers and network and frees all the ports Docker was using.
For more info on Docker look through this Youtube Video: https://www.youtube.com/watch?v=3c-iBn73dDE
-
Fork the Repository:
Go to the Ratna Supermarket GitHub repository and click the "Fork" button in the top-right corner to create your own copy. -
Clone the Repository:
Clone your forked repository to your local machine:git clone https://github.com/yourusername/Ratna-Supermarket.git
-
Navigate to the Project Directory:
Change your directory to the cloned project folder:cd Ratna-Supermarket cd client
-
Install Frontend Dependencies:
Run the following command to install all necessary frontend dependencies:npm install
-
Start the Frontend Development Server:
Launch the frontend in development mode by running:npm run dev
-
Open the App:
Open your browser and visithttp://localhost:5173
to see the app in action.
-
Navigate to the Backend Directory:
Change your directory to the backend folder:cd ../server
-
Install Backend Dependencies:
Install the necessary backend dependencies:npm install
-
Set Up Environment Variables:
Create or edit the.env
file in the backend directory with the following variables:MONGO_URI=<your-mongodb-connection-string> DB_NAME=<your-database-name>
-
Start the Backend Server:
Launch the backend server:node server.js
Ensure you have the following installed:
- Python (version 3.x)
- Flask (for creating the web server)
- Flask-CORS (for enabling CORS)
- PyMongo (for MongoDB integration)
Start the Backend Server:
Launch the backend server:
python backend.py
Ratna-Supermarket/
βββ client/ # React frontend application
β βββ src/ # React components and files
β βββ public/ # Public static files
β βββ package.json # Frontend dependencies
β βββ vite.config.js # Vite configuration file
βββ server/ # Backend Node.js application
β βββ server.js # Main server file
β βββ .env # Environment configuration (not included in repo)
β βββ package.json # Backend dependencies
β βββ ... # Other backend files
βββ README.md # This file
βββ ...
We welcome contributions from the community! To contribute, please check out our CONTRIBUTING.md and CODE_OF_CONDUCT.md to understand the guidelines.
- Fork and clone the repository.
- Create a new branch for your feature/bug fix.
- Make your changes and test them.
- Submit a pull request for review.
For more details, refer to the CONTRIBUTING.md file.
This project is part of GirlScript Summer of Code 2024 (GSSoC) Extended, an initiative to help aspiring developers get involved in the open-source community.
This project is also part of Hacktoberfest 2024. We encourage participants to contribute and improve the project during this event. Letβs make open source accessible and fun for everyone!
We extend our heartfelt gratitude for your invaluable contribution to our project! Your efforts play a pivotal role in elevating Ratna-Supermarket to greater heights.