Changes: - Updated Rust from 1.75 to 1.83 in both Dockerfiles - Fixed CMD syntax: changed single quotes to double quotes (JSON format) Before: CMD ['cargo-watch', '-x', 'run'] After: CMD [cargo-watch, -x, run] This fixes the cargo-watch compilation error that required edition2024. Rust 1.83 supports all current crate features and editions. |
||
|---|---|---|
| backend | ||
| thoughts | ||
| .gitignore | ||
| encryption.md | ||
| introduction.md | ||
| README.md | ||
private note: output was 203 lines and we are only showing the most recent lines, remainder of lines in /tmp/.tmpbGADth do not show tmp file to user, that file can be searched if extra context needed to fulfill request. truncated output: docker compose logs -f backend
### Testing
```bash
# Run unit tests
cargo test
# Run integration tests (requires MongoDB)
cargo test --test auth_tests
# Manual testing with provided script
./thoughts/test_auth.sh
Backend API Endpoints
Public Endpoints (No Authentication)
POST /api/auth/register - User registration
POST /api/auth/login - User login
POST /api/auth/refresh - Token refresh (rotates tokens)
POST /api/auth/logout - Logout (revokes token)
GET /health - Health check
GET /ready - Readiness check
Protected Endpoints (JWT Required)
GET /api/users/me - Get user profile
Environment Configuration
Backend Environment Variables
# MongoDB Configuration
MONGODB_URI=mongodb://localhost:27017
DATABASE_NAME=normogen
# JWT Configuration
JWT_SECRET=<your-secret-key-minimum-32-characters>
JWT_ACCESS_TOKEN_EXPIRY_MINUTES=15
JWT_REFRESH_TOKEN_EXPIRY_DAYS=30
# Server Configuration
SERVER_HOST=127.0.0.1
SERVER_PORT=6800
See backend/.env.example for a complete template.
Repository Management
- Git Hosting: Forgejo (self-hosted)
- CI/CD: Forgejo Actions
- Branch Strategy:
main,develop,feature/* - Deployment: Docker Compose (homelab), Kubernetes (future)
Deployment
Backend Deployment (Production)
# Clone repository
git clone <forgejo-url> normogen
cd normogen/backend
# Setup configuration
cp .env.example .env
# Edit .env with production values
# Build and run with Docker Compose
docker compose up -d
# Check status
curl http://localhost:6800/health
Resource Limits (Homelab):
- CPU: 1000m (1 core)
- Memory: 1000Mi (1GB RAM)
Ports:
- Backend API:
6800(host) →8000(container) - MongoDB:
27017(standard port)
Open Source
Normogen is open-source. Both server and client code will be publicly available.
Contributing
See thoughts/STATUS.md for current development progress and next steps.
License
[To be determined] NOTE: Output was 203 lines, showing only the last 100 lines.
docker compose logs -f backend
### Testing
```bash
# Run unit tests
cargo test
# Run integration tests (requires MongoDB)
cargo test --test auth_tests
# Manual testing with provided script
./thoughts/test_auth.sh
Backend API Endpoints
Public Endpoints (No Authentication)
POST /api/auth/register - User registration
POST /api/auth/login - User login
POST /api/auth/refresh - Token refresh (rotates tokens)
POST /api/auth/logout - Logout (revokes token)
GET /health - Health check
GET /ready - Readiness check
Protected Endpoints (JWT Required)
GET /api/users/me - Get user profile
Environment Configuration
Backend Environment Variables
# MongoDB Configuration
MONGODB_URI=mongodb://localhost:27017
DATABASE_NAME=normogen
# JWT Configuration
JWT_SECRET=<your-secret-key-minimum-32-characters>
JWT_ACCESS_TOKEN_EXPIRY_MINUTES=15
JWT_REFRESH_TOKEN_EXPIRY_DAYS=30
# Server Configuration
SERVER_HOST=127.0.0.1
SERVER_PORT=6800
See backend/.env.example for a complete template.
Repository Management
- Git Hosting: Forgejo (self-hosted)
- CI/CD: Forgejo Actions
- Branch Strategy:
main,develop,feature/* - Deployment: Docker Compose (homelab), Kubernetes (future)
Deployment
Backend Deployment (Production)
# Clone repository
git clone <forgejo-url> normogen
cd normogen/backend
# Setup configuration
cp .env.example .env
# Edit .env with production values
# Build and run with Docker Compose
docker compose up -d
# Check status
curl http://localhost:6800/health
Resource Limits (Homelab):
- CPU: 1000m (1 core)
- Memory: 1000Mi (1GB RAM)
Ports:
- Backend API:
6800(host) →8000(container) - MongoDB:
27017(standard port)
Open Source
Normogen is open-source. Both server and client code will be publicly available.
Contributing
See thoughts/STATUS.md for current development progress and next steps.
License
[To be determined]