Files
padelnomics/README.md
2026-02-11 14:53:09 +01:00

93 lines
2.2 KiB
Markdown

# Forge - Minimal SaaS Boilerplate
A data-oriented, no-nonsense SaaS boilerplate following Casey Muratori's principles: solve the problem at hand, avoid premature abstraction, readable over "clean".
## Stack
- **Framework**: Quart (async Flask) + Pico CSS
- **Database**: SQLite + WAL mode + Litestream replication
- **Auth**: Magic link (passwordless)
- **Billing**: Stripe (+ optional Paddle)
- **Background jobs**: SQLite-based queue (no Redis)
- **Deployment**: Docker + Caddy + Hetzner/any VPS
## Usage
### Generate a new project
```bash
# Install copier
pip install copier
# Generate project
copier copy gh:yourusername/forge my-saas
# Or from local template
copier copy ./forge my-saas
```
### Answer the prompts
```
project_slug: my_saas
project_name: My SaaS
description: A subscription service for widgets
author_name: Your Name
author_email: you@example.com
base_url: https://my-saas.com
include_paddle: false
```
## After Generation
See the generated project's README for setup instructions.
## Philosophy
1. **Data-oriented**: Plain SQL, no ORM magic
2. **Flat structure**: Domain modules, not enterprise folders
3. **Concrete over abstract**: Write code first, extract patterns only when repeated 3+ times
4. **SQLite until proven otherwise**: Handles more than you think
5. **Server-rendered**: Pico CSS + minimal HTMX, no build step
6. **Measure don't assume**: Profile before optimizing
## Structure
```
padelnomics/
src/padelnomics/
app.py # Application factory
core.py # DB, config, email, shared utils
worker.py # Background task processor
auth/ # Domain: authentication
routes.py # Routes + queries + decorators
templates/
billing/ # Domain: subscriptions & payments
routes.py
templates/
dashboard/ # Domain: user dashboard
routes.py
templates/
public/ # Domain: marketing pages
routes.py
templates/
api/ # Domain: REST API
routes.py
templates/ # Shared templates
base.html
migrations/
schema.sql
migrate.py
```
## License
MIT