A Community Supported Agriculture (SoLaWi) email management system that processes and routes emails based on user subscriptions to mailing list categories.
The easiest way to start all development services is to use the vscode tasks.
This will automatically start all required services:
- SpacetimeDB Server (port 3000)
- Django Backend (port 8000)
- Webhook Proxy (port 3002)
- Admin Web UI (port 8080)
# Check service status
make status
# View recent logs
make logs
# Follow logs in real-time
make logs-follow
# Stop all services
make stop
# Restart everything
make restart
# Clean up logs and stop services
make cleanIf you're using VS Code:
- Open the workspace:
kommunikationszentrum.code-workspace - Use Ctrl+Shift+P → "Tasks: Run Task" → "Start All Development Services"
- Or use F5 to start with debugging support
The system supports flexible configuration via environment variables, following the 12-factor app methodology.
Create a .env file in the project root based on .env.example:
cp .env.example .envKey configuration variables:
SPACETIMEDB_URI- SpacetimeDB server URI (default:http://localhost:3000)SPACETIMEDB_MODULE_NAME- Module name (default:kommunikation)
WEBHOOK_PROXY_BIND_ADDRESS- Server bind address (default:0.0.0.0:3002)
DJANGO_BASE_URL- Django OAuth provider base URL (default:http://127.0.0.1:8000)OIDC_ISSUER_URL- OAuth issuer URL (default:http://127.0.0.1:8000/o)OIDC_CLIENT_ID- OAuth client ID (default:admin-app)ADMIN_REDIRECT_URI- OAuth redirect URI (default:http://127.0.0.1:8080/callback)OAUTH_SCOPES- OAuth scopes (default:openid profile email)
For local development, use defaults from .env.example.
For production deployments, see .env.production.example for guidance on production-appropriate values.
- Webhook Proxy: Loads
.envfile automatically and falls back to environment variables - Admin Web UI: Loads configuration in browser from environment variables set during build
- Server Module: Uses compile-time environment variables for SpacetimeDB WASM module
The system consists of four main components:
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Admin Web UI │ │ Webhook Proxy │ │ SpacetimeDB │
│ (Dioxus) │◄──►│ (Axum HTTP) │◄──►│ (Database) │
│ Port 8080 │ │ Port 3002 │ │ Port 3000 │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│ ▲
│ │
▼ ▼
┌─────────────────┐ ┌─────────────────┐
│ OAuth Provider │ │ Stalwart MTA │
│ solawispielplatz│ │ (External) │
│ Django Port 8000│ └─────────────────┘
└─────────────────┘
- SpacetimeDB Server (
/server): Core database and business logic layer - Webhook Proxy (
/webhook-proxy): HTTP API gateway for MTA hooks and user sync - Admin Web Interface (
/admin): Dioxus WebAssembly frontend - Django Backend (external): User management and OAuth provider
- Rust with
wasm32-unknown-unknowntarget - SpacetimeDB CLI
- Dioxus CLI:
cargo install dioxus-cli - Python 3.x with Django environment at
/home/dietrich/.envs/Solawis/current/bin/python
If you prefer to start services individually:
spacetime startspacetime publish --project-path server kommunikation/home/dietrich/.envs/Solawis/current/bin/python /home/dietrich/Projekte/Source/solawispielplatz/src/manage.py runservercargo run --package webhook-proxyRUSTFLAGS='--cfg getrandom_backend="wasm_js"' dx serve --package admin --platform webcd /home/dietrich/Projekte/Source/solawispielplatz
/home/dietrich/.envs/Solawis/current/bin/python src/manage.py sync_users_to_spacetimedb# Build all Rust components
make build
# Run tests
make test
# Sync users manually
make sync-users
# Reset database (DESTRUCTIVE!)
make reset-db
# Start documentation server
make dev-docs- Admin Web UI: http://localhost:8080
- Django Backend: http://localhost:8000
- Webhook Proxy: http://localhost:3002
- SpacetimeDB: http://localhost:3000
Complete documentation is available in the docs/ directory:
# Start documentation server
cd docs && mdbook serve --openIf you encounter port conflicts, check which services are running:
make statusView detailed logs for debugging:
make logs # Recent logs
make logs-follow # Real-time logsFor a complete clean restart:
make clean
make start