Architecture
Wizarr uses a traditional client-server design, with a dedicated database for data persistence. The frontend clients communicate with backend services over HTTP using REST APIs. Below is a high level diagram of the architecture.
High Level Diagram
Insert PHOTO Here
The diagram shows clients communicating with the server's API via REST. The server communicates with downstream systems (i.e. Redis, Postgres, file system) through repository interfaces.
Clients
Web Client
The web app is a TypeScript project that uses Vue.js and Tailwindcss.
Server
The Wizarr backend is divided into several services, which are run as individual docker containers.
wizarr-server
- Handle and respond to REST API requests and hosts the web clientpostgres
- Persistent data storageredis
- Queue management forwizarr-server
Wizarr Server
The Wizarr Server is a TypeScript project written for Node.js. It uses the Koa.js framework, with TypeORM for database management. The server codebase also loosely follows the MVP Architecture.
REST Endpoints
The server is a list of HTTP endpoints and associated handlers (controllers). Each controller usually implements the following CRUD operations:
POST
/<type>
- CreateGET
/<type>
- Read (all)GET
/<type>/:id
- Read (by id)PUT
/<type>/:id
- Updated (by id)DELETE
/<type>/:id
- Delete (by id)
DTOs
The server uses Domain Transfer Objects as public interfaces for the inputs (query, params, and body) and outputs (response) for each endpoint. DTOs translate to OpenAPI schemas and control the generated code used by each client.
Postgres
Wizarr persists data in Postgres, which includes information about access and authorization, users, settings, etc.
See Database Migrations for more information about how to modify the database to create an index, modify a table, add a new column, etc.
Redis
Wizarr uses Redis via BullMQ to manage job queues. Some jobs trigger subsequent jobs.