How hitohata/wherewerewe works
Main Components
• Frontend: Located in the “frontend” folder. This part is built with modern web technologies (React/TypeScript, given the .tsx files) and includes routing (tab views, layouts), assets (images, fonts), and UI components.
• Backend: Found under “backend/core-where-were-we”. It is a Rust-based backend that is modularly structured into several bounded contexts:
• Services (in app/services) – likely shared utility functions or common services.
• Travel Module (in app/travel) – includes dtos, errors, interfaces, models (entities, repositories, ids), use cases, and service logic for managing travel-related features.
• Users Module (in app/users) – encapsulates all things user-related: dtos, errors, interfaces, models, repository pattern, and use case implementations.
• GraphQL API: A separate “graphql/schema.graphql” file indicates that the application either provides or consumes a GraphQL layer.
• Infrastructure / Deployment:
• “cdk” folder contains AWS CDK configuration (including TypeScript files, stack definitions, deployment scripts), meaning that cloud infrastructure deployment is automated.
• Docker Compose file in the backend further shows container orchestration.
Establish Relationships and Interactions
• The Frontend interacts with the Backend, likely through RESTful endpoints or via the GraphQL API.
• The GraphQL layer, based on the schema file, may serve as an interface for the frontend to query and mutate data managed by the backend services.
• Within the Backend, the Travel and Users modules are built around well-defined layers:
• Data Transfer Objects (DTOs) → Error Handling → Interfaces → Models (with repositories and entity definitions) → Service Layer → Use Cases.
• Shared utilities and common services (located under the “utils” folder) are used across backend modules.
• The CDK component defines the cloud infrastructure (networks, compute, storage) which physically hosts the backend (and possibly serves the frontend) and integrates through deployment scripts (Docker Compose for local development and/or production orchestration).
Architectural Patterns and Key Design Principles
• Modular design: The backend is segregated into distinct modules (services, travel, users) that each encapsulate their own domain logic.
• Layered architecture: Each module has clear layers (DTOs, errors, interfaces, models/repositories, use cases) indicative of separation of concerns.
• Microservice- or bounded-context-like segmentation: While it’s a single repository, the separation into distinct packages (Cargo workspaces) within the backend suggests that similar principles to microservices (clear boundaries) are applied.
• Infrastructure as code: Usage of AWS CDK shows automation and code-driven cloud deployment.
• Frontend and API separation: The clear separation between frontend (UI) and backend (logic and data handling, exposed via GraphQL or other endpoints) reinforces a full-stack approach.
Final Detailed Steps
• Clearly denote interfaces between the frontend and backend (or GraphQL) to represent how data is exchanged.
• Representation of testing and automation (GitHub workflows, test utilities) as support elements around the core deployment flow.