docs(react_frontend): add comprehensive documentation & AGENTS.md
- docs/README.md: overview and table of contents - docs/tech_stack.md: full dependency inventory and design decisions - docs/project_structure.md: directory tree with conventions - docs/architecture.md: data flow, layer responsibilities, key patterns - docs/routing.md: route table, code splitting, discover categories - docs/state_management.md: Zustand stores and React Query conventions - docs/api_layer.md: all API modules with endpoint mappings - docs/components.md: layout, entries, collections, charts, dialogs, UI primitives - docs/pages.md: all 16 pages with features and routes - docs/styling.md: theming, CSS tokens, responsive breakpoints, animations - AGENTS.md: architecture summary, code conventions, data flow, key files
This commit is contained in:
1 parent
6bff2055b4
commit
d28b4caa7e
14 files changed
+1266
-78
No files matched your search
@@ -22,6 +22,8 @@
|
||||
12. [Settings](#12-settings)
|
||||
13. [Maintenance](#13-maintenance)
|
||||
14. [Killer (Debug)](#14-killer-debug)
|
||||
15. [TMDB Proxy — Entries](#15-tmdb-proxy--entries)
|
||||
16. [TMDB Proxy — People](#16-tmdb-proxy--people)
|
||||
|
||||
---
|
||||
|
||||
@@ -903,6 +905,19 @@ Get all credits (roles) for a person.
|
||||
|
||||
---
|
||||
|
||||
### `GET /api/v1/people/:id/tmdb-filmography`
|
||||
|
||||
Get the full combined filmography for a person directly from TMDB (includes entries not in the local library).
|
||||
|
||||
| Parameter | In | Type | Required | Description |
|
||||
| --------- | ---- | ------- | -------- | ----------- |
|
||||
| `id` | path | integer | yes | Person ID |
|
||||
|
||||
**Response** `200` — TMDB combined credits object (`{ cast: [...], crew: [...] }`).
|
||||
**Response** `404` — Person not found or missing TMDB ID.
|
||||
|
||||
---
|
||||
|
||||
### `POST /api/v1/people/:id/media`
|
||||
|
||||
Upload a profile picture for a person.
|
||||
@@ -1014,6 +1029,20 @@ Get monthly watch count (number of items watched) for a given year.
|
||||
|
||||
---
|
||||
|
||||
### `GET /api/v1/statistics/watch-weekday`
|
||||
|
||||
Get watch count grouped by day of the week (1 = Sunday … 7 = Saturday).
|
||||
|
||||
**Response** `200`
|
||||
```json
|
||||
{
|
||||
"episodes": [{ "day": 2, "count": 120 }, { "day": 7, "count": 45 }],
|
||||
"movies": [{ "day": 6, "count": 15 }]
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 12. Settings
|
||||
|
||||
### `GET /api/v1/settings`
|
||||
@@ -1100,6 +1129,103 @@ Intentionally crashes the backend process (used by Electron to manage the backen
|
||||
|
||||
---
|
||||
|
||||
## 15. TMDB Proxy — Entries
|
||||
|
||||
These endpoints proxy requests to the TMDB API through the backend, enabling discovery features in the frontend without exposing the TMDB API key to the client.
|
||||
|
||||
### `GET /api/v1/entries/tmdb/trending/:type`
|
||||
|
||||
Get trending entries from TMDB.
|
||||
|
||||
| Parameter | In | Type | Required | Description |
|
||||
| --------- | ----- | ------- | -------- | ------------------------ |
|
||||
| `type` | path | string | yes | `movie` or `tv` |
|
||||
| `page` | query | integer | no | Page number (default: 1) |
|
||||
|
||||
**Response** `200` — TMDB paginated response (`{ page, results, total_pages, total_results }`).
|
||||
|
||||
---
|
||||
|
||||
### `GET /api/v1/entries/tmdb/popular/:type`
|
||||
|
||||
Get popular entries from TMDB.
|
||||
|
||||
| Parameter | In | Type | Required | Description |
|
||||
| --------- | ----- | ------- | -------- | ------------------------ |
|
||||
| `type` | path | string | yes | `movie` or `tv` |
|
||||
| `page` | query | integer | no | Page number (default: 1) |
|
||||
|
||||
**Response** `200` — TMDB paginated response.
|
||||
|
||||
---
|
||||
|
||||
### `GET /api/v1/entries/tmdb/top-rated/:type`
|
||||
|
||||
Get top-rated entries from TMDB.
|
||||
|
||||
| Parameter | In | Type | Required | Description |
|
||||
| --------- | ----- | ------- | -------- | ------------------------ |
|
||||
| `type` | path | string | yes | `movie` or `tv` |
|
||||
| `page` | query | integer | no | Page number (default: 1) |
|
||||
|
||||
**Response** `200` — TMDB paginated response.
|
||||
|
||||
---
|
||||
|
||||
### `GET /api/v1/entries/tmdb/upcoming/movie`
|
||||
|
||||
Get upcoming movies from TMDB.
|
||||
|
||||
| Parameter | In | Type | Required | Description |
|
||||
| --------- | ----- | ------- | -------- | ------------------------ |
|
||||
| `page` | query | integer | no | Page number (default: 1) |
|
||||
|
||||
**Response** `200` — TMDB paginated response.
|
||||
|
||||
---
|
||||
|
||||
### `GET /api/v1/entries/tmdb/search`
|
||||
|
||||
Search TMDB for movies and TV series (multi-search).
|
||||
|
||||
| Parameter | In | Type | Required | Description |
|
||||
| --------- | ----- | ------- | -------- | ------------------------ |
|
||||
| `query` | query | string | yes | Search term |
|
||||
| `page` | query | integer | no | Page number (default: 1) |
|
||||
|
||||
**Response** `200` — TMDB paginated response.
|
||||
**Response** `400` — Missing `query` parameter.
|
||||
|
||||
---
|
||||
|
||||
## 16. TMDB Proxy — People
|
||||
|
||||
### `GET /api/v1/people/tmdb/popular`
|
||||
|
||||
Get popular people from TMDB.
|
||||
|
||||
| Parameter | In | Type | Required | Description |
|
||||
| --------- | ----- | ------- | -------- | ------------------------ |
|
||||
| `page` | query | integer | no | Page number (default: 1) |
|
||||
|
||||
**Response** `200` — TMDB paginated response of person objects.
|
||||
|
||||
---
|
||||
|
||||
### `GET /api/v1/people/tmdb/search`
|
||||
|
||||
Search TMDB for people by name.
|
||||
|
||||
| Parameter | In | Type | Required | Description |
|
||||
| --------- | ----- | ------- | -------- | ------------------------ |
|
||||
| `query` | query | string | yes | Search term |
|
||||
| `page` | query | integer | no | Page number (default: 1) |
|
||||
|
||||
**Response** `200` — TMDB paginated response of person objects.
|
||||
**Response** `400` — Missing `query` parameter.
|
||||
|
||||
---
|
||||
|
||||
## Error Responses
|
||||
|
||||
All endpoints use a global error-handling middleware. Common shapes:
|
||||
|
||||
@@ -310,8 +310,8 @@ Polymorphic asset table. The target entity is identified by the `(mediaable, med
|
||||
| `is_local` | BOOLEAN | True if stored locally |
|
||||
| `is_selected` | BOOLEAN | DEFAULT false — currently active asset |
|
||||
| `is_custom` | BOOLEAN | DEFAULT false — user-uploaded |
|
||||
| `is_favorit` | BOOLEAN | DEFAULT false |
|
||||
|
||||
| `is_favorit` | BOOLEAN | DEFAULT false | | `createdAt` | DATETIME | Sequelize-managed |
|
||||
| `updatedAt` | DATETIME | Sequelize-managed |
|
||||
---
|
||||
|
||||
## 3. Entity Relationship Diagram
|
||||
|
||||
Reference in new issue
Block a user