# Architecture

## Current implementation

The current public build is a dependency-free static application:

```text
Browser
 ├── index.html  semantic content and accessible controls
 ├── app.css     responsive visual system
 └── app.js      local interactions, live OpenStreetMap discovery, guest progress, local event queue
```

This is intentionally appropriate for the repository's existing GitHub Pages deployment. The location feature uses public Nominatim and Overpass endpoints at request time, then displays only source-linked OpenStreetMap category records. It does not create a ReduCycle facility database, nor infer item acceptance from a category tag.

## Planned service boundary

When verified locations, authenticated learning, or model inference are ready, the static client should call a server-side API. A maintainable implementation is React/TypeScript at the client boundary, FastAPI for Python-sensitive data/model work, and PostgreSQL for relational content. The proposed data relations are: `devices → device_categories`, `locations → location_categories`, `locations ↔ accepted_items`, `locations → location_verifications`, and `courses → lessons → quizzes → questions`.

No API key, database credential, user record, or admin path is present in the client build.
