Architecture
Local Infrastructure
Emulation, hybrid development model, and local port layout.
Local Infrastructure & Emulation
Wordloop utilizes a hybrid local-first development model orchestrated via our custom ./dev CLI.
Instead of running the entire stack in heavy, monolithic Docker containers, we segment the environment:
- Infrastructure & Observability (Docker): Stateful services (Postgres, Pub/Sub emulator, Storage emulator) and telemetry tools (Aspire Dashboard) run in Docker.
- Application Services (Native): Code bases (
wordloop-core,wordloop-ml,wordloop-app,wordloop-docs) run natively on your host machine. We use file monitoring tools (airfor Go,uvicornfor Python, and Next.js dev server) to enable instant hot-reloading, bypassing the need to rebuild Docker images after every code change.
Local Port Architecture
To prevent port collisions, all services follow a well-structured port layout:
Application Services (Native)
| Service | Internal Target | Port | Tooling |
|---|---|---|---|
| wordloop-app | Next.js Frontend | 3000 | next dev |
| wordloop-docs | Fumadocs Site | 4000 | next dev |
| wordloop-core | Go REST API | 4002 | air (hot-reload) |
| wordloop-ml | Python API & Worker | 4003 | uvicorn (hot-reload) |
Infrastructure Spaces (Docker)
| Service | Image / Role | Port |
|---|---|---|
| Aspire Dashboard | Local Observability UI | 18888 |
| Postgres | postgres:15 | 5432 |
| Pub/Sub | cloud-sdk:emulators | 8085 |
| Storage (GCS) | oittaa/gcp-storage-emulator | 8086 |
- Statefulness: Postgres data is persisted in a local Docker volume (
db_data). Emulators spin up ephemerally. The Core service programmatically provisions required Pub/Sub topics and buckets on boot. - Bootstrapping: Use
./dev start allto bring up the Docker infra and native host services concurrently. Run./dev helpfor more granularity.
Environment Configuration
Configuration relies exclusively on environment variables injected at runtime. There are NO configuration files deployed with the containers. See individual service handbooks for specifics.