chore: sync
This commit is contained in:
28
docs/wiki/auth.md
Normal file
28
docs/wiki/auth.md
Normal file
@@ -0,0 +1,28 @@
|
||||
## Auth Module
|
||||
|
||||
### Module Description
|
||||
Handles user authentication, session management, and permission checks across the system.
|
||||
|
||||
### API Endpoints & Registration Flow
|
||||
|
||||
1. **POST /auth/login**
|
||||
- Purpose: Benutzerlogin über Session/Cookie
|
||||
- Auth: Keine
|
||||
- Payload: `{"username_or_email": "string", "password": "string"}`
|
||||
- Response: `{"user": {...}}`
|
||||
|
||||
2. **POST /auth/register/step1 ... /step3**
|
||||
- Mehrstufige Registrierung (Rasse → Avatar/Titel → Username/Email/Passwort)
|
||||
- Je Step wird der Draft gespeichert; Step3 erstellt Benutzer mit `activation_token` und nimmt `is_active=false` an, sofern `DEV_ENTWICKLUNG` nicht gesetzt ist.
|
||||
- Response: `201` mit `{ "status": "pending" }` (E-Mail-Link) oder `{ "status": "active", "user": {...} }` (Dev-Bypass).
|
||||
|
||||
3. **POST /auth/register/confirm**
|
||||
- Purpose: Aktivierung per Token-Link (`token` im Body oder Query)
|
||||
- Auth: Keine
|
||||
- Response: `{"user": {...}}` nach erfolgreicher Aktivierung.
|
||||
|
||||
4. **GET /auth/permissions**
|
||||
- Purpose: Berechtigungen abrufen (Session erforderlich)
|
||||
- Auth: Session
|
||||
- Payload: Keine
|
||||
- Response: `{"permissions": ["string"]}`
|
||||
18
docs/wiki/blueprints.md
Normal file
18
docs/wiki/blueprints.md
Normal file
@@ -0,0 +1,18 @@
|
||||
## Blueprints Module
|
||||
|
||||
### Module Description
|
||||
Defines and manages construction blueprints for planetary structures and facilities.
|
||||
|
||||
### API Endpoints
|
||||
|
||||
- **GET /blueprints**
|
||||
- *Purpose:* Retrieve list of available blueprints
|
||||
- *Auth:* Required (JWT token)
|
||||
- *Payload:* None
|
||||
- *Response:* `{"blueprints": [{"id": "int", "name": "string", "resource_cost": {"ore": "int", "crystal": "int"}}]}`
|
||||
|
||||
- **GET /blueprints/{id}**
|
||||
- *Purpose:* Retrieve detailed blueprint information
|
||||
- *Auth:* Required (JWT token)
|
||||
- *Payload:* None
|
||||
- *Response:* `{"id": "int", "name": "string", "description": "string", "resource_cost": {"ore": "int", "crystal": "int"}}`
|
||||
24
docs/wiki/build_queue.md
Normal file
24
docs/wiki/build_queue.md
Normal file
@@ -0,0 +1,24 @@
|
||||
## Build Queue Module
|
||||
|
||||
### Module Description
|
||||
Processes and manages construction queues for planetary structures and facilities.
|
||||
|
||||
### API Endpoints
|
||||
|
||||
- **GET /build/queue**
|
||||
- *Purpose:* Retrieve current build queue
|
||||
- *Auth:* Required (JWT token)
|
||||
- *Payload:* None
|
||||
- *Response:* `{"queue": [{"id": "int", "blueprint_id": "int", "status": "string"}]}`
|
||||
|
||||
- **POST /build/start**
|
||||
- *Purpose:* Start a new build
|
||||
- *Auth:* Required (JWT token)
|
||||
- *Payload:* `{"blueprint_id": "int", "planet_id": "int"}`
|
||||
- *Response:* `{"build_id": "int", "status": "string"}`
|
||||
|
||||
- **DELETE /build/cancel**
|
||||
- *Purpose:* Cancel a build
|
||||
- *Auth:* Required (JWT token)
|
||||
- *Payload:* `{"build_id": "int"}`
|
||||
- *Response:* `{"status": "string"}`
|
||||
18
docs/wiki/economy.md
Normal file
18
docs/wiki/economy.md
Normal file
@@ -0,0 +1,18 @@
|
||||
## Economy Module
|
||||
|
||||
### Module Description
|
||||
Manages in-game economic transactions, resource management, and market interactions.
|
||||
|
||||
### API Endpoints
|
||||
|
||||
- **GET /economy/state**
|
||||
- *Purpose:* Retrieve current economic state
|
||||
- *Auth:* Required (JWT token)
|
||||
- *Payload:* None
|
||||
- *Response:* `{"credits": "int", "resources": {"ore": "int", "crystal": "int"}}`
|
||||
|
||||
- **POST /economy/transaction**
|
||||
- *Purpose:* Execute resource transaction
|
||||
- *Auth:* Required (JWT token)
|
||||
- *Payload:* `{"type": "string", "amount": "int", "target": "string"}`
|
||||
- *Response:* `{"status": "string", "transaction_id": "string"}`
|
||||
10
docs/wiki/index.md
Normal file
10
docs/wiki/index.md
Normal file
@@ -0,0 +1,10 @@
|
||||
## Module Overview
|
||||
|
||||
- [Auth Module](auth.md): Handles user authentication and permissions.
|
||||
- [Economy Module](economy.md): Manages in-game economy and transactions.
|
||||
- [Build Queue Module](build_queue.md): Processes and manages construction queues.
|
||||
- [Planet Generator Module](planet_generator.md): Generates planetary environments.
|
||||
- [Blueprints Module](blueprints.md): Defines and manages construction blueprints.
|
||||
- [Permissions Module](permissions.md): Controls access and permissions across the system.
|
||||
|
||||
For detailed information about each module, refer to their respective pages.
|
||||
24
docs/wiki/permissions.md
Normal file
24
docs/wiki/permissions.md
Normal file
@@ -0,0 +1,24 @@
|
||||
## Permissions Module
|
||||
|
||||
### Module Description
|
||||
Controls access management and permission definitions across the system.
|
||||
|
||||
### API Endpoints
|
||||
|
||||
- **GET /permissions/list**
|
||||
- *Purpose:* Retrieve all defined permissions
|
||||
- *Auth:* Required (JWT token with `permission.read`)
|
||||
- *Payload:* None
|
||||
- *Response:* `{"permissions": ["string"]}`
|
||||
|
||||
- **POST /permissions/grant**
|
||||
- *Purpose:* Assign a permission to a user
|
||||
- *Auth:* Required (JWT token with `permission.write`)
|
||||
- *Payload:* `{"user_id": "int", "permission": "string"}`
|
||||
- *Response:* `{"status": "string"}`
|
||||
|
||||
- **DELETE /permissions/revoke**
|
||||
- *Purpose:* Remove a permission from a user
|
||||
- *Auth:* Required (JWT token with `permission.write`)
|
||||
- *Payload:* `{"user_id": "int", "permission": "string"}`
|
||||
- *Response:* `{"status": "string"}`
|
||||
18
docs/wiki/planet_generator.md
Normal file
18
docs/wiki/planet_generator.md
Normal file
@@ -0,0 +1,18 @@
|
||||
## Planet Generator Module
|
||||
|
||||
### Module Description
|
||||
Generates planetary environments with unique characteristics and resources.
|
||||
|
||||
### API Endpoints
|
||||
|
||||
- **GET /planet/generate**
|
||||
- *Purpose:* Generate new planet data
|
||||
- *Auth:* Required (JWT token with `planet.generate` permission)
|
||||
- *Payload:* `{"class": "string", "size": "string"}`
|
||||
- *Response:* `{"planet_id": "int", "resources": {"ore": "int", "crystal": "int"}, "climate": "string"}`
|
||||
|
||||
- **GET /planet/detail**
|
||||
- *Purpose:* Retrieve planet details
|
||||
- *Auth:* Required (JWT token)
|
||||
- *Payload:* `{"planet_id": "int"}`
|
||||
- *Response:* `{"planet_id": "int", "class": "string", "resources": {"ore": "int", "crystal": "int"}, "climate": "string"}`
|
||||
Reference in New Issue
Block a user