A full-stack web application for browsing, listing, and managing a variety of food items.
Built with React (Frontend), Express.js (Backend), and MongoDB.
π Exciting News!
π This project is now officially part of GirlScript Summer of Code β GSSoCβ25! π»
Weβre thrilled to welcome contributors from across India and beyond to collaborate, build, and grow Foodie!
GSSoC is one of Indiaβs largest open-source programs, empowering developers of all levels to contribute to real-world projects and grow together.
π With mentorship, community support, and collaborative coding, itβs the perfect platform to:
- β¨ Improve your development skills
- π€ Contribute to impactful projects
- π Get recognized for your work
- π Receive certificates and cool swag
π Welcome, GSSoCβ25 Contributors! Letβs build, learn, and grow β one commit at a time.
π New to Foodie? Start Here:
π LEARN.md β Architecture, setup, and contribution guide.
β‘ Ready to dive in?
Jump to Getting Started for quick setup instructions.
- π§ Tech Stack
- π Getting Started
- π Project Structure
- π³ Docker Commands
- π§ͺ Linting
- π§° Scripts
- π Notes
- π§© Common Issues & Fixes
- π€ Contributing
- π License
- π References
- React 18.3 β User interface
- Vite β Lightning-fast build tool
- React Router DOM β Client-side routing
- ESLint β Code style enforcement
- Node.js + Express β REST API server
- CORS + JSON Middleware β Cross-origin handling
- Multer β File upload management
- Modular Routing β Organized API structure
- MongoDB β NoSQL database for scalable storage
- Docker β Containerization
- Docker Compose β Multi-service orchestration
Ensure you have the following installed:
For Docker Setup (Recommended):
- Docker Desktop
- Docker Compose
For Manual Setup:
- Node.js (v16 or above)
- npm or yarn
- MongoDB (local or cloud)
One-command setup for the entire application:
# Clone the repository
git clone https://github.com/your-username/foodie.git
cd foodie
npm install
# Start all services with Docker
docker-compose up --buildAccess the application:
- π Frontend: http://localhost:3000
- π οΈ Admin Panel: http://localhost:5173
- π Backend API: http://localhost:4000
- ποΈ MongoDB: localhost:27017
Docker Services:
- foodie-frontend: React app (Port 3000)
- foodie-admin: Admin panel (Port 5173)
- foodie-backend: Express API (Port 4000)
- foodie-mongodb: MongoDB database (Port 27017)
# Clone the repository
git clone https://github.com/your-username/foodie.git
cd foodie
# Install dependencies for all services
cd frontend && npm install && cd ..
cd backend && npm install && cd ..
cd admin && npm install && cd ..# Start all services
docker-compose up
# Start in detached mode
docker-compose up -d
# View logs for specific service
docker-compose logs frontend
docker-compose logs backend
docker-compose logs adminStart Frontend:
cd frontend
npm run devStart Admin Panel:
cd admin
npm run devStart Backend:
cd backend
npm run serverServer runs on http://localhost:4000
Start MongoDB:
# Make sure MongoDB is running locally
mongodFoodie/ # Root folder of the project
βββ .github/ # GitHub related configurations (actions, issue templates)
β βββ ISSUE_TEMPLATE/ # Templates for issues
β βββ workflows/ # GitHub Actions workflows
βββ .vite/ # Vite internal dependencies
β βββ deps/ # Vite dependency files
βββ admin/ # Admin panel related code
βββ backend/ # Backend server code
βββ frontend/ # Frontend client code
βββ images/ # Project images
βββ .dockerignore # Files/folders to ignore in Docker
βββ .gitignore # Files/folders to ignore in Git
βββ AUTHENTICATION_SETUP.md # Guide/setup for authentication
βββ CODE_OF_CONDUCT.md # Code of conduct for contributors
βββ CONTRIBUTING.md # Guidelines for contributing to the project
βββ LEARN.md # Learning resources/documentation
βββ LICENSE # License file
βββ README.md # Project readme
βββ SECURITY.md # Security guidelines
βββ docker-compose.yml # Docker Compose configuration
βββ package-lock.json # NPM package lock file
βββ package.json # NPM package configuration
βββ vercel.json # Vercel deployment configuration
# Build and start all services
docker-compose up --build
# Start services in background
docker-compose up -d
# Stop all services
docker-compose down
# Stop and remove volumes (β οΈ deletes database data)
docker-compose down -v
# Restart specific service
docker-compose restart backend
# View running containers
docker-compose ps# View logs for all services
docker-compose logs
# View logs for specific service
docker-compose logs -f frontend
# Execute commands in running container
docker-compose exec backend npm install new-package
# Rebuild specific service
docker-compose build backend# Access MongoDB shell
docker-compose exec mongodb mongosh
# Backup database
docker-compose exec mongodb mongodump --out /backup
# View MongoDB logs
docker-compose logs mongodbESLint is pre-configured with React and Hooks rules for frontend and admin.
# Frontend linting
cd frontend && npm run lint
# Admin linting
cd admin && npm run lint| Command | Description |
|---|---|
npm run dev |
Start Vite development server |
npm run build |
Build for production |
npm run preview |
Preview production build |
npm run lint |
Run ESLint checks |
| Command | Description |
|---|---|
npm start |
Start production server |
npm run server |
Start development server with nodemon |
- Make sure MongoDB is running locally or update
connectDB()inconfig/db.jsaccordingly. - You can update the backend routes via
routes/foodRoute.js.
The application uses the following environment variables:
Backend:
MONGODB_URI: MongoDB connection stringJWT_SECRET: Secret key for JWT tokensPORT: Server port (default: 4000)
Frontend:
REACT_APP_API_URL: Backend API URL
Admin:
VITE_API_URL: Backend API URL for Vite
- Docker: MongoDB runs automatically with authentication
- Username:
admin - Password:
password123 - Database:
foodie
- Username:
- Manual: Update
connectDB()inbackend/config/db.js
- Backend handles file uploads via Multer
- Files are stored in
backend/uploads/directory - Docker setup includes volume mounting for persistence
We welcome contributions to the Foodie project! If you find this project helpful, consider starring the repo or opening an issue.
- π Help improve documentation
- π For more info, go to CONTRIBUTING.md
- Fork the repository
- Create a feature branch
- Use Docker for consistent development environment
- Test your changes with
docker-compose up --build - Submit a pull request
A heartfelt thank you to all the contributors who have dedicated their time and effort to make this project a success.
Your contributionsβwhether itβs code, design, testing, or documentationβare truly appreciated! π
See full list of contribution from contributor Contributor Graph
This project is licensed under the MIT License
If you have any questions, feedback, or want to collaborate, feel free to reach out to the project maintainer:
Maintainer: Abhishek Farshwal GitHub: Foodie

