NgonNgay is a full-stack MERN food ordering application with real-time order tracking, admin dashboard, Docker support, and features like coupons, reviews, and role-based access.

Stars

25

7-day growth

No data

Forks

0

Open issues

0

License

No data

Last updated

2026-07-14

AI repository intelligence
FR-AI / ANALYSIS

Why it is worth attention

It stands out for its comprehensive all-in-one feature set including real-time Socket.IO updates, a one-command Docker deployment that eliminates manual setup, an extensive admin panel with revenue stats and CSV export, and a robust automated test suite with isolated MongoDB.

Who it is for

  • Full-stack developers learning MERN and real-time features
  • Small business owners seeking a ready-to-deploy food ordering platform
  • Students building portfolio projects with modern web technologies
  • DevOps engineers interested in Dockerized full-stack applications

Use cases

  • Launching a local food delivery service with real-time order updates
  • Building a restaurant management system with coupon and review management
  • Learning full-stack development by studying a production-like codebase with tests
  • Demonstrating CI/CD and Dockerized deployment in a demo project

Strengths

  • Real-time order status updates via Socket.IO with a polling fallback for reliability
  • Single-command Docker Compose setup that bundles MongoDB, server, and client without manual installation
  • Comprehensive admin panel including revenue statistics, top-selling items, user management, and CSV/Excel order export
  • Automated test suite (Jest + Supertest) with an in-memory MongoDB, covering auth, orders, coupons, and role-based access

Considerations

  • Requires Docker or manual Node.js/MongoDB setup; not a fully managed SaaS solution
  • Socket.IO backend must run on a platform supporting WebSocket connections (e.g., Render, Railway) — not suitable for serverless functions like Vercel Functions
  • No built-in email or SMS notification system for order updates (only in-app real-time and polling)

README quick start

NgonNgay — Ứng dụng đặt món ăn trực tuyến (MERN Stack)

Ứng dụng full-stack cho phép người dùng đăng ký/đăng nhập, xem nhà hàng và món ăn, tìm kiếm/lọc, thêm vào giỏ hàng, đặt hàng (có mã giảm giá), theo dõi trạng thái đơn theo thời gian thực, và quản trị viên quản lý người dùng/món ăn/đơn hàng/mã giảm giá.

🚀 Cách chạy nhanh nhất: Docker (khuyên dùng)

Nếu máy bạn từng gặp khó khăn khi cài Node.js / MongoDB / lỗi kết nối Atlas, cách này giúp bạn bỏ qua TẤT CẢ các bước đó. Chỉ cần cài Docker Desktop (1 lần duy nhất), sau đó:

cp .env.example .env
docker compose up --build

Đợi vài phút để build xong, sau đó:

  • Mở trình duyệt vào http://localhost:5173 để dùng web
  • Tạo dữ liệu mẫu (chỉ cần chạy 1 lần đầu):
    docker compose exec server npm run seed
    

Docker sẽ tự động: cài MongoDB (chạy nội bộ, không cần MongoDB Atlas, không lỗi DNS), cài Node.js, cài toàn bộ thư viện, build và chạy cả backend lẫn frontend — chỉ với các lệnh ở trên.

Dừng toàn bộ hệ thống: docker compose down (dữ liệu vẫn được giữ lại nhờ Docker volume, chạy docker compose up lại là có ngay).


Công nghệ sử dụng

Thành phầnCông nghệ
Front-endReact 18 (Vite), React Router, Axios, Socket.IO Client
Back-endNode.js, Express.js, Socket.IO
DatabaseMongoDB (Mongoose)
Xác thựcJWT (JSON Web Token) + bcrypt
Log & giám sátWinston (ghi log ra file), Morgan (log HTTP request)
Đóng góiDocker, Docker Compose
Công cụVS Code, Git/GitHub, Postman

Cấu trúc dự án

food-order/
├── client/          # React - giao diện người dùng
│   ├── Dockerfile / nginx.conf
│   └── src/
│       ├── pages/         # Home, Foods, RestaurantDetail, Cart, Checkout, Orders, Favorites, Profile, Admin...
│       ├── components/    # Navbar, FoodCard, RestaurantCard, StarRating, Pagination, ProtectedRoute, ErrorBoundary
│       ├── context/       # AuthContext (JWT), CartContext, ToastContext, SocketContext (realtime)
│       └── services/api.js
├── server/          # Node.js + Express - API
│   ├── Dockerfile
│   ├── models/        # User, Restaurant, Food, Order, Review, Coupon (Mongoose schemas)
│   ├── controllers/   # Logic xử lý cho từng route
│   ├── routes/         # Định nghĩa endpoint API
│   ├── validators/     # Quy tắc validate input (express-val

Related repositories

Similar projects matched by category, topics, and programming language.

react
Featured
react GitHub avatar

react

React is a JavaScript library for building user interfaces with declarative, component-based, and cross-platform design.

Web DevelopmentFrontend Frameworks
246,741
tandpfun
Featured
tandpfun GitHub avatar

wardrobe

A GPT‑image powered app that extracts individual garment cutouts from photos, organizes them into a digital wardrobe, and generates modeled outfit previews.

JavaScript
1,570
mshumer
Featured
mshumer GitHub avatar

Claude-of-Duty

A browser-based first-person shooter built entirely with procedural generation and orchestrated AI agents, featuring 55k lines of Three.js/WebGL2 code and no art assets.

AI & Machine LearningAI Agents
1,234