How peterhhartmann/spac-9-frontend-integration works
Project type and purpose
• This is a full-stack monorepo exercise (“SPAC – Week 9 – Frontend-Integration”) that demonstrates a simple quotes application.
• Backend: Go gRPC server (using Entgo ORM + PostgreSQL), seeded with movie/quote data.
• Frontend: React + TypeScript SPA (Vite) communicating over gRPC-Web.
• Envoy Proxy: Bridges HTTP/1.1 (browser) to HTTP/2 (gRPC server).
• Database: PostgreSQL for persistence.
File structure
• Top-level:
• Dockerfiles (api, client, envoy) + docker-compose.yml
• /api: Go service, ent schema, migrations, gRPC server code, storage/seed
• /client: React SPA with TypeScript, gRPC-Web client, React-Query, UI components
• /proto & api/proto: shared and generated protobuf definitions
• Taskfile.yml and Taskfile under /api and /client for local automation
• Patterns:
• Monorepo separated into “client” and “api” directories
• Entgo for ORM, codegen of entity methods
• Buf + protoc code generation for API contracts
• Envoy as sidecar/proxy for protocol translation
Key insights from README
• Communication strictly via Protocol Buffers & gRPC for type safety
• Emphasis on frontend/backend integration rather than production readiness
• Use of Docker Compose (or Task) to orchestrate all services
Detail & granularity
• Following sub-components:
• Client: UI layer vs data-fetch layer (React-Query, gRPC-Web client)
• Server: gRPC server entrypoint, Entgo schema/migrations, storage seed
• Shared: Proto definitions repository, generated code output
• Build pipelines if relevant (e.g., Dockerfile-client → client image)
• Environmental configs ( .env.dev → docker-compose ) to illustrate how secrets/config flow