1.8 KiB
1.8 KiB
Cake Order Tracker
A lightweight, robust order management system.
Key Features
- Order Lifecycle Management: Full CRUD operations for products and customer orders.
- Search: Order filtering by date range, and keyword search.
- Easy Deployment: Single-binary deployment utilizing Go, along with a single database file.
- Interactive Client-Side Logic: Dynamic order composition with real-time total price calculation.
Tech Stack
- Backend: Go
- Database: SQLite
- Frontend: HTMX, Templ, CSS, JavaScript
- Tooling: Versioned SQL Migrations, Go Toolchain, Templ
Architectural Highlights
1. Database Persistence
The system implements a versioned migration system. The schema handles relationships between orders and products via join tables, ensuring integrity through the database/sql package's transaction support.
2. Separation of Concerns
- /models: Pure data structures for cross-package communication.
- /store: Encapsulated data persistence layer containing all SQL logic and migrations.
- /server: HTTP routing, handler logic, and template rendering.
Installation and Running
Run the application:
git clone git.bronku.xyz/bronku/cake-order-tracker
cd cake-order-tracker
go generate && go run .
Deployment
- Build the application
git clone git.bronku.xyz/bronku/cake-order-tracker
cd cake-order-tracker
go generate && go build .
- Install the binary
# shouldn't be necessary if the binary was built on the same machine
sudo chmod +x cake-order-tracker
# move to a diractory you have in $PATH
sudo mv cake-order-tracker /usr/local/bin
- Setup a systemd service (if yyou don't use systemd, then you probably don't need any instructions)
# it is recommended to create a dedicated user
sudo useradd