Update README.md

This commit is contained in:
bronku 2026-06-16 14:06:28 +02:00
parent 5610b28254
commit 0e6a5f0d94

View file

@ -1,21 +1,20 @@
# Cake Order Tracker # Cake Order Tracker
A lightweight, robust order management system built with Go and SQLite. This project focuses on a clean monolithic architecture, transactional data integrity, and a high-performance, single-binary deployment model. A lightweight, robust order management system.
## Key Features ## Key Features
* **Order Lifecycle Management:** Full CRUD operations for products and customer orders with SQL transactions to ensure data consistency. * **Order Lifecycle Management:** Full CRUD operations for products and customer orders.
* **Live Asynchronous Search:** Real-time order filtering by date range utilizing **HTMX** for partial DOM updates and reduced server payload. * **Search:** Order filtering by date range, and keyword search.
* **Custom Authentication:** Secure session-based authentication featuring salted password hashing and middleware-based route protection. * **Easy Deployment:** Single-binary deployment utilizing Go, along with a single database file.
* **Embedded Assets:** Single-binary deployment utilizing Go `embed` for HTML templates, static assets (HTMX, FontAwesome), and SQL migrations. * **Interactive Client-Side Logic:** Dynamic order composition with real-time total price calculation.
* **Interactive Client-Side Logic:** Dynamic order composition with real-time total price calculation using vanilla JavaScript and HTML5 templates.
## Tech Stack ## Tech Stack
* **Backend:** Go (Golang) * **Backend:** Go
* **Database:** SQLite * **Database:** SQLite
* **Frontend:** HTMX, Go HTML Templates, CSS, JavaScript * **Frontend:** HTMX, Templ, CSS, JavaScript
* **Tooling:** Versioned SQL Migrations, Go Toolchain * **Tooling:** Versioned SQL Migrations, Go Toolchain, Templ
## Architectural Highlights ## Architectural Highlights
@ -27,21 +26,35 @@ The system implements a versioned migration system. The schema handles relations
* **/models**: Pure data structures for cross-package communication. * **/models**: Pure data structures for cross-package communication.
* **/store**: Encapsulated data persistence layer containing all SQL logic and migrations. * **/store**: Encapsulated data persistence layer containing all SQL logic and migrations.
* **/server**: HTTP routing, handler logic, and multi-entry template rendering. * **/server**: HTTP routing, handler logic, and template rendering.
* **/auth**: Dedicated security layer providing middleware for session validation.
## Installation and Running ## Installation and Running
1. **Run the application:** ### **Run the application:**
```bash ```bash
go run main.go git clone git.bronku.xyz/bronku/cake-order-tracker
cd cake-order-tracker
go generate && go run .
``` ```
## todo: ### Deployment
- [ ] search orders by id, customer name, phone 1. Build the application
- [ ] one click satus change ``` bash
- [ ] overview for cakes to do for a certain time period git clone git.bronku.xyz/bronku/cake-order-tracker
- [ ] today, this week, this month quick select buttons (should change the selected dates in calendar) cd cake-order-tracker
- [ ] better price handling (decinal places and such) go generate && go build .
- [ ] cake tags ```
- [ ] special cake orders
2. Install the binary
```bash
# 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
```
3. 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