How gaspardculis/regionoix works
Project type and purpose
• This is a full-stack e-commerce/web-app called “Regionoix.”
• Frontend: Angular single-page application (in src/app), generated OpenAPI client for all backend APIs.
• Backend: Rust REST API (backend/src) with SeaORM entities, DTOs, routes and services.
• Persistence: PostgreSQL (backend/sql), Redis, MeiliSearch, S3, Stripe integration.
• Deployment: NixOS/Caddy for reverse-proxy, GitHub Actions for CI.
Top-level components
A. Frontend SPA (Angular)
• UI pages, components, state & service layers
• Generated OpenAPI client module
B. Backend API Service (Rust)
• HTTP server (main.rs → routes)
• Domain layers: entities, DTOs, services (database, search, storage, payments)
• Tools: search indexer CLI
C. Data Stores & External Services
• PostgreSQL (SQL scripts)
• Redis (session/cache)
• MeiliSearch (full-text search index)
• S3 (object storage for uploads)
• Stripe (payment processing)
D. Infrastructure & Deployment
• Caddy reverse proxy
• NixOS modules for each service
• GitHub Actions workflows
Relationships & data flows
• Frontend ↔ Backend over HTTPS
• Auth (login/register/status/logout)
• Product/catalog queries, basket operations, orders, payments
• Backend → PostgreSQL for CRUD
• Backend → Redis for caching/rate-limiting/session
• Backend → MeiliSearch for indexing/search
• Backend → S3 for file upload/download
• Backend → Stripe for payment sessions/webhooks
• search_indexer tool → PostgreSQL → MeiliSearch (batch re-index)
• Caddy proxy → routes requests to Angular static assets or Rust API
Architectural patterns & design principles
• Layered “Clean” architecture:
• Routes (controllers) → Services (business logic) → Entities + DTOs → Data layer
• API-first: OpenAPI spec (src/swaggers/regionoix.json) → client generation
• Configuration as code: NixOS modules per service
• Clear separation: frontend vs backend vs infrastructure
• Use of domain objects (DTOs/entities) for strict typing and validation