Skip to content

priyapathak39/Foodie

Β 
Β 

Repository files navigation

🍽️ Foodie – Full-Stack Restaurant App

A full-stack web application for browsing, listing, and managing a variety of food items. Built using React (Frontend), Express.js (Backend), and MongoDB.

screenshot of Foodie Homepage-lightmode Homepage – Light Mode

🌟GSSoc

GSSoC Logo 🌟 Exciting News...

πŸš€ This project is now an official part of GirlScript Summer of Code – GSSoC'25! πŸ’ƒπŸŽ‰πŸ’» We're thrilled to welcome contributors from all over India and beyond to collaborate, build, and grow Foodie! Let’s make learning and career development smarter – together! πŸŒŸπŸ‘¨β€πŸ’»πŸ‘©β€πŸ’»

πŸ‘©β€πŸ’» GSSoC is one of India’s largest 3-month-long open-source programs that encourages developers of all levels to contribute to real-world projects 🌍 while learning, collaborating, and growing together. 🌱

🌈 With mentorship, community support, and collaborative coding, it's the perfect platform for developers to:

  • ✨ Improve their skills
  • 🀝 Contribute to impactful projects
  • πŸ† Get recognized for their work
  • πŸ“œ Receive certificates and swag!

πŸŽ‰ I can’t wait to welcome new contributors from GSSoC 2025 to this Foodie project family! Let's build, learn, and grow together β€” one commit at a time. πŸ”₯πŸ‘¨β€πŸ’»πŸ‘©β€πŸ’»

πŸ† GSSoC 2025 Guidelines

πŸ“‹ For Participants

βœ… Do's

  • βœ… Read documentation thoroughly before contributing
  • βœ… Follow code style and project structure
  • βœ… Write descriptive commit messages
  • βœ… Test your changes before submitting PR
  • βœ… Be respectful and collaborative
  • βœ… Ask questions if you're unsure about anything

❌ Don'ts

  • ❌ Don't spam with multiple PRs for same issue
  • ❌ Don't copy code without understanding
  • ❌ Don't make unnecessary changes
  • ❌ Don't ignore code review feedback
  • ❌ Don't forget to update documentation when needed

🎯 Contribution Levels

Level Description Points Badge
πŸ₯‰ Beginner Fix typos, update docs, minor bug fixes 5-10 Beginner
πŸ₯ˆ Intermediate Add features, improve UI/UX, performance 15-25 Intermediate
πŸ₯‡ Advanced Major features, architecture improvements 30-50 Advanced

πŸš€ Quick Navigation

πŸ“š New to Foodie? Complete Developer Guide
πŸ‘‰ LEARN.md – Architecture, setup, contribution pathways, and everything you need to get started!

⚑ Want to jump right in?
Skip to Getting Started for quick setup instructions.


πŸ“‘ Table of Contents


πŸ”§ Tech Stack

πŸ–₯️ Frontend

  • React 18.3 – User interface
  • Vite – Fast build tool and dev server
  • React Router DOM – Client-side routing
  • ESLint – Linting and code style enforcement

🌐 Backend

  • Node.js + Express – REST API server
  • CORS + JSON Middleware – Cross-origin requests
  • Multer – File upload handling
  • Modular API Routing – Organized route structure

πŸ—„οΈ Database

  • MongoDB – NoSQL database for data storage

🐳 DevOps

  • Docker – Containerization for all services
  • Docker Compose – Multi-service orchestration

πŸš€ Getting Started

Prerequisites

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)

πŸ“¦ Installation

🐳 Docker Setup (Recommended)

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 --build

Access the application:

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)

πŸ“¦ Manual Installation

# 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 ..

πŸ”§ Development Setup

Docker Development

# 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 admin

Manual Development

Start Frontend:

cd frontend
npm run dev

Start Admin Panel:

cd admin
npm run dev

Start Backend:

cd backend
npm run server

Server runs on http://localhost:4000

Start MongoDB:

# Make sure MongoDB is running locally
mongod

πŸ“ Project Structure

Foodie/
β”œβ”€β”€ frontend/                 # React frontend application
β”‚   β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ Dockerfile
β”‚   β”œβ”€β”€ .dockerignore
β”‚   └── package.json
β”œβ”€β”€ backend/                  # Express.js backend API
β”‚   β”œβ”€β”€ routes/
β”‚   β”œβ”€β”€ config/
β”‚   β”œβ”€β”€ uploads/
β”‚   β”œβ”€β”€ server.js
β”‚   β”œβ”€β”€ Dockerfile
β”‚   β”œβ”€β”€ .dockerignore
β”‚   └── package.json
β”œβ”€β”€ admin/                    # React admin panel
β”‚   β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ Dockerfile
β”‚   β”œβ”€β”€ .dockerignore
β”‚   └── package.json
β”œβ”€β”€ docker-compose.yml        # Multi-service orchestration
β”œβ”€β”€ .dockerignore             # Root Docker ignore file
β”œβ”€β”€ README.md
└── CONTRIBUTING.md

🐳 Docker Commands

Basic Operations

# 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

Development Commands

# 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

Database Management

# Access MongoDB shell
docker-compose exec mongodb mongosh

# Backup database
docker-compose exec mongodb mongodump --out /backup

# View MongoDB logs
docker-compose logs mongodb

πŸ§ͺ Linting

ESLint 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

🧰 Scripts

Frontend & Admin Scripts

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

Backend Scripts

Command Description
npm start Start production server
npm run server Start development server with nodemon

πŸ“ Notes

  • Make sure MongoDB is running locally or update connectDB() in config/db.js accordingly.
  • You can update the backend routes via routes/foodRoute.js.

Environment Variables

The application uses the following environment variables:

Backend:

  • MONGODB_URI: MongoDB connection string
  • JWT_SECRET: Secret key for JWT tokens
  • PORT: Server port (default: 4000)

Frontend:

  • REACT_APP_API_URL: Backend API URL

Admin:

  • VITE_API_URL: Backend API URL for Vite

Database Configuration

  • Docker: MongoDB runs automatically with authentication
    • Username: admin
    • Password: password123
    • Database: foodie
  • Manual: Update connectDB() in backend/config/db.js

File Uploads

  • Backend handles file uploads via Multer
  • Files are stored in backend/uploads/ directory
  • Docker setup includes volume mounting for persistence

🀝 Contributing

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

Development Workflow

  1. Fork the repository
  2. Create a feature branch
  3. Use Docker for consistent development environment
  4. Test your changes with docker-compose up --build
  5. Submit a pull request

πŸ“„ License

This project is licensed under the MIT License

Contact πŸ“

If you have any questions, feedback, or want to collaborate, feel free to reach out to the project maintainer:

Maintainer: Abhishek Farshwal GitHub: Foodie


πŸ”— References

About

A full-stack web application for browsing, listing, and managing a variety of food items. Built using React (Frontend), Express.js (Backend), and MongoDB (GSSOC 2025)

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 66.1%
  • CSS 33.4%
  • Other 0.5%