docs: add project documentation and work log

This commit is contained in:
Andre Beging
2026-01-29 10:17:37 +01:00
parent 2032dcd6ee
commit 77a3d9ed9c
2 changed files with 71 additions and 0 deletions

41
README.md Normal file
View File

@@ -0,0 +1,41 @@
# ASTRAIN
ASTRAIN is a dark-mode, mobile-first workout logbook. It runs a Blazor WebAssembly frontend and an ASP.NET Core minimal API backend (both on .NET 10) in a single container. The API is served under `/api`, while the UI is served at `/`.
## Features
- Exercises and routines management
- Routine runs with last-run weights
- User identification via 8-character key in the URL
- SQLite storage via Entity Framework Core
## Local development
### Run API (serves UI when published)
1. Restore/build:
- `dotnet restore`
2. Run the API:
- `dotnet run --project src/ASTRAIN.Api/ASTRAIN.Api.csproj`
### Run Client (for UI-only development)
- `dotnet run --project src/ASTRAIN.Client/ASTRAIN.Client.csproj`
## Docker
Build and run the single-container setup:
- `docker compose up --build`
The app will be available at http://localhost:8080
## URLs
- `/exercises` or `/{userId}/exercises`
- `/routines` or `/{userId}/routines`
Opening a URL without a user id will generate a new user and redirect to `/{userId}/routines`.
## Data
SQLite database file is stored in `src/ASTRAIN.Api/Data/astrain.db` (or `/app/Data/astrain.db` in Docker).

30
docs/prompt-log.md Normal file
View File

@@ -0,0 +1,30 @@
# ASTRAIN Work Log
Date: 2026-01-29
## Summary
- Created a .NET 10 solution with a Blazor WebAssembly client, ASP.NET Core minimal API backend, and shared models.
- Implemented SQLite storage via EF Core and user ID creation/ensure flow (8-char alphanumeric key).
- Added API endpoints for users, exercises, routines, and routine runs under `/api`.
- Built a dark, mobile-first UI with bottom navigation, routines/exercises pages, and routine run view.
- Added PWA assets (manifest, app icons) and splash/loading screen.
- Added Dockerfile and docker-compose for single-container hosting and documentation.
## Key Features Implemented
- Routes: `/exercises`, `/{userId}/exercises`, `/routines`, `/{userId}/routines`.
- User creation/redirect when missing.
- Exercises: list/add/edit.
- Routines: list/add/edit, start run, save run, last-run weight preload.
- Run UI: checkboxes for completion, weight input with `kg` suffix, completed highlight.
- UI: red/white theme, centered + buttons, nav refinement, top brand header.
- PWA: `manifest.json`, icon/splash with `logo_square.png`.
## Docker
- Single container serves API at `/api` and the client at `/` (published WASM static files).
## Files of Interest
- Client: `src/ASTRAIN.Client`
- API: `src/ASTRAIN.Api`
- Shared: `src/ASTRAIN.Shared`
- Docker: `src/ASTRAIN.Api/Dockerfile`, `docker-compose.yml`
- PWA: `src/ASTRAIN.Client/wwwroot/manifest.json`