System Architecture
How the web app, API, database, workers, and AWS connections fit together
Components
- Web app: Next.js and React display workspace-scoped inventory, findings, topology, and discovery progress.
- Authentication and data: Supabase supplies authentication and PostgreSQL. Database row-level security scopes user reads to workspace membership.
- API: Flask validates user JWTs and handles AWS operations, setup, and async work.
- Workers: Celery runs discovery and analysis outside the browser request. Redis supplies the task broker, job leases, and operational aggregates.
- Scheduler: Celery Beat dispatches periodic jobs. A leader lease prevents multiple scheduler instances from publishing the same schedule concurrently.
Connection and discovery flow
- A user creates or joins a workspace and chooses a project for a connection.
- The setup wizard generates a CloudFormation template with project-specific External ID and access-bundle settings.
- The customer deploys the role in AWS. Organization connections use a management role and a StackSet for selected members.
- CloudWrangler verifies the saved connection through AWS STS and queues its initial discovery.
- Workers persist check progress and results in PostgreSQL.
- The browser displays available results and can retry failed checks without rerunning successful ones.
Discovery keeps running when the user leaves the page. Runtime varies with workload size, AWS API limits, and queue availability.
Scheduled work
| Task | Schedule (UTC) | Purpose |
|---|---|---|
| Stale-account verification | Every six hours | Recheck stale connections |
| Account verification | Daily at 02:00 | Recheck saved account access |
| Workspace automation | Daily at 04:00 | Refresh cost findings, inventory, topology, and configured notifications |
| Quota catalogue discovery | Sunday at 01:00 | Refresh the AWS quota catalogue |
Initial checks are queued after verification, and users can trigger additional work in the app. These schedules describe dispatch times, not guaranteed completion times.
Traffic analysis additionally requires VPC Flow Logs and its service integration. The traffic views load or refresh results from the configured AWS data sources; there is no general six-hour flow-log refresh schedule in Celery Beat.
Data access and permissions
- Workspaces are the tenancy boundary. AWS accounts and projects belong to a workspace.
- User-context database clients enforce RLS. Privileged worker/service operations use explicit service clients and validate the queued workspace/account scope.
- AWS access uses assumed IAM roles with an External ID; no customer access-key entry is needed for connection setup.
- Core discovery uses read-only AWS operations. Review the selected bundle's generated template and policies; optional service integrations have separate permissions.
- Production web/API traffic uses HTTPS. Sensitive stored integration values use the application's credential-encryption mechanism; database/storage encryption and backups are also deployment configuration responsibilities.
Reliability and performance
Background steps use bounded retries and durable status. Leases and delivery claims prevent stale workers from committing over newer work. Partial discovery results remain available while failed checks are retried.
Workspace/user-scoped browser caches share sidebar reads. API latency aggregates and opt-in browser timing measurements help identify regressions by route, release, and workload size. Measurements do not substitute for the persisted discovery status shown to the user.