# KROW Project Plan & Task Breakdown This document breaks down the technical roadmap into actionable tasks, assigned by role, ready to be converted into GitHub Issues. --- ## Milestone 1: Foundation & Dev Environment Setup *Goal: Establish a fully functional, shared `dev` environment on GCP/Firebase that all developers can connect to.* ### Infrastructure & Tooling (Primarily CTO) - **Issue:** `[Infra] Setup Enpass for Team Credential Management` - **Description:** Configure the team's Enpass vault and establish the process for sharing secrets and service account keys. - **Issue:** `[Infra] Create GCP/Firebase Projects (dev, staging, prod)` - **Description:** Set up the three distinct Google Cloud projects and associated Firebase projects. Enable required APIs (Auth, Cloud SQL, Data Connect). - **Issue:** `[Infra] Create Multi-Env Makefile` - **Description:** Create the main `Makefile` inspired by the reference project. It should handle environment switching (`ENV=dev/staging`) and orchestrate all build/deploy tasks. - **Issue:** `[Infra] Setup Shared Dev Database` - **Description:** Provision the initial Cloud SQL for PostgreSQL instance for the `dev` environment. ### Backend & Web (Dev 1) - **Issue:** `[Backend] Define GraphQL Schema for Core Entities` - **Description:** Translate `Event`, `Staff`, `Vendor`, and `User` schemas from `api_specification.md` into `.gql` files for Data Connect. - **Issue:** `[Backend] Deploy Initial Schema & Operations to Dev Env` - **Description:** Use the `Makefile` to deploy the initial Data Connect schema and basic `list/get` queries to the `dev` project. - **Issue:** `[Web] Generate TypeScript SDK for Dev Env` - **Description:** Configure and run the SDK generation command to create the TypeScript SDK pointing to the `dev` environment. - **Issue:** `[Web] Connect Web App to Dev Backend` - **Description:** Modify the web app to use the generated SDK. The goal is to authenticate and display a list of events from the shared `dev` backend. ### Mobile (Dev 2) - **Issue:** `[Mobile] Generate Flutter SDK for Dev Env` - **Description:** Configure and run the SDK generation command to create the Flutter SDK pointing to the `dev` environment. - **Issue:** `[Mobile] Implement Firebase Auth Flow` - **Description:** Ensure both mobile apps can sign in and sign up using Firebase Auth against the `dev` project. - **Issue:** `[Mobile] Create Proof-of-Concept Screen` - **Description:** Build a simple screen in the Staff app that authenticates and fetches a list of events from the `dev` backend using the new SDK. --- ## Milestone 2: Core Feature Implementation *Goal: Achieve functional parity with the Base44 prototype across all platforms, using the shared `dev` backend.* ### Backend (Dev 1) - **Epic:** `[Backend] Implement Full API Logic` - **Description:** Create all necessary GraphQL queries and mutations in Data Connect for all entities defined in `api_specification.md`. Deploy them continuously to the `dev` environment. ### Web (Dev 1, with support from Dev 2) - **Epic:** `[Web] Full Application Re-wiring` - **Description:** Systematically replace all data-fetching logic in the web app to use the TanStack Query hooks from the generated Data Connect SDK. ### Mobile (Dev 2) - **Epic:** `[Mobile] Full Application Re-wiring` - **Description:** Refactor the `repositories` and `api_providers` in both the Client and Staff Flutter apps to use the generated Data Connect SDK for all network calls. --- ## Milestone 3: Production Readiness & Go-Live *Goal: Automate, secure, and deploy the entire platform to production.* ### Infrastructure & DevOps (CTO & Team) - **Issue:** `[CI/CD] Configure Web App Deployment Pipeline` - **Description:** Set up a GitHub Actions pipeline that builds and deploys the web app to Firebase Hosting, with separate jobs for `staging` and `prod`. - **Issue:** `[CI/CD] Configure Mobile App Deployment with CodeMagic` - **Description:** Set up CodeMagic pipelines to build and deploy the iOS and Android apps to TestFlight/Play Store Internal Testing. - **Issue:** `[CI/CD] Configure Backend Deployment Pipeline` - **Description:** Automate the deployment of the Data Connect schema and operations (`firebase deploy --only dataconnect`). - **Issue:** `[Data] Create & Test Initial Data Import Scripts` - **Description:** Write scripts to populate the production database with any necessary initial data. - **Issue:** `[QA] Deploy to Staging & Perform E2E Testing` - **Description:** Use the `Makefile` (`make deploy ENV=staging`) to deploy the entire stack to the staging environment for full end-to-end testing. - **Issue:** `[Ops] Final Production Deployment` - **Description:** Run the production deployment (`make deploy ENV=prod`) and execute data import scripts. - **Issue:** `[Ops] Setup Monitoring & Alerting` - **Description:** Configure monitoring dashboards in Google Cloud for the database, API, and application performance.