A real-time pizza order tracking application built with Go, Gin, and GORM. Experience the journey of your pizza from the kitchen to your doorstep with live updates!
- Real-time Order Tracking: Receive live updates on your order status using Server-Sent Events (SSE).
- Interactive Admin Dashboard: Manage orders, update statuses, and view notifications in real-time.
- Order Management: Create, update, and delete orders seamlessly.
- Customer Notifications: Customers get instant feedback on their order progress.
- Secure Authentication: Admin login system to protect sensitive operations.
- Responsive Design: Beautifully crafted UI that works on desktop and mobile.
This project leverages a powerful modern stack to ensure performance and reliability:
- Backend: Go (Golang)
- Web Framework: Gin Gonic - High-performance HTTP web framework.
- Database ORM: GORM - The fantastic ORM library for Golang.
- Database: SQLite - Lightweight, disk-based database (configurable).
- Frontend: HTML5, CSS3, JavaScript (Vanilla).
- Real-time: Server-Sent Events (SSE) for live updates.
- Utilities:
shortidfor unique order IDs,slogfor structured logging.
Follow these instructions to get a copy of the project up and running on your local machine.
Ensure you have Go installed on your system.
- Go 1.24+ is required.
Check your Go version:
go version-
Clone the repository
git clone https://github.com/bouzayenilyes/go-pizza-tracker.git cd go-pizza-tracker -
Install dependencies
go mod download
-
Start the server
go run cmd/*.go -
Access the application Open your browser and navigate to:
- Customer View: http://localhost:3000
- Admin Dashboard: http://localhost:3000/admin
Note: The default port is
3000. You can configure this in your environment variables or config file if applicable.
go-pizza-tracker/
├── cmd/
│ ├── main.go # Application entry point
│ ├── routes.go # Route definitions
│ ├── handlers.go # HTTP handlers
│ └── ...
├── internal/
│ └── models/ # Database models and business logic
├── templates/ # HTML templates and static assets
├── data/ # SQLite database file (created at runtime)
├── go.mod # Go module definition
└── README.md # Project documentation
GET /- Home page / Order formPOST /new-order- Submit a new orderGET /customer/:id- Track a specific orderGET /notifications- SSE stream for notificationsGET /login- Admin login pagePOST /login- Admin login action
GET /admin- Admin dashboardPOST /admin/order/:id/update- Update order statusPOST /admin/order/:id/delete- Delete an orderGET /admin/notifications- Admin SSE stream
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.
Made with ❤️ by Bouzayen Ilyes