alokkkxpixel/Food-View repository with technology badges and authentication API endpoints.
A TikTok-style video platform for food discovery where users can browse food videos and food partners can showcase their offerings.
Here’s how the app looks on a mobile viewport (simulated):
| Screen | Description |
|---|---|
| Vertical “TikTok-style” video scroll feed | |
| Food partner upload / management view |
You can place mobile screenshots under a
docs/folder (e.g.docs/mobile-home.png,docs/mobile-upload.png, etc.).
- Browse vertical video feed of food content
- Like and save food videos
- View saved content
- Profile management with account settings
- Upload and manage food videos
- Update food prices and delete items
- Track engagement metrics
Frontend:
Backend:
- Express.js with Node.js 6
- MongoDB for data persistence
- JWT Authentication 7
- ImageKit for media storage 8
- bcrypt for password hashing 9
| Method | Endpoint | Description | Middleware |
|---|---|---|---|
POST |
/api/auth/user/register |
Register new user with profile image | multer.single("image"), registerUserValidator |
POST |
/api/auth/user/login |
User login with email/password | None |
POST |
/api/auth/user/logout |
User logout | None |
DELETE |
/api/auth/user/:id |
Delete user account | None |
| Method | Endpoint | Description | Middleware |
|---|---|---|---|
POST |
/api/auth/foodpartner/register |
Register new food partner | multer.single("image"), registerFoodPartnerValidator |
POST |
/api/auth/foodpartner/login |
Food partner login | None |
POST |
/api/auth/foodpartner/logout |
Food partner logout | None |
DELETE |
/api/auth/foodpartner/:id |
Delete food partner account | None |
authUserMiddleware: Validates JWT tokens for regular users 12authFoodPartnerMiddleware: Validates JWT tokens for food partners 13
| Method | Endpoint | Description | Authentication |
|---|---|---|---|
POST |
/api/food/ |
Create food item with video | Food Partner |
GET |
/api/food/ |
Get paginated food items | User |
POST |
/api/food/like |
Toggle like on food item | User |
POST |
/api/food/save |
Save food item | User |
GET |
/api/food/savedfood |
Get saved food items | User |
DELETE |
/api/food/:id |
Delete food item | None |
PUT |
/api/food/:id/price |
Update food price | None |
| Method | Endpoint | Description | Authentication |
|---|---|---|---|
GET |
/api/food-partner/profile |
Get logged-in partner profile | Food Partner |
GET |
/api/food-partner/:id |
Get partner profile by ID | Food Partner |
The platform follows a three-tier architecture:
- Frontend: React SPA with routing 16
- Backend: Express.js REST API 17
- Database: MongoDB with Mongoose ODM
- Storage: ImageKit CDN for media files
-
Clone the repository
git clone https://github.com/alokkkxpixel/Food-View.git cd Food-View -
Backend Setup
cd backend npm install -
Frontend Setup
cd frontend npm install -
Environment Variables Create
.envfiles with:JWT_SECRETIMAGEKIT_PUBLIC_KEYIMAGEKIT_PRIVATE_KEYIMAGEKIT_ENDPOINT- MongoDB connection string
-
Start Development Servers
# Backend (port 3000) cd backend && npm start # Frontend (port 5173) cd frontend && npm run dev
The application uses React Router for navigation: 18
/user/register- User registration/user/login- User login/foodpartner/register- Food partner registration/foodpartner/login- Food partner login/home- Main video feed/savedfood- Saved content/create-food- Upload food content/food-partner/profile- Partner dashboard
Notes
The codebase implements a comprehensive dual-authentication system supporting both regular users and food partners, with role-based access control and secure JWT token management. The API follows REST conventions with proper middleware validation and file upload handling via multer and ImageKit integration.
Wiki pages you might want to explore:
- System Architecture (alokkkxpixel/Food-View)
- API Routes (alokkkxpixel/Food-View)
- Controllers & Business Logic (alokkkxpixel/Food-View)
File: frontend/package.json (L15-15)
"axios": "^1.11.0",File: frontend/package.json (L20-20)
"gsap": "^3.13.0",File: frontend/package.json (L23-23)
"react": "^19.1.1",File: frontend/package.json (L27-27)
"tailwindcss": "^4.1.13"File: frontend/package.json (L39-39)
"vite": "^7.1.2"File: backend/src/app.js (L2-2)
const express = require("express");File: backend/src/app.js (L20-23)
//Routes
app.use("/api/auth", authRoutes);
app.use("/api/food", foodItemRoutes);
app.use("/api/food-partner", foodpartnerRoutes);