M0
Some checks failed
CI / validate (push) Has been cancelled

This commit is contained in:
2026-03-22 23:33:24 -05:00
parent 27dac51b5c
commit 177be6332b
47 changed files with 7287 additions and 0 deletions

26
docs/api-reference.md Normal file
View File

@@ -0,0 +1,26 @@
# API Reference
## `GET /healthz`
Returns:
```json
{ "status": "ok" }
```
## `GET /api/player`
Returns the current seed profile.
## `POST /api/player`
Accepts a partial profile payload and returns the updated profile.
## `GET /api/missions`
Returns seeded missions.
## `POST /api/missions/:id/complete`
Marks a mission complete and returns the XP reward.

14
docs/architecture.md Normal file
View File

@@ -0,0 +1,14 @@
# Architecture
## Current Baseline
- `client/` hosts the React application and game shell.
- `server/` hosts the Express API, production static asset serving, and future persistence services.
- `docker/` contains a single-container production build and local compose entrypoint.
## Immediate Direction
- M0 keeps the game scene intentionally simple.
- M1 replaces the placeholder canvas renderer with a Matter.js-driven absorber loop.
- Persistence is currently in-memory and will move to SQLite during M3.
- Production packaging now uses one container that serves both the API and built client from Express.

View File

@@ -0,0 +1,20 @@
# Contribution Guide
## Setup
1. Install Node.js 20+.
2. Run `npm install`.
3. Run `npm run dev`.
4. Run `npm run docker-up` to verify the single-container path.
## Expectations
- Keep client gameplay code under `client/src/game`.
- Keep API and persistence code under `server/src`.
- Keep production assumptions aligned with the single-container deployment model.
- Prefer small milestone-focused changesets.
## CI Baseline
The repo includes a first-pass workflow that runs install, lint, test, build, and Docker build checks on pushes and pull requests.