Project system brief
Production-ready serverless multi-tenant task REST API built in idiomatic Go with hexagonal architecture, dual-runtime execution (HTTP server & AWS Lambda ARM64 Graviton), cryptographic JWT RBAC, and automated schema migrations.
Product Context
Product Context
Production-ready serverless multi-tenant task REST API built in idiomatic Go with hexagonal architecture, dual-runtime execution (HTTP server & AWS Lambda ARM64 Graviton), cryptographic JWT RBAC, and automated schema migrations.
System Problem & Scope
System Problem & Scope
Engineering a high-throughput, low-latency multi-tenant task management backend capable of running seamlessly both as a long-running containerized HTTP service and as an ephemeral AWS Lambda serverless function without duplicating domain logic.
Engineering Constraints
Engineering Constraints
Enforcing absolute multi-tenant boundary isolation across repository adapters, managing database connection pooling under AWS Lambda burst concurrency, and achieving sub-15ms cold start initialization on 64-bit ARM Graviton.
System Architecture Flow
System Architecture Flow
Hexagonal clean architecture isolating pure domain ports from HTTP transport and persistence adapters, featuring a custom lexical SQL migration engine, token revocation cache, and zero-allocation API Gateway v2 event proxying.
Client API Ingress
Active StageJWT & RBAC Security Gate
Hexagonal Business Core
Tenant-Isolated Persistence
Standardized Response Marshalling
Client API Ingress
External HTTPS requests pass through Amazon API Gateway HTTP API v2 or standalone HTTP reverse proxy with TLS termination.
JWT & RBAC Security Gate
Cryptographic HS256 verification, sliding-window IP rate limiting, and role-based access validation before touching domain handlers.
Hexagonal Business Core
Domain task and auth services process business constraints with zero coupling to transport or storage mechanisms.
Tenant-Isolated Persistence
Executes parameterized PostgreSQL queries scoped strictly by tenant_id, with in-memory thread-safe fallback for local development.
Standardized Response Marshalling
Returns deterministic JSON envelopes and maps internal domain errors to RFC-compliant HTTP status codes in under 15ms.
Execution & Failure-Mode Explorer
How the architecture behaves under real faults
API Gateway routes HTTPS traffic to the Go handler, which verifies HS256 JWT claims and binds tenant context for downstream queries.
Key Engineering Contributions
Key Engineering Contributions
Architected pure Go domain interfaces and application services for multi-tenant task lifecycle and authentication. Engineered dual-runtime bootstrap adapters for standalone net/http servers and AWS Lambda Graviton execution. Implemented strict cryptographic JWT verification, sliding-window rate limiting, and defensive thread-safe in-memory fallback repositories.
Reliability & Integrity Guarantees
Reliability & Integrity Guarantees
Reliability is verified through 100% test pass rate across all domain packages, table-driven race detection, transactional PostgreSQL migrations, and OpenSpec specification validation.