No description
  • HTML 66.8%
  • TypeScript 29%
  • CSS 2.5%
  • JavaScript 1.6%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-08 11:20:07 +07:00
.archify feat: Add Dockerfile, docker-compose, VPS deployment guide and feature enhancements 2026-11-06 19:28:27 +07:00
public Build anngon full-stack localhost app 2026-11-05 17:51:09 +07:00
scripts feat: Add Dockerfile, docker-compose, VPS deployment guide and feature enhancements 2026-11-06 19:28:27 +07:00
src fix: add shipper accept delivery step, resolve balance constraint on redelivery, optimize db and prevent 0.0.0.0 redirect 2026-11-08 11:20:07 +07:00
.dockerignore chore: Set production port to 38472 2026-11-06 19:38:14 +07:00
.env.example chore: Allow .env.example in gitignore 2026-11-06 19:38:24 +07:00
.gitignore chore: Allow .env.example in gitignore 2026-11-06 19:38:24 +07:00
DEPLOY.md chore: Set production port to 38472 2026-11-06 19:38:14 +07:00
docker-compose.yml chore: Set production port to 38472 2026-11-06 19:38:14 +07:00
Dockerfile chore: Set production port to 38472 2026-11-06 19:38:14 +07:00
drizzle.config.ts Build anngon full-stack localhost app 2026-11-05 17:51:09 +07:00
eslint.config.mjs Build anngon full-stack localhost app 2026-11-05 17:51:09 +07:00
next.config.ts feat: Add Dockerfile, docker-compose, VPS deployment guide and feature enhancements 2026-11-06 19:28:27 +07:00
package-lock.json Build anngon full-stack localhost app 2026-11-05 17:51:09 +07:00
package.json feat: Add Dockerfile, docker-compose, VPS deployment guide and feature enhancements 2026-11-06 19:28:27 +07:00
README.md feat: Add Dockerfile, docker-compose, VPS deployment guide and feature enhancements 2026-11-06 19:28:27 +07:00
server.mjs fix: add shipper accept delivery step, resolve balance constraint on redelivery, optimize db and prevent 0.0.0.0 redirect 2026-11-08 11:20:07 +07:00
tsconfig.json Build anngon full-stack localhost app 2026-11-05 17:51:09 +07:00
vitest.config.ts feat: Add Dockerfile, docker-compose, VPS deployment guide and feature enhancements 2026-11-06 19:28:27 +07:00
writing-block.md Build anngon full-stack localhost app 2026-11-05 17:51:09 +07:00

anngon

Ứng dụng SaaS đặt món và quản lý giao hàng theo đợt, chạy local bằng Next.js, Node.js, Socket.IO và SQLite.

Chạy trên localhost

npm install
npm run dev

Mở http://localhost:3000. Server tùy chỉnh trong server.mjs chạy Next.js và Socket.IO trên cùng cổng.

Các lệnh kiểm tra:

npm test
npm run lint
npm run build

Tài khoản local

Giao diện URL Tên đăng nhập Mật khẩu
Quán mẫu /com-nha-an Không cần Không cần
Portal quán /portal/login quan demo123
Shipper /ship/login shipper1 demo123
Super Admin /admin/login admin demo123

Dữ liệu SQLite được tạo tại data/anngon.sqlite trong lần truy cập đầu tiên. Thư mục data/ bị loại khỏi Git. Muốn tạo lại dữ liệu local sạch, dừng server và xóa thư mục data/, rồi chạy lại npm run dev.

Luồng đã triển khai

  • Storefront mobile-first, modifier, giỏ hàng, checkout và minimum theo khu vực.
  • Tự động gộp đơn theo quán, đợt, khu vực, điện thoại và địa chỉ chuẩn hóa.
  • Idempotency key, snapshot giá và tracking token riêng cho từng lượt đặt.
  • Portal quán: đơn hàng, đợt giao, điều phối, menu, khu vực, shipper, doanh thu và billing.
  • Portal shipper: đơn được phân, VietQR và hoàn tất/thất bại.
  • Super Admin: quán, gói cước, yêu cầu nạp, ledger và thống kê.
  • Reservation phí theo đơn, tất toán/giải phóng trong SQLite transaction.
  • Socket.IO room được xác thực theo session hoặc tracking token.
  • PWA manifest, service worker và nền tảng Web Push.

Kiến trúc

Mở sơ đồ tương tác tại .archify/architecture-anngon-current-20261105-230015/anngon-current-architecture.html.