> ## Documentation Index
> Fetch the complete documentation index at: https://docs.a7manager.se/llms.txt
> Use this file to discover all available pages before exploring further.

# Technical stack

## Overview

|               |                                                                             |
| ------------- | --------------------------------------------------------------------------- |
| **Backend**   | Python 3.14, Django 5.2, Django REST Framework 3.15, PostgreSQL 16          |
| **Frontend**  | TypeScript 5.8 in strict mode, React 19, MUI v7, TanStack Query 5           |
| **Field app** | Separate offline-first PWA for inspectors, syncing to the same API          |
| **Ingestion** | Azure Data Factory into staging tables, then validate → dedup → upsert      |
| **Hosting**   | Docker Compose for local work, Azure Container Apps for shared environments |

***

## Backend

Django with Django REST Framework over a single PostgreSQL database. Authentication is JWT,
issued by `djangorestframework-simplejwt`.

| Package            | Role                                                           |
| ------------------ | -------------------------------------------------------------- |
| `drf-spectacular`  | Generates the OpenAPI schema the frontend types are built from |
| `django-filter`    | Server-side filtering behind the data grids                    |
| `django-treebeard` | Materialised-path trees for the product-group hierarchy        |
| `django-ratelimit` | Request throttling                                             |
| `gunicorn`         | WSGI server in the deployed images                             |

The backend is the only application-level writer. Both clients go through its API, and
authorisation is applied there rather than in the client.

***

## Frontend

React with TypeScript in strict mode, built by Vite.

| Package                      | Role                                                                |
| ---------------------------- | ------------------------------------------------------------------- |
| `@mui/material`              | Component library                                                   |
| `@mui/x-data-grid-pro`       | Data grids, with server-side filtering and sorting                  |
| `@mui/x-charts`              | The charts on the dashboard pages                                   |
| `@bryntum/scheduler-react`   | The drag-and-drop timeline on [Maintenance Planner](/pages/planner) |
| `@tanstack/react-query`      | Server state and caching                                            |
| `zustand`                    | Client state                                                        |
| `react-hook-form` with `zod` | Forms and validation                                                |

API types are **generated, not hand-written**: the frontend consumes types produced from the
backend's OpenAPI schema, so a backend contract change surfaces as a TypeScript compile
error rather than a runtime failure.

***

## Field app

Inspectors work in a separate progressive web app rather than the main application. It is
offline-first, holding its own local store and syncing to the same API when a connection is
available. See [Inspector app](/pages/inspector-app).

***

## Ingestion

Azure Data Factory loads delivered CSV files into staging tables, from which stored
procedures validate, deduplicate and upsert into the production tables. This path does not
go through the API, which is why its rules are enforced and documented separately — see
[How ingestion works](/data/ingestion).

***

## Hosting

Docker Compose locally; Azure Container Apps for the shared environments, with PostgreSQL as
a managed flexible server. See [Environments](/platform/environments) for the production
topology and how development differs.
