A Vite-based React project with admin, client, and server sections.
MyOnlineMeals is a web application built using Vite for fast development and React for the front-end. It includes three major sections:
- Admin Panel: For managing meals, users, and orders.
- Client Panel: For users to browse meals, place orders, and make payments.
- Server: The backend API built with Node.js to handle server-side logic, including authentication, meals, orders, and payment processing through Stripe.
-
Admin Panel:
- Manage meals, orders, and users.
- Configure payment settings with Stripe.
-
Client Panel:
- Browse available meals, add them to the cart, and place orders.
- Integrated with Stripe for secure payment processing.
-
Server (Backend):
- Built using Node.js and Express to handle authentication, meal data, orders, and Stripe payments.
- Uses MongoDB for storing data.
Make sure you have the following installed:
-
Clone the repository:
git clone https://github.com/grep-many/myonlinemeals.git
-
Navigate to the project directory:
cd myonlinemeals
-
Install dependencies for all sections:
-
Admin Panel:
cd admin npm install
-
Client Panel:
cd client npm install
-
Server:
cd server npm install
-
-
Set up environment variables for all three sections:
-
Admin & Client:
In both
admin/.env.local
andclient/.env.local
, add the following:VITE_SERVER_URL=<your server link>
-
Server:
In
server/.env.local
, add the following:MONGODB_URI=<your mongodb uri> JWT_SECRET=<your secret key> STRIPE_SECRET_KEY=<your stripe secret key> FRONTEND_URL=<your client running link> PORT=<Your Port>
Note: Replace
<your secret key>
and<your stripe secret key>
with your actual secret keys.
-
-
Run the development server for each section:
-
Admin Panel:
cd admin npm run dev
-
Client Panel:
cd client npm run dev
-
Server:
cd server npm run server
-
-
Open your browser and navigate to:
- Admin Panel:
http://localhost:3000/admin
- Client Panel:
http://localhost:5173/myonlinemeals
- Server:
http://localhost:4000
- Admin Panel:
-
Admin Panel:
- Allows the admin to manage meals, view orders, and configure the Stripe payment system.
-
Client Panel:
- Users can browse meals, place orders, and make payments using Stripe.
-
Payment Gateway Integration (Stripe):
- Payments are processed through Stripe in both the admin and client panels. Ensure you add your Stripe API keys in the
.env.local
file.
- Payments are processed through Stripe in both the admin and client panels. Ensure you add your Stripe API keys in the
Contributions are welcome! Here's how you can help:
- Fork the repository.
- Create a new branch (
git checkout -b feature-name
). - Commit your changes (
git commit -m "Added a new feature"
). - Push your branch (
git push origin feature-name
). - Open a Pull Request.
This project is licensed under the MIT License. See the LICENSE file for details.