Skip to main content

Architecture Overview

Grouple runs across four distinct infrastructure layers: AWS Amplify (frontend), AWS ECS (backend API), Supabase (database + serverless logic), and a dedicated EC2 instance (AI workers).

Infrastructure Diagram

Key Design Decisions

Why Supabase for backend logic? Supabase handles most business logic via database triggers and edge functions, keeping the ECS API lean. This means many operations (email sending, currency sync, settlement creation) happen automatically without hitting the API layer. Why a separate EC2 for AI workers? AI proposal generation and PDF extraction are long-running, resource-intensive tasks. Running them on a dedicated EC2 instance with PM2 keeps them isolated from the main API and allows independent scaling. Why ECS + EC2 (not Fargate)? Greater control over instance types and costs for a startup-scale workload.

Domain Structure