diff --git a/README.md b/README.md index 7395ad6..21cf6bc 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,83 @@ -# dusty-marble +# Dusty Marble - RPNAB Invoicing Portal -Functional & test-driven invoicing system \ No newline at end of file +This is a Rust-based single-page web application for Rent & Petroleum Nordic AB, designed to streamline internal operations and provide customers with access to their invoice documents. + +## 🎯 Project Goal + +The primary goal is to make invoicing more efficient by: +- Allowing internal users to upload structured transaction lists (CSV) +- Converting those transactions into a format suitable for invoice attachments +- Giving customers secure access to view/download their invoices + +The application will include both a web UI and a command-line interface for administrative tasks. + +--- + +## 🧰 Tech Stack + +### Core Technologies + +| Layer | Tool | Notes | +|---------------|------------------|--------------------------------------------| +| Frontend | [Leptos](https://github.com/leptos-rs/leptos) | Rust SPA framework with reactive UI | +| Backend | [Axum](https://github.com/tokio-rs/axum) | Lightweight async Rust web framework | +| Database | MariaDB + [`sqlx`](https://github.com/launchbadge/sqlx) | Compile-time checked queries | +| Migrations | [Goose](https://github.com/sifrr/goose) | Simple SQL-based migration tool | +| CLI Tooling | Rust + [`clap`](https://github.com/clap-rs/clap) | For admin-only workflows | +| CSV Parsing | [`csv`](https://docs.rs/csv/latest/csv/) | Robust parser with `serde` integration | +| PDF Generation| HTML + `wkhtmltopdf` or `weasyprint` | For generating styled invoice documents | +| Styling | Tailwind CSS (optional) | Utility-first styling | + +--- + +## πŸ—ΊοΈ Development Plan + +### Phase 1: Project Setup +- [x] Set up Git repository +- [ ] Initialize Cargo workspace +- [ ] Create initial `README.md` +- [ ] Set up Gitea repository + +### Phase 2: Core Infrastructure +- [ ] Set up `frontend/` and `backend/` crates +- [ ] Configure `sqlx` and `Goose` for MariaDB +- [ ] Define initial DB schema +- [ ] Add `.env` for local secrets + +### Phase 3: Admin Interface +- [ ] Implement login system for internal user +- [ ] Create CLI for uploading CSV files +- [ ] Parse CSV and store transactions in DB +- [ ] Implement basic web UI for uploading and verifying CSV data + +### Phase 4: Customer Portal +- [ ] Implement customer login system +- [ ] Create UI for listing invoices +- [ ] Render invoices as HTML +- [ ] Enable download of invoices as PDF + +### Phase 5: Polish and Deployment +- [ ] Add basic access logging +- [ ] Add error handling and input validation +- [ ] Set up reverse proxy (e.g., Caddy) for HTTPS +- [ ] Package and deploy to FreeBSD jail + +--- + +## πŸ“ Project Structure (planned) + rpnab-invoicing/ + β”œβ”€β”€ frontend/ # Leptos SPA + β”œβ”€β”€ backend/ # Axum web API + β”œβ”€β”€ cli/ # CSV import + admin commands + β”œβ”€β”€ shared/ # Models, helpers, reused logic + β”œβ”€β”€ migrations/ # Goose SQL migration files + β”œβ”€β”€ static/ # Public files (PDF template, CSS) + β”œβ”€β”€ .env # DB and secret configs (local only) + └── Cargo.toml + +--- + +## 🚧 Status + +> Project is in early planning and infrastructure phase. +> Active development begins Q4 2025. \ No newline at end of file