How armour007/aura works
Project Type and Purpose
• This is a full-stack SaaS/platform called “AURA” that provides a trust protocol for autonomous systems.
• Backend: Go + Gin API server, verification engine, JWT auth, PostgreSQL.
• Frontend: SvelteKit + Tailwind dashboard for managing agents, rules, API keys, logs.
• Supporting infra: migrations, Docker Compose, Kubernetes manifests, Helm charts, observability (Prometheus, Grafana, Tempo), SDKs in Node/Python/Go.
File Structure Analysis
• Top-level:
• backend/ – Go server code, cmd entrypoints (migrate, server), migrations, internal packages (api, engine, utils), static OpenAPI spec.
• frontend/ – SvelteKit app (routes, components, lib), build config (Vite, Tailwind), Dockerfile.
• deploy/ – Docker Compose files, Helm chart, Kubernetes manifests, Grafana and OTEL collector configurations.
• sdks/ – codegen scripts and officially supported client libraries in Go, Node, Python.
• scripts/ – automation for smoke tests and quickstart.
• Patterns: monolithic API server (single binary), MVC-style API handlers, SQL migrations folder, microservice-style deployables (backend/frontend separately containerized), multi-environment infra config.
Key README Insights
• One HTTP API with versioning, idempotency, and authentication via JWT and hashed API keys.
• Verification engine applies rules (allow/deny, time windows) under /v1/verify.
• Observability baked in: /metrics (Prometheus), tracing (OpenTelemetry + Tempo), Grafana dashboards.
• CI/CD: GitHub Actions workflows for backend/frontend; Docker images published to GHCR; Kubernetes deployment via Helm.
a. Main Components
• Frontend (SvelteKit app)
• API Gateway / Ingress
• Backend API server (Go binary)
• PostgreSQL database
• Redis (optional for rate limiting/idempotency cache)
• OpenTelemetry Collector → Tempo (traces)
• Prometheus → Grafana (metrics/dashboards)
• SDK clients (Go, Node, Python) and external consumer systems (webhooks)
• CI/CD pipelines (GitHub Actions)
b. Relationships and Interactions
• User’s browser ←→ Frontend UI → API calls to Ingress → Backend
• Backend reads/writes to Postgres (migrations, audit logs, API keys, rules).
• Backend optionally reads/writes to Redis for rate limiting/idempotency.
• Backend emits metrics to Prometheus and spans to OTEL collector.
• Grafana dashboards query Prometheus/Tempo.
• SDK clients call /v1/verify on Backend.
• CI/CD pushes container images, deploys Helm chart to Kubernetes cluster.
c. Architectural Patterns & Principles
• Separation of concerns: UI vs API vs data store.
• 12-factor app (config via env vars, containerized services).
• Observability by design (metrics + tracing).
• Infrastructure as code (Helm + k8s manifests).
d. Key Technologies
• Go + Gin, PostgreSQL, SvelteKit, Tailwind CSS
• Docker / Docker Compose, Kubernetes, Helm
• OpenTelemetry, Prometheus, Grafana, Tempo
• GitHub Actions for CI/CD
• SDKs: Node, Python, Go