Compare commits
2 Commits
main
...
readme-dra
| Author | SHA1 | Date | |
|---|---|---|---|
| 88cf59550c | |||
| 3ad22163af |
86
README.md
86
README.md
@ -1,3 +1,85 @@
|
||||
# dusty-marble
|
||||
# 🧾 RPNAB Invoicing Portal
|
||||
|
||||
Functional & test-driven invoicing system
|
||||
A single-page Rust web app for Rent & Petroleum Nordic AB, designed to streamline internal invoice processing and provide secure access for customers to view their invoice documents.
|
||||
|
||||
---
|
||||
|
||||
## 🎯 Project Goal
|
||||
|
||||
The primary goal is to increase operational efficiency by:
|
||||
|
||||
- Enabling admin users to upload structured CSV transaction data
|
||||
- Storing and linking those transactions to invoice records
|
||||
- Allowing customers to log in and view/download invoice documents (HTML or PDF)
|
||||
- Providing a command-line interface for admin-only tasks
|
||||
|
||||
---
|
||||
|
||||
## 🧰 Tech Stack
|
||||
|
||||
### Core Technologies
|
||||
|
||||
| Layer | Tool | Description |
|
||||
|---------------|------------------|-------------|
|
||||
| Frontend | [Leptos](https://github.com/leptos-rs/leptos) | Rust-based SPA framework with SSR support |
|
||||
| Backend | [Axum](https://github.com/tokio-rs/axum) | Async Rust web framework |
|
||||
| Database | MariaDB + [`sqlx`](https://github.com/launchbadge/sqlx) | Compile-time verified SQL queries |
|
||||
| Migrations | [Goose](https://github.com/sifrr/goose) | SQL migration runner |
|
||||
| CSV Parsing | [`csv`](https://docs.rs/csv/latest/csv/) | High-performance CSV parser |
|
||||
| CLI Tools | Rust + [`clap`](https://github.com/clap-rs/clap) | Command-line admin tasks |
|
||||
| PDF Generation| HTML + `wkhtmltopdf` or `weasyprint` | Generate styled invoice documents |
|
||||
| Styling | Tailwind CSS (optional) | Utility-first styling framework |
|
||||
|
||||
---
|
||||
|
||||
## 🗺️ Development Roadmap
|
||||
|
||||
### Phase 1: Project Setup
|
||||
- [x] Create Git repository
|
||||
- [ ] Initialize Rust workspace (`Cargo.toml`)
|
||||
- [ ] Set up frontend, backend, CLI structure
|
||||
- [x] Write project README
|
||||
|
||||
### Phase 2: Infrastructure
|
||||
- [ ] Add `.env` and config boilerplate
|
||||
- [ ] Set up Goose migration framework
|
||||
- [ ] Connect to MariaDB using `sqlx`
|
||||
- [ ] Define initial DB schema (users, invoices, transactions)
|
||||
|
||||
### Phase 3: Admin Functions
|
||||
- [ ] Implement admin login (cookie-based)
|
||||
- [ ] Create CLI tool for CSV uploads
|
||||
- [ ] Parse CSV → normalize → store in DB
|
||||
- [ ] Web UI to verify and review uploads
|
||||
|
||||
### Phase 4: Customer Portal
|
||||
- [ ] Implement customer login
|
||||
- [ ] Build UI to view invoice list
|
||||
- [ ] Render invoice details
|
||||
- [ ] Add option to download as PDF
|
||||
|
||||
### Phase 5: Polish & Deploy
|
||||
- [ ] Input validation + error handling
|
||||
- [ ] Session persistence + CSRF protection
|
||||
- [ ] Serve behind reverse proxy (Caddy)
|
||||
- [ ] Deploy to FreeBSD jail
|
||||
|
||||
---
|
||||
|
||||
## 📁 Planned Project Structure
|
||||
|
||||
```text
|
||||
rpnab-invoicing/
|
||||
├── frontend/ # Leptos SPA (Rust + WASM)
|
||||
├── backend/ # Axum HTTP API
|
||||
├── cli/ # Rust CLI binary for admin use
|
||||
├── shared/ # Common logic, models, parsing helpers
|
||||
├── migrations/ # Goose SQL migration scripts
|
||||
├── static/ # Public assets (PDF templates, CSS)
|
||||
├── .env # Local config (not checked in)
|
||||
└── Cargo.toml # Workspace definition
|
||||
|
||||
🚧 Project Status
|
||||
|
||||
This project is in the planning and bootstrapping phase.
|
||||
Initial development will begin in Q4 2025.
|
||||
|
||||
Reference in New Issue
Block a user