Skip to main content

Technology Stack

AttributeValue
ProjectOpen Projects Hub
Version1.1
StatusAccepted

Overview​

This document defines the technology choices for the Open Projects Hub, organized by system layer. Each technology selection aligns with MVP delivery constraints, team expertise, and Clean Architecture principles.

Technology Stack Matrix​

ComponentSelected TechnologyDescription
Frontend
FrameworkReact 19 + TypeScript 5Component-based UI framework with type safety for freelancer and client-review workflows
UI LibraryAnt Design v6Accessible, production-ready component library for rapid MVP delivery
State ManagementRedux Toolkit + RTK QueryPredictable state container and server-state cache for refinement and approval flows
Build ToolVite 7Fast development server and optimized production builds
TestingVitest + React Testing LibraryUnit and component testing with fast feedback loops
E2E TestingPlaywrightEnd-to-end testing for critical user workflows
Backend
FrameworkFastAPI (Python 3.12), Gunicorn + Uvicorn workersModern async framework with OpenAPI generation and Clean Architecture compatibility
Data ValidationPydanticRequest/response validation with strong typing
ORMSQLAlchemyPersistence layer abstraction in infrastructure layer following repository pattern
TestingPytestUnit and integration testing with fixtures and mocking support
ContainerizationDocker (multi-stage)Multi-stage builds for reproducible deployments
Authentication
Auth ModuleCustom FastAPI + JWTInternal bounded context handling user identity, login, and token issuance
Password HashingbcryptSecure password storage with industry-standard hashing
Token ManagementPyJWTJWT generation and validation for stateless authentication
AuthorizationBackend role checks + workspace-scoped queriesAPI-layer role validation; every repository query is filtered by the caller's workspace
Data & Storage
DatabasePostgreSQL 15 (container)Relational database with ACID guarantees, run by Docker Compose on the API host with data on an EBS volume (ADR-021)
MigrationsAlembicVersioned schema migrations, applied when the API container starts
File StorageNoneMarkdown exports are generated on request; nothing is stored as a file
Infrastructure
Frontend HostingCloudflare Workers (static assets)Global edge hosting of the Vite build, HTTPS and DNS by Cloudflare (ADR-022)
Backend HostingAWS EC2 t3.micro + Docker ComposeOne host runs Caddy, the API and PostgreSQL; Cloudflare proxies api-oph.alonsovndev.com to it
NetworkingCloudflare proxy + Security GroupPort 443 is open only to Cloudflare IPv4 ranges; Caddy routes only /v1/*
SecretsAWS SSM Parameter StoreSecureString parameters read by the deploy script (ADR-011)
EmailResend (SMTP relay)Verification and password-reset codes (ADR-024)
IaCTerraformEC2, Elastic IP, security group, SSM, budgets and the Cloudflare DNS record (ADR-013)
Observability
Application MonitoringSentry SDKs (API and web)Error reporting and sampled traces, active in production through the runtime (API) and build-time (web) DSN
Health and Logs/health/live, /health/ready, container logsHost-local health checks and docker compose logs; no alarms or uptime probes are deployed
CI/CD
PipelineGitHub ActionsTests and quality gates on pull requests; on a vX.Y.Z tag it builds and pushes the API image
Container RegistryGitHub Container Registry (GHCR)ghcr.io/alonsovndev/open-projects-hub-api:<tag>
Deployscripts/deploy-release.sh + SSMManual deploy with operator AWS credentials (ADR-023)

Key Integration Patterns​

Frontend ↔ Backend Communication​

  • Protocol: HTTPS REST APIs with JWT bearer authentication
  • CORS: the API allowlists https://oph.alonsovndev.com with credentials; the refresh cookie is HttpOnly; Secure; SameSite=Lax and scoped to /v1/auth
  • State sync: Frontend Redux state synchronized with backend via RTK Query

Backend ↔ Database​

  • Access pattern: SQLAlchemy repository implementations in infrastructure layer
  • Connection pooling: SQLAlchemy pooling; effective pool settings depend on the application configuration
  • Network security: the database is a container reachable only on the host's Compose network; it publishes no port
  • Migration strategy: Alembic migrations applied at container start; the deploy briefly restarts the single API container

Authentication Flow​

  1. User submits credentials to /v1/auth/login
  2. Auth module validates credentials and issues a 15-minute access token (JSON) and a refresh token (HttpOnly cookie)
  3. Frontend keeps the access token in memory and sends it in the Authorization header
  4. Backend middleware validates JWT on protected routes
  5. Repositories filter every query by the caller's workspace

Observability Strategy​

  • Application layer: Sentry captures API errors in production
  • Host layer: health endpoints and container logs; two AWS Budgets alert on cost
  • Cost: the original estimate was about $12.85/month; current prices, usage, and credits are unverified. See Deployment Architecture

Scalability & Performance Strategy​

  • Scaling: one host with no autoscaling; the design is sized for a handful of users and the backend is stateless apart from the database
  • Database optimization: indexes support project/story queries; no p95 latency measurement or dashboard is established by this review
  • MVP capacity: NFR-X05/NFR-X06 are evaluation targets; the workspace limit of three active projects is enforced, but host capacity has not been benchmarked
  • Evolution readiness: Module boundaries enable selective service extraction when growth demands it
  • Performance-first: Optimize queries and payloads before adding infrastructure complexity

Source References​


Last Updated: 2026-10-19