26
docs/api-reference.md
Normal file
26
docs/api-reference.md
Normal 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
14
docs/architecture.md
Normal 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.
|
||||
20
docs/contribution-guide.md
Normal file
20
docs/contribution-guide.md
Normal 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.
|
||||
|
||||
Reference in New Issue
Block a user