Skip to content

Commit 4cda015

Browse files
authored
Merge pull request #384 from lklynet/feature/docs-refresh
Refresh docs navigation and add user guide
2 parents a61c31e + e28cee1 commit 4cda015

13 files changed

Lines changed: 1135 additions & 195 deletions

DEVELOPMENT.md

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
# Development
2+
3+
This file is for contributors and maintainers working on Aurral locally. For normal installation and first-run setup, use [README.md](README.md).
4+
5+
## Requirements
6+
7+
- Node.js compatible with the repo dependencies. The Docker image uses Node 26 Alpine.
8+
- npm
9+
- A reachable Lidarr instance for integration-heavy workflows
10+
11+
Install dependencies:
12+
13+
```bash
14+
npm install
15+
```
16+
17+
## Local App
18+
19+
Run backend and frontend together:
20+
21+
```bash
22+
npm run dev
23+
```
24+
25+
This starts:
26+
27+
- Backend: `http://localhost:3001`
28+
- Frontend dev server: `http://localhost:3000`
29+
30+
The frontend proxies `/api` and `/ws` to the backend.
31+
32+
Run only the backend:
33+
34+
```bash
35+
npm run dev:backend
36+
```
37+
38+
Run only the frontend:
39+
40+
```bash
41+
npm run dev:frontend
42+
```
43+
44+
Build the frontend:
45+
46+
```bash
47+
npm run build
48+
```
49+
50+
Start the production server after building:
51+
52+
```bash
53+
npm start
54+
```
55+
56+
## Checks
57+
58+
Run tests:
59+
60+
```bash
61+
npm test
62+
```
63+
64+
Run frontend lint:
65+
66+
```bash
67+
npm run lint --workspace frontend
68+
```
69+
70+
Build a local Docker image:
71+
72+
```bash
73+
npm run docker:build
74+
```
75+
76+
Run a local Docker image:
77+
78+
```bash
79+
npm run docker:run
80+
```
81+
82+
## Repository Layout
83+
84+
```text
85+
backend/
86+
config/ SQLite, settings, encryption, sessions, constants
87+
middleware/ auth, permissions, cache, validation, URL validation
88+
routes/ API route groups
89+
services/ Lidarr, discovery, metadata, images, flows, Soulseek, Navidrome
90+
scripts/ maintenance scripts
91+
frontend/
92+
src/
93+
components/ shared UI components
94+
contexts/ auth, theme, toast
95+
hooks/ websocket, volume, page hooks
96+
pages/ Discover, Library, Flow, Settings, Requests, etc.
97+
utils/ API client and helpers
98+
lib/ version resolution helpers
99+
scripts/ release helper scripts
100+
.tests/ node:test suites
101+
web/ static public helper pages
102+
```
103+
104+
## Architecture Notes
105+
106+
Aurral is a single deployable web app:
107+
108+
- Express serves `/api/*`, WebSockets, stream endpoints, and the built React frontend.
109+
- React/Vite provides the app UI and PWA support.
110+
- SQLite stores durable state.
111+
- Lidarr remains the source of truth for the main music library.
112+
- Aurral-generated flow files are kept in a separate downloads/output tree.
113+
- WebSocket channels push discovery updates, download statuses, and flow status changes to connected clients.
114+
115+
Main backend route groups:
116+
117+
| Route prefix | Purpose |
118+
|---|---|
119+
| `/api/health` | Liveness, bootstrap, app version, auth state, integration status, WebSocket stats. |
120+
| `/api/onboarding` | First-run setup before onboarding is complete. |
121+
| `/api/auth` | Login, logout, and current user. |
122+
| `/api/users` | User management, account settings, listening history, Lidarr defaults, discover layout. |
123+
| `/api/settings` | Admin settings, logs, Lidarr profile/tag lookups, connection tests, notifications. |
124+
| `/api/search` | Catalog and artist search. |
125+
| `/api/artists` | Artist details, images, similar artists, previews, release groups, overrides. |
126+
| `/api/library` | Lidarr library artists, albums, tracks, stream, lookup, downloads, refresh, delete. |
127+
| `/api/discover` | Recommendations, refresh, tags, blocklist, preferences, feedback, nearby shows. |
128+
| `/api/requests` | Normalized Lidarr queue/history request tracking. |
129+
| `/api/weekly-flow` | Flows, imported playlists, jobs, worker settings, downloads, status, artwork. |
130+
| `/api/image-proxy` | Cached/proxied external images. |
131+
132+
Periodic backend work includes:
133+
134+
- Due flow refreshes
135+
- Pending flow worker jobs
136+
- Incomplete imported playlist retries
137+
- Expired sessions
138+
- Stale discovery cache refreshes
139+
- Download status broadcasts
140+
- Flow status broadcasts

0 commit comments

Comments
 (0)