Architecture
Overview
Arcadia is made of 2 main parts: the site's API and a tracker. The site's API is meant to be used by the frontend, while the tracker is meant to be used by torrent clients (qbittorrent, deluge, etc.).
Backend
Arcadia's backend is a REST API written in rust with the actix framework and the sqlx database driver. It also uses PostgreSQL as its database.
Code Structure
API calls are forwarded to handlers
, database requests are done by repositories
, objects are defined by models
. Directories with those names contain the relevant code.
A swagger for the API is available at http://localhost:8080/swagger-ui/
Frontend
Arcadia's frontend is a SPA written in TypeScript and uses the Vue.js framework with PrimeVue components, Vite builds it.
API Schema Updates
If you make changes to structs that are listed in the swagger, you must regenerate the typescript interfaces with this command (from the frontend directory, while the backend is running):
npx openapi-typescript http://127.0.0.1:8080/swagger-json/openapi.json -o ./src/api-schema/schema.d.ts