A compact, production-minded full-stack project you can finish fast. Backend in Go (Gin) and Frontend in React (Vite). Includes in-memory data, clear endpoints, simple UI, and run/deploy instructions.
- Restaurants list
- Menu per restaurant
- Cart (frontend only)
- Place order (creates order with status)
- Check order status
- Simple admin view endpoint to list orders
- Backend: Go + Gin (single binary)
- Frontend: React (Vite)
- Data: in-memory (easy to swap with DB)
- Optional: Dockerfile for both
mini-food-delivery/
├─ backend/
│ ├─ go.mod
│ ├─ main.go
│ ├─ handlers.go
│ ├─ models.go
│ ├─ data.go
│ └─ Dockerfile
├─ frontend/
│ ├─ package.json
│ ├─ index.html
│ ├─ src/
│ │ ├─ main.jsx
│ │ ├─ App.jsx
│ │ ├─ api.js
│ │ ├─ components/
│ │ │ ├─ RestaurantCard.jsx
│ │ │ └─ MenuItem.jsx
│ │ └─ styles.css
│ └─ vite.config.js
└─ README.md
- Go 1.20+
- Node.js & npm
- Navigate to
backenddirectory:cd backend - Install dependencies:
go mod tidy
- Run the server:
The server will start on
go run main.go
http://localhost:8080.
- Navigate to
frontenddirectory:cd frontend - Install dependencies:
npm install
- Run the development server:
The application will be available at
npm run dev
http://localhost:5173(or similar). The application will be available athttp://localhost:5173(or similar).
We use Cypress for End-to-End (E2E) testing.
- Ensure the app is running (both backend and frontend).
- Open a new terminal in the
frontenddirectory. - Run the tests in headless mode:
npm run test:e2e
- To open the interactive Test Runner:
npx cypress open
The test suite (cypress/e2e/spec.cy.js) covers the full user journey:
- Homepage: Verifies restaurants load.
- Menu: Checks if menu items and images appear.
- Cart: Adds items, checks details (name, price, image), and removes items.
- Order: Places an order and checks for success message.
To evolve this project into a professional, real-world application, we plan to implement the following:
- Rider App: A dedicated mobile app for delivery riders to accept jobs, view routes (Google Maps integration), and update delivery status.
- Restaurant Portal: A web dashboard for restaurant owners to manage menus, view incoming orders, and track earnings.
- Integration: Use WebSockets for real-time order matching between Customers, Restaurants, and Riders.
- Cloud Deployment: Deploy backend to AWS/GCP (using Docker/Kubernetes) and frontend to Vercel/Netlify.
- CI/CD: Set up GitHub Actions for automated testing (Cypress/Go test) and deployment pipelines.
- Monitoring: Integrate tools like Prometheus/Grafana for server health and Sentry for error tracking.
- AI Recommendations: Use machine learning to suggest food based on user history and preferences.
- Real-time Tracking: Live GPS tracking of the rider on a map.
- Payment Gateway: Integrate Stripe or Omise for secure credit card/QR payments.