How invaderjmusic/royalties works
Royalties is an Express web app for recording music and product revenue, allocating it by contributor splits, and presenting earnings and payouts to users and administrators. Users log in to review royalties, sales, balances, and payouts; administrators manage users, releases, splits, royalties, sales, and transactions. Signup keys support account setup and password resets. The graph reflects the sampled server routes, domain logic, and database calls; admin page coverage and the daily exchange-rate capability are also documented, but unsampled frontend and scheduler wiring is not inferred.
Main entry points: index.js Express server · admin.js Admin routes · api.js User API · users.js Password and key logic
Components 17
Web application
- Express server
index.js - Contributor dashboard
dashboard - Admin console
admin - Signup and reset UI
public - Dashboard routes
routes/dashboard.js - Admin routes
routes/admin.js - User API
routes/api.js
Accounts and access
- Signup routes
routes/signup.js - Password and key logic
lib/users.js
Royalties and sales
- Royalty allocation
lib/royalties.js
Persistence and currency
- Exchange-rate service
lib/currency.js - EdgeDB access
lib/database.js
Other components
- Visitor
- Contributor
- Administrator
- EdgeDB
- Currency API
Connections 27
- Visitor → Express server: opens app
index.js - Express server → Password and key logic: checks login
index.js - Express server → Dashboard routes: mounts routes
index.js - Express server → Admin routes: mounts routes
index.js - Express server → User API: mounts routes
index.js - Express server → Signup routes: mounts routes
index.js - Express server → Exchange-rate service: starts rate fetch
index.js - Contributor → Contributor dashboard: views earnings
README.md - Administrator → Admin console: manages records
README.md - Visitor → Signup and reset UI: sets password
- Contributor dashboard → Dashboard routes: requests pages
routes/dashboard.js - Admin console → Admin routes: requests pages
routes/admin.js - Contributor dashboard → User API: requests data
README.md - Admin console → Admin routes: submits changes
routes/admin.js - Signup and reset UI → Signup routes: submits credentials
- Signup routes → Password and key logic: validates keys
routes/signup.js - Password and key logic → EdgeDB access: reads and writes users
lib/users.js - User API → EdgeDB access: queries account data
routes/api.js - User API → Password and key logic: updates password
routes/api.js - User API → Exchange-rate service: reads conversion rate
routes/api.js - Admin routes → EdgeDB access: manages records
routes/admin.js - Admin routes → Royalty allocation: allocates earnings
routes/admin.js - Admin routes → Password and key logic: creates reset key
routes/admin.js - Admin routes → Exchange-rate service: reads conversion rate
routes/admin.js - Royalty allocation → EdgeDB access: reads splits; writes earnings
lib/royalties.js - EdgeDB access → EdgeDB: queries and writes
lib/database.js - Exchange-rate service → Currency API: fetches USD-GBP
lib/currency.js