How hitotori365/2025-zenn-hackathon works
Main Components
• Frontend Application:
– Contains a Flutter-based mobile application for both Android and iOS (as seen under frontend/android and frontend/ios), as well as a web version (frontend/web).
– Uses the provider pattern for state management (providers directory in frontend/lib) to manage messages, speech state, scrolling, etc.
– Contains UI components (views) that include the chat list, completion screen, speech and text field views.
• Backend Service:
– Built with Python (backend/app/main.py), likely serving as an API service for the frontend to communicate with.
– Uses a Dockerfile and accompanying configuration (e.g., .env.example, deploy.sh) to containerize and deploy the service.
• Infrastructure Management & Deployment:
– Both frontend and backend include Terraform configuration files (main.tf, variables.tf, outputs.tf, terraform.tfvars) which suggests infrastructure as code is used for setting up cloud resources or deployment environments.
• Sample Module:
– A separate “sample” project with Python scripts (like transcribe_streaming_infinite.py and test_speech_to_text_mic.py) that likely demonstrates core functionalities – particularly around speech-to-text processing, which is a prominent theme in parts of the frontend (e.g., simple_speech_to_text in the Android code).
Relationships and Interactions
• The Backend processes requests, which might include actions such as speech recognition or other business logic. It then returns responses to the frontend.
• Infrastructure components provisioned via Terraform automate the deployment of both the frontend and backend environments using Docker containers.
• The Sample modules can be seen as standalone scripts or as demonstration components that might interact with similar services or simulate parts of the real application’s functionality.
Architectural Patterns & Design Principles
• Separation of concerns: The project is divided into clearly segregated components – frontend (UI & state management), backend (service logic), and infrastructure (deployment/ops scripts).
• Containerization: Dockerfiles in both the frontend and backend indicate the use of containerization for reproducible builds and deployments.
• Infrastructure as Code: Terraform scripts help in provisioning and versioning the deployment environment, which is central for both production and development setups.
• Mobile/Flutter design: The use of provider patterns for state management in Flutter ensures that the UI remains reactive to changes in speech state, chat updates, etc.
Elements
– Mobile Clients: Android App, iOS App, and Web Client (highlight Flutter based)
– API Gateway/Backend Service (Python)
– Infrastructure Component (Terraform-managed cloud/deployment environment)
– Additional Sample/Demo Scripts (as a supportive component for speech-to-text functionality)
– Data and request-response flows between the mobile clients and the backend.
– Management or orchestration flows between Terraform-configured infrastructure and the containerized services.
• Text labels or annotations next to each component to indicate key technologies:
– Frontend: Flutter, Dart, Provider package
– Backend: Python, Docker, and potentially relevant libraries from requirements.txt
– Deployment: Docker, Terraform configurations, and associated scripts to manage deployment.
• Separation between the mobile/web client (fronted by Flutter) and the backend service.
• That the infrastructure (using Terraform) ties together the containerized builds of both frontend and backend.
• Annotations to highlight the speech-to-text functionality as a core feature since it appears both in naming (simple_speech_to_text) and in sample modules that test this functionality.
• Notes on environment variables and containerization details, as seen by the .env.example files and Dockerfiles.