How soblechero/monkeys-together-strong works
Main Components
• Mobile App (Frontend):
• Located in the mobile-app folder.
• Built with Ionic, Capacitor, and Vue.
• Contains views, components, services (API and preferences), configuration, and tests (unit and end-to-end).
• Interacts with users via a mobile interface and possibly with an emulated environment.
• Backend API (Backend):
• Located in the backend folder.
• Developed with FastAPI (for routing and endpoints) and SQLModel (for ORM/database interactions).
• Organized into layers such as API routes, core configuration/security, models (representing users, games, genres, messages), persistence (CRUD operations), and external services (e.g., igdb_client, hltb_client).
• Uses environmental configuration files for different environments (development, testing, production).
• Database:
• Configured using different environment files.
• In development: a SQLite database is auto-generated in the data folder.
• In production and testing: connects to PostgreSQL (with the assumption that the instance is pre-created).
• External Services:
• The backend has dedicated services (under app/services/external) for integrating with external clients (like IGDB and HLTB).
• Supporting Components:
• Tests (both for mobile-app and backend) are included to validate behavior and integration.
• Shared configuration and environment management across both projects (using .env files and build scripts).
Relationships and Interactions
• The mobile app communicates with the backend API via HTTP requests.
• The backend API processes incoming requests, performs operations (using the defined CRUD routes and business logic), and interacts with the database.
• The backend may also call external services to fetch additional data or perform specific tasks.
• In development, the mobile app can use API mocks (controlled by the VITE_USE_MOCKS flag) or the real backend, based on the environment.
• Testing components for both projects ensure that communication and functionality remain as expected.
Architectural Patterns and Design Principles
• Separation of Concerns:
• Frontend (mobile-app) is clearly separated from backend services.
• The backend itself is organized into layers (API, core/configuration, models, persistence, external services).
• API-Driven Architecture:
• Using FastAPI ensures that the backend provides a RESTful (or OpenAPI-based) service with embedded interactive documentation (Swagger UI/Redoc).
• Environment Configuration and Dependency Injection:
• Multiple .env configurations allow the system to adapt to different deployment environments.
• Modular Structure:
• Both projects have well-defined directories (e.g., separate directories for routes, models, services in the backend; dedicated directories for components, views, and tests in the mobile app).
Relevant Technologies
• Frontend: Ionic, Capacitor, Vue.js, Tailwind CSS.
• Backend: FastAPI, SQLModel, Uvicorn, Poetry for package management.
• Databases: SQLite (for development), PostgreSQL (for production/testing).
• Additional integrations: External game data services via dedicated API clients.
• Testing: Cypress and unit tests for the mobile app; unit tests (e.g., test_crud operations) for the backend.
Final Checklist for the Principal Software Engineer
• Clearly distinguish between the mobile app and backend services.
• Integration points (external APIs) and environment/configuration dependencies.