How airqo-platform/airqo-frontend works
1. This is a frontend monorepo, not a single app.
The src/ directory contains multiple independently deployable client applications plus shared patterns and templates. The repo also includes deployment manifests, CI/CD workflows, and docs for operating the frontend fleet.
2. The main product surfaces are split by audience and use case.
- src/website: public marketing/content website
- src/platform: main analytics and self-service platform for individuals and organizations
- src/vertex: operational device/network management app, with extra admin and shipping flows
- src/vertex-desktop: Electron wrapper around Vertex for desktop/native integration
- src/mobile: Flutter mobile app
- src/beacon, src/calibrate: smaller product-specific web tools
- src/docs-website: Docusaurus-based documentation site
3. Most web apps follow the same high-level layering.
Routes and page shells live in the app router (app/), while business functionality is organized into feature modules (features/, modules/, or domain folders). Shared UI primitives, hooks, services, and utilities are split out into components/, shared/, core/, lib/, and services/ depending on the app.
4. src/platform and src/vertex are the core business applications.
They contain the richest domain logic: auth, dashboards, organizations, users, sites, devices, cohorts, roles/permissions, data export, data visualization, feedback, and map-based views. Vertex extends the platform model with more operational workflows like grids and shipping. Both use layered abstractions for API access, RBAC, layouts, and state management.
5. A key architectural boundary is the API proxy layer.
The Next.js apps expose internal routes under app/api/... that proxy or wrap calls to upstream AirQo APIs and external services. This isolates frontend code from backend URL details, centralizes auth/session handling, and enables server-side integration for things like Cloudinary uploads, Slack notifications, and generic external API forwarding.
6. Auth and authorization are cross-cutting concerns.
The platform/vertex apps have dedicated auth routes, session utilities, route guards, permission guards, and RBAC helpers. These determine which layouts, pages, and actions are available for different user roles and contexts. The architecture clearly separates public pages, authenticated dashboards, and admin/system pages.
7. State management is intentionally centralized for complex domains.
Platform/Vertex use combinations of Redux slices, query providers, and custom hooks to manage server data and UI state. Feature-specific hooks often sit next to domain modules, while shared stores handle cross-page concerns such as user context, selected locations, cohorts, devices, map settings, and theme preferences.
8. The public website is content- and SEO-heavy rather than app-heavy.
src/website is structured around content pages, marketing sections, and editorial/program pages. It includes strong support for analytics, localization, SEO metadata, sitemap/robots, and safe rendering. It also exposes a few API routes for geocoding, translation, logging, and versioned external access.
9. src/mobile is a separate Flutter client with its own architecture.
It uses the usual Flutter boundaries: lib/src/app/... split into blocs/cubits, repositories, services, widgets, and models. Its main domains are authentication, dashboard/forecast, exposure, maps, learn, surveys, profile, notifications, and shared utilities. It also integrates Firebase, secure storage, Hive, and push/logging helpers.
10. src/vertex-desktop is a native shell, not just another UI.
The Electron app adds desktop-specific responsibilities: auth windows, deep links, update management, permissions, menus, and preload APIs. This wrapper sits around the web experience and handles native platform concerns that do not belong in the browser app.
11. src/docs-website and src/beacon/src/calibrate are focused, standalone frontends.
The docs site is Docusaurus content with product documentation and API guides. Beacon and Calibrate are smaller operational apps with their own Next.js/React stacks and deployment configs, each using the same general pattern of page routes, services, and UI components.
12. Infrastructure is first-class in this repo.
k8s/ contains Helm charts for core deployables like platform, vertex, beacon, calibrate, and docs-website, including stage/prod values and AKS-specific overlays. The repo’s GitHub Actions workflows cover CI, code quality, previews, production deployments, Android release flows, and Firebase App Distribution.
13. The repo is optimized for multi-environment delivery.
Many apps have .env examples, Dockerfiles, docker-compose files, and environment-aware config layers. This supports local development, containerized builds, Kubernetes deployment, and platform-specific release channels without changing application code paths.
14. For an architecture diagram, the most important system boundary is “client app → service layer → API/external services.”
Each app’s UI layer talks to domain services/hooks/repositories, which in turn call internal API routes, upstream AirQo backend APIs, or third-party services such as Firebase, Cloudinary, Slack, analytics tools, and map/geocoding providers. That boundary is repeated across the web, desktop, and mobile clients, even though the UI technologies differ.
Main entry points: vertex Vertex · platform Platform · website Website · workflows CI/CD workflows
Components 24
Client apps
Deployable frontend applications and app templates under src/
- Website · Public content, SEO, and product storytelling site
src/website - Platform · Core self-service and analytics product for individuals and organizations
src/platform - Vertex · Operational device, network, cohort, grid, and shipping application
src/vertex - Beacon · Smaller device and maintenance-focused web application
src/beacon - Calibrate · Standalone calibration tool with its own client stack
src/calibrate - Docs site · Product and API documentation website
src/docs-website
Shared frontend systems
Reusable architecture, services, and cross-app primitives
- Vertex template · Reusable template and adapter foundation for Vertex-style apps
src/vertex-template - Site features · Marketing pages, product pages, solutions, and program content
src/website/src/features - Site services · Website API clients, external integrations, and content services
src/website/src/services - Site API routes · Next.js routes for geocoding, translation, logging, and versioned API forwarding
src/website/src/app/api - Platform modules · Analytics, map, data export, billing, themes, and profile features
src/platform/src/modules - Platform shared · Reusable UI, hooks, services, stores, layouts, auth, and utilities
src/platform/src/shared - Platform API · Internal routes that proxy auth, cloudinary, slack, and external APIs
src/platform/src/app/api - Vertex core · Adapters, auth, permissions, config, hooks, redux, services, and utilities
src/vertex/core - Vertex features · Admin and user-facing workflows for devices, cohorts, sites, networks, grids, shipping, and feedback
src/vertex/components/features - Vertex API · Internal routes that wrap auth, cloudinary, slack, and backend forwarding
src/vertex/app/api
Mobile
Flutter mobile client
- Mobile app · Native mobile application with bloc-driven feature modules
src/mobile
Desktop
Electron wrapper for the Vertex web experience
- Vertex desktop · Desktop wrapper around Vertex with native integration
src/vertex-desktop - Desktop main · Windows, auth, deep links, menus, permissions, and updates
src/vertex-desktop/main - Preload API · Preload layer exposing safe APIs to the renderer
src/vertex-desktop/preload
Delivery and ops
Kubernetes, CI/CD, and repository-level operational assets
- K8s charts · Helm charts and environment overlays for frontend deployments
k8s - CI/CD workflows · Build, preview, deploy, release, and quality workflows for all frontends
.github/workflows - Repo docs · Repository-level guidance for roles, operating model, and contributions
docs
Other components
- Frontend monorepo · Multi-app frontend repository with web, mobile, desktop, and deployment assets
Connections 30
- Frontend monorepo → Website: contains · Monorepo includes the public website client
- Frontend monorepo → Platform: contains · Monorepo includes the core platform client
- Frontend monorepo → Vertex: contains · Monorepo includes the Vertex operations client
- Frontend monorepo → Vertex template: contains · Monorepo includes the reusable Vertex template
- Frontend monorepo → Beacon: contains · Monorepo includes the Beacon client
- Frontend monorepo → Calibrate: contains · Monorepo includes the Calibrate client
- Frontend monorepo → Docs site: contains · Monorepo includes the docs website
- Frontend monorepo → Mobile app: contains · Monorepo includes the Flutter mobile app
- Frontend monorepo → Vertex desktop: contains · Monorepo includes the Electron desktop shell
- Website → Site features: renders · Route-driven pages are assembled from feature modules
- Website → Site services: fetches · Content and utility data comes from service layer
- Website → Site API routes: exposes · Website provides internal API routes for geocoding, translation, logging, and forwarding
- Platform → Platform modules: composes · App routes assemble product domain modules
- Platform → Platform shared: reuses · Shared core provides UI, hooks, state, and services
- Platform → Platform API: proxies · Platform isolates backend and third-party calls behind API routes
- Vertex → Vertex features: composes · App routes assemble operational feature modules
- Vertex → Vertex core: reuses · Core layer provides app-wide contracts, auth, state, and utilities
- Vertex → Vertex API: proxies · Vertex isolates backend and third-party calls behind API routes
- Vertex → Vertex desktop: wrapped by · Desktop app wraps the Vertex experience for native platform concerns
- Vertex desktop → Desktop main: implements · Main process owns windows, updates, menus, and deep links
- Vertex desktop → Preload API: bridges · Preload layer exposes safe desktop APIs to the renderer
- K8s charts → Platform: deploys · Helm charts define platform runtime deployment
- K8s charts → Vertex: deploys · Helm charts define Vertex runtime deployment
- K8s charts → Website: deploys · Helm charts define website deployment
- CI/CD workflows → Website: builds · Workflows cover website CI and deployment
- CI/CD workflows → Platform: builds · Workflows cover platform CI and deployment
- CI/CD workflows → Vertex: builds · Workflows cover Vertex CI, performance, and release flows
- CI/CD workflows → Mobile app: releases · Workflows cover Android release and Firebase distribution
- Repo docs → Platform: documents · Repo docs capture platform architecture and operations
- Repo docs → Vertex template: documents · Repo docs capture template contracts and coupling guidance