Skip to content

Latest commit

 

History

25 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

InstaFood

A full-stack food delivery application built with modern web technologies. This project features a responsive frontend and a robust backend API for managing users, food items, and food partners.

🚀 Tech Stack

Frontend

  • React 19 - UI library
  • Vite - Build tool and development server
  • React Router DOM - Client-side routing
  • Axios - HTTP client for API requests
  • CSS3 - Styling

Backend

  • Node.js & Express - Server framework
  • MongoDB & Mongoose - Database
  • JWT - Authentication
  • bcrypt - Password hashing
  • Multer - File uploads
  • ImageKit - Image management
  • CORS - Cross-origin resource sharing

📁 Project Structure

Zomato/
├── backend/
│   ├── src/
│   │   ├── app.js              # Express app configuration
│   │   ├── controllers/        # Business logic for routes
│   │   ├── models/             # Database schemas
│   │   ├── routes/             # API endpoints
│   │   ├── middlewares/        # Express middlewares
│   │   ├── services/           # Utility services
│   │   └── db/                 # Database connection
│   ├── server.js               # Server entry point
│   └── package.json
│
└── frontend/
    ├── src/
    │   ├── components/         # Reusable React components
    │   ├── pages/              # Page components
    │   ├── routes/             # Route configuration
    │   ├── styles/             # CSS stylesheets
    │   ├── App.jsx             # Main App component
    │   └── main.jsx            # React entry point
    ├── vite.config.js
    └── package.json

🎯 Features

User Features

  • User registration and login
  • Browse food items
  • Save favorite foods
  • Reels feed

Food Partner Features

  • Partner registration and login
  • Create and manage food items
  • Partner profile management

General Features

  • Secure JWT-based authentication
  • Image upload and management
  • Password encryption with bcrypt
  • CORS-enabled API

📦 Installation

Prerequisites

  • Node.js (v14 or higher)
  • MongoDB
  • npm or yarn

Backend Setup

  1. Navigate to the backend directory:
cd backend
  1. Install dependencies:
npm install
  1. Create a .env file in the backend directory:
PORT=3000
MONGODB_URI=mongodb://localhost:27017/instagood
JWT_SECRET=your_jwt_secret_key
IMAGEKIT_PRIVATE_KEY=your_imagekit_private_key
IMAGEKIT_PUBLIC_KEY=your_imagekit_public_key
IMAGEKIT_URL_ENDPOINT=your_imagekit_url_endpoint
  1. Start the server:
node server.js

Frontend Setup

  1. Navigate to the frontend directory:
cd frontend
  1. Install dependencies:
npm install
  1. Create a .env file in the frontend directory (if needed):
VITE_API_URL=http://localhost:5000
  1. Start the development server:
npm run dev

The application will be available at http://localhost:5173

🔌 API Endpoints

Authentication Routes (/api/auth)

  • POST /register - Register a new user
  • POST /login - User login
  • POST /partner-register - Register a food partner
  • POST /partner-login - Food partner login

Food Routes (/api/food)

  • GET / - Get all food items
  • POST / - Create a new food item
  • GET /:id - Get food item details
  • PUT /:id - Update food item
  • DELETE /:id - Delete food item

Food Partner Routes (/api/food-partner)

  • GET /profile - Get partner profile
  • PUT /profile - Update partner profile

🔐 Authentication

The application uses JWT (JSON Web Tokens) for authentication:

  • Tokens are issued upon successful login
  • Tokens are included in request headers: Authorization: Bearer <token>
  • Passwords are hashed using bcrypt before storage

🎨 Styling

The frontend uses a modular CSS approach with theme variables:

  • variables.css - Color and spacing variables
  • theme.css - Theme configurations
  • Component-specific CSS files for isolated styling

📸 Image Management

Image uploads are handled using:

  • Multer - Middleware for file uploads
  • ImageKit - Cloud-based image management and optimization

🧪 Available Scripts

Backend

npm test  # Run tests (not yet configured)

Frontend

npm run dev      # Start development server
npm run build    # Build for production
npm run preview  # Preview production build
npm run lint     # Run ESLint

ScreenShots

choose partner

Screenshot 2026-01-18 153658

Normal user

Screenshot 2026-01-18 153742 Screenshot 2026-01-18 153721 Screenshot 2026-01-18 155826

view store

Screenshot 2026-01-18 155836

Food Partner

Screenshot 2026-01-18 154328 Screenshot 2026-01-18 154346 Screenshot 2026-01-18 154659

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages