style: format remaining files
This commit is contained in:
34
README.md
34
README.md
@@ -52,16 +52,16 @@ Upstream APIs can fail transiently with `429` and `5xx` responses, so the app fa
|
|||||||
|
|
||||||
The codebase follows standard Go project layout conventions.
|
The codebase follows standard Go project layout conventions.
|
||||||
|
|
||||||
| Path | Purpose |
|
| Path | Purpose |
|
||||||
| --- | --- |
|
| ----------------- | ------------------------------------------------ |
|
||||||
| `api/*` | Feature routes: anime, auth, playback, watchlist |
|
| `api/*` | Feature routes: anime, auth, playback, watchlist |
|
||||||
| `cmd/server` | Application entrypoint and CLI commands |
|
| `cmd/server` | Application entrypoint and CLI commands |
|
||||||
| `integrations/*` | External API clients and scraping |
|
| `integrations/*` | External API clients and scraping |
|
||||||
| `internal/*` | Core services: db, middleware, server, worker |
|
| `internal/*` | Core services: db, middleware, server, worker |
|
||||||
| `pkg/middleware` | Generic HTTP middleware |
|
| `pkg/middleware` | Generic HTTP middleware |
|
||||||
| `templates/*` | Server-rendered HTML templates |
|
| `templates/*` | Server-rendered HTML templates |
|
||||||
| `migrations` | Schema evolution |
|
| `migrations` | Schema evolution |
|
||||||
| `static` / `dist` | Frontend assets |
|
| `static` / `dist` | Frontend assets |
|
||||||
|
|
||||||
## Getting started
|
## Getting started
|
||||||
|
|
||||||
@@ -108,13 +108,13 @@ docker exec mal ./cmd/user <username> <password>
|
|||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
| Variable | Default | Description |
|
| Variable | Default | Description |
|
||||||
| --- | --- | --- |
|
| ----------------------- | ------------------- | ----------------------------------------------------------- |
|
||||||
| `PORT` | `3000` | HTTP listen port |
|
| `PORT` | `3000` | HTTP listen port |
|
||||||
| `DATABASE_FILE` | `mal.db` | SQLite database file path |
|
| `DATABASE_FILE` | `mal.db` | SQLite database file path |
|
||||||
| `ENV` | _(empty)_ | Set to `production` to enable secure session cookies |
|
| `ENV` | _(empty)_ | Set to `production` to enable secure session cookies |
|
||||||
| `MIGRATIONS_DIR` | _(auto-discovered)_ | Optional explicit path to migration files |
|
| `MIGRATIONS_DIR` | _(auto-discovered)_ | Optional explicit path to migration files |
|
||||||
| `PLAYBACK_PROXY_SECRET` | _(required)_ | HMAC secret for signed playback proxy tokens (min 32 chars) |
|
| `PLAYBACK_PROXY_SECRET` | _(required)_ | HMAC secret for signed playback proxy tokens (min 32 chars) |
|
||||||
|
|
||||||
## Testing
|
## Testing
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Executables live here.
|
Executables live here.
|
||||||
|
|
||||||
| binary | purpose |
|
| binary | purpose |
|
||||||
| --- | --- |
|
| ------------ | ----------------- |
|
||||||
| `cmd/server` | web server |
|
| `cmd/server` | web server |
|
||||||
| `cmd/user` | user creation CLI |
|
| `cmd/user` | user creation CLI |
|
||||||
|
|||||||
12
sqlc.yaml
12
sqlc.yaml
@@ -1,12 +1,12 @@
|
|||||||
version: "2"
|
version: '2'
|
||||||
sql:
|
sql:
|
||||||
- engine: "sqlite"
|
- engine: 'sqlite'
|
||||||
queries: "internal/db/queries.sql"
|
queries: 'internal/db/queries.sql'
|
||||||
schema: "migrations/"
|
schema: 'migrations/'
|
||||||
gen:
|
gen:
|
||||||
go:
|
go:
|
||||||
package: "db"
|
package: 'db'
|
||||||
out: "internal/db"
|
out: 'internal/db'
|
||||||
emit_json_tags: true
|
emit_json_tags: true
|
||||||
emit_prepared_queries: false
|
emit_prepared_queries: false
|
||||||
emit_interface: true
|
emit_interface: true
|
||||||
|
|||||||
@@ -60,11 +60,11 @@
|
|||||||
--radius: 6px;
|
--radius: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-theme="light"] {
|
[data-theme='light'] {
|
||||||
color-scheme: light;
|
color-scheme: light;
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-theme="dark"] {
|
[data-theme='dark'] {
|
||||||
color-scheme: dark;
|
color-scheme: dark;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,17 +2,17 @@
|
|||||||
|
|
||||||
## Available Templates
|
## Available Templates
|
||||||
|
|
||||||
| Component | File | Purpose |
|
| Component | File | Purpose |
|
||||||
|-----------|------|---------|
|
| ----------------- | -------------------------- | -------------------------------------------- |
|
||||||
| Anime Card | `anime_card.gohtml` | Poster card with hover reveal |
|
| Anime Card | `anime_card.gohtml` | Poster card with hover reveal |
|
||||||
| Continue Watching | `continue_watching.gohtml` | Continue watching row |
|
| Continue Watching | `continue_watching.gohtml` | Continue watching row |
|
||||||
| Dropdown | `dropdown.gohtml` | Dropdown wrapper (also uses `<ui-dropdown>`) |
|
| Dropdown | `dropdown.gohtml` | Dropdown wrapper (also uses `<ui-dropdown>`) |
|
||||||
| Filter Bar | `filter_bar.gohtml` | Search + filters for browse |
|
| Filter Bar | `filter_bar.gohtml` | Search + filters for browse |
|
||||||
| Header | `header.gohtml` | Sticky header with nav |
|
| Header | `header.gohtml` | Sticky header with nav |
|
||||||
| Navigation | `navigation.gohtml` | Sidebar navigation |
|
| Navigation | `navigation.gohtml` | Sidebar navigation |
|
||||||
| Video Player | `video_player.gohtml` | Episode video container |
|
| Video Player | `video_player.gohtml` | Episode video container |
|
||||||
| Watchlist Actions | `watchlist_actions.gohtml` | Add/remove watchlist button |
|
| Watchlist Actions | `watchlist_actions.gohtml` | Add/remove watchlist button |
|
||||||
| Watch Order | `watch_order.gohtml` | Watch order queue |
|
| Watch Order | `watch_order.gohtml` | Watch order queue |
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
@@ -27,6 +27,7 @@ All components are exposed as Go templates. Import by name:
|
|||||||
## Props Convention
|
## Props Convention
|
||||||
|
|
||||||
Components accept a `dict` with named keys:
|
Components accept a `dict` with named keys:
|
||||||
|
|
||||||
- `dict "Key" .Value "Key2" .Value2`
|
- `dict "Key" .Value "Key2" .Value2`
|
||||||
|
|
||||||
This keeps prop names explicit and self-documenting.
|
This keeps prop names explicit and self-documenting.
|
||||||
|
|||||||
@@ -11,7 +11,5 @@
|
|||||||
"removeComments": false,
|
"removeComments": false,
|
||||||
"skipLibCheck": true
|
"skipLibCheck": true
|
||||||
},
|
},
|
||||||
"include": [
|
"include": ["static/*.ts"]
|
||||||
"static/*.ts"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user