Experience the taste of luxury. A fully featured, AI-powered food delivery application built with the latest modern web technologies.
A cutting-edge stack designed for performance, scalability, and user experience.
- Framework: Next.js 16.1.1 (App Router)
- UI Library: React 19.2.3
- Styling: Tailwind CSS 3.4
- Animations: Framer Motion + GSAP
- Icons: Lucide React
- Notifications: React Toastify
- Forms: React Hook Form
- API: Next.js API Routes (Serverless)
- Database: Firebase Firestore (NoSQL)
- Authentication: Firebase Auth
- File Storage: Firebase Storage
- Caching: Upstash Redis (Serverless)
- Rate Limiting:
@upstash/ratelimit
- Payments: Razorpay
- Artificial Intelligence: Google Gemini AI (Product descriptions, recommendations, nutrition analysis)
- Contact Forms: Web3Forms
- PDF Generation:
jspdf
- Global Client State: Zustand
- Server State: React Hooks + Firebase Real-time Listeners
- Hosting: Vercel (Auto CI/CD)
- Package Manager:
npm - Node Version: 20.x
High-level overview of how the client, server, and external services interact.
graph TD
%% Nodes
User([User / Client])
subgraph "Presentation Layer (Client)"
UI["React Components / Pages"]
Zustand["Zustand Stores <br/> (ViewModel / State)"]
Services["Service Layer <br/> (Axios / Fetch)"]
end
subgraph "Next.js Server (API)"
Middleware["API Wrapper / Middleware <br/> (Rate Limit, Auth Check)"]
Routes["API Routes"]
subgraph "Backend Logic"
Logger["Logger"]
Redis[("Redis Cache")]
AI["Gemini AI Service"]
end
end
subgraph "External Infrastructure"
FB_Auth["Firebase Auth"]
FB_DB[("Firestore DB")]
FB_Storage["Firebase Storage"]
RP["Razorpay Gateway"]
end
%% Connections
User -->|Interacts| UI
UI <-->|State Sync| Zustand
UI -->|Calls| Services
Zustand -->|Calls| Services
Services -->|HTTP Requests| Middleware
Middleware -->|Passes| Routes
Routes -->|Logs| Logger
Routes -->|Checks/Caches| Redis
Routes -->|Generates Content| AI
Routes -->|Verifies Token| FB_Auth
Routes -->|CRUD Ops| FB_DB
Routes -->|Uploads| FB_Storage
Routes -->|Process Payment| RP
%% Styling
classDef client fill:#e1f5fe,stroke:#01579b,stroke-width:2px;
classDef server fill:#f3e5f5,stroke:#4a148c,stroke-width:2px;
classDef ext fill:#fff3e0,stroke:#e65100,stroke-width:2px;
class UI,Zustand,Services client;
class Middleware,Routes,Logger,Redis,AI server;
class FB_Auth,FB_DB,FB_Storage,RP ext;
- π Smart Ordering: Persistent cart, real-time updates, and order history.
- π Secure Auth: Robust authentication via Firebase (Email/Password, Phone).
- πΈ Easy Payments: Seamless checkout process integrated with Razorpay.
- π§Ύ Invoicing: Automatic PDF invoice generation for every order.
- π Live Monitoring: Real-time dashboard for tracking orders and status changes.
- βοΈ Content Management: Full CRUD capabilities for menu items and categories.
- π Analytics: visual graphs and stats for revenue, sales, and user activity.
- π¨ Customer Support: Integrated message center for handling inquiries.
- Intelligent Recommendations: Suggests food based on browsing habits.
- Nutritional Analysis: Automatically calculates calories and macros.
- Content Gen: Creates appetizing product descriptions instantly.
src/
βββ app/ # Next.js App Router (Pages & API endpoints)
βββ components/ # Reusable UI Components (Buttons, Cards, Modals)
βββ constants/ # App-wide fixed data and configuration
βββ hooks/ # Custom React Hooks (useAuth, useCart)
βββ lib/ # core library configurations (Firebase, Gemini, Redis)
βββ scripts/ # Utility scripts for data migration or seeding
βββ services/ # API Service layer (Auth, Order, Product services)
βββ stores/ # Global state management (Zustand stores)
βββ utils/ # Helper functions and formatted utilities
Follow these steps to set up the project locally.
git clone https://github.com/Hruda-Rockey10/Nextjs---Firebase.git
cd "Nextjs---Firebase"Note: Use the custom script to ensure legacy peer dependencies are handled correctly.
npm run modules
# OR
npm install --legacy-peer-depsCreate a .env file in the root directory and populate it with your keys:
# Firebase
NEXT_PUBLIC_FIREBASE_API_KEY=your_api_key
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_project_id
FIREBASE_ADMIN_PRIVATE_KEY="your_private_key"
# Payment
RAZORPAY_KEY_ID=your_razorpay_key
RAZORPAY_KEY_SECRET=your_razorpay_secret
# AI & Database
GEMINI_API_KEY=your_gemini_key
UPSTASH_REDIS_REST_URL=your_redis_url
UPSTASH_REDIS_REST_TOKEN=your_redis_tokennpm run devOpen http://localhost:3000 to view the app.