# io8 Code Master Agent - Customized for This Project

## Project-Specific Instructions


## PROJECT BREAKDOWN - Messaging App (io8codermaster) - 2025-10-10 04:04:00

**Project Title:** Messaging App
**User Prompt:** `messaging app`

### 1. Project Overview
Develop a real-time messaging application by extending an existing Angular Clarity boilerplate for the frontend and building a new dedicated backend. The solution will include user authentication, one-to-one and group chat functionality, message persistence, and robust real-time communication. Emphasis will be placed on security, scalability, and maintainability.

### 2. Key Milestones

*   **Milestone 1: Core Messaging MVP (Estimated 4-6 Weeks)**
    *   User Registration, Login, and Profile Management (Backend & Frontend).
    *   One-to-One Real-time Text Messaging (Backend & Frontend).
    *   Message Persistence and Retrieval (Database & Backend API).
    *   Basic chat interface integrated into `messaging_app_base_cloned/frontend/src/` components.
    *   Initial `backend/` and `frontend/` service setup and Dockerization for local development.

*   **Milestone 2: Enhanced Communication & Features (Estimated 3-5 Weeks)**
    *   Group Chat functionality with member management.
    *   Real-time Notifications for new messages and user presence.
    *   Support for sharing media (images, files) within chats.
    *   Enhanced user interface and experience for chat rooms and user lists.
    *   Improved error handling and feedback mechanisms.

*   **Milestone 3: Deployment Readiness & Optimization (Estimated 2-3 Weeks)**
    *   Container orchestration with `docker-compose.yml` for multi-service setup.
    *   Implementation of CI/CD pipelines for automated testing and deployment.
    *   Performance optimization of backend and frontend for real-time traffic.
    *   Security hardening (rate limiting, input validation, secure connections).
    *   Comprehensive documentation for deployment and maintenance.

### 3. Core Modules & Components

*   **Frontend (Leveraging `messaging_app_base_cloned/` Angular Clarity):**
    *   **UI Components:** `messaging_app_base_cloned/frontend/src/components/` (ChatWindow, MessageInput, UserList, ProfileCard, NotificationBanner).
    *   **Pages/Views:** `messaging_app_base_cloned/frontend/src/pages/` (LoginPage, RegisterPage, ChatPage, SettingsPage).
    *   **Services:** API client, WebSocket connection logic, State management (e.g., NGRX or RxJS based services).
    *   **Routing:** Frontend routing definitions (`messaging_app_base_cloned/frontend/src/routes/`).

*   **Backend (New - `backend/` directory):**
    *   **Authentication Service:** User registration, login, token generation (e.g., JWT).
    *   **User Service:** User profiles, status management (online/offline).
    *   **Chat Service:** Message sending, retrieval, chat room management.
    *   **Real-time Service:** WebSocket server for live message exchange.
    *   **Database Integration:** ORM/ODM for interacting with message and user data stores.

*   **Database (New - external service, configured via `backend/config/`):**
    *   **User Store:** User authentication details, profile information.
    *   **Message Store:** Message content, timestamps, sender/receiver, chat room IDs.
    *   **Chat Room Store:** Group chat metadata, member lists.

*   **DevOps & Infrastructure (`deployment_config.yml`, Dockerfiles, `docker-compose.yml`, `nginx.conf`):**
    *   **Containerization:** Dockerfiles for `backend/` and `frontend/`.
    *   **Orchestration:** `docker-compose.yml` for multi-container local development and staging.
    *   **CI/CD:** Pipelines for automated builds, tests, and deployments.
    *   **Reverse Proxy:** Nginx configuration for serving frontend, routing API calls, and WebSocket proxying.

### 4. Constraints & Considerations

*   **Base Project Preservation:** The `messaging_app_base_cloned/` Angular Clarity boilerplate must be extended and integrated, not replaced. Core boilerplate functionalities should remain intact where possible.
*   **Append-Only Principle:** All agent-generated documents within `messaging_app_base_cloned/.sureai/` must be appended to, never overwritten.
*   **Real-time Requirement:** All core messaging functionalities (send/receive) must operate in real-time.
*   **Security:** Implement robust authentication, authorization, and data encryption. Adhere to OWASP best practices.
*   **Scalability:** The architecture must be designed with future scalability in mind, capable of handling a growing number of concurrent users and messages.
*   **Performance:** Optimize for low latency in message delivery and efficient resource usage.
*   **Technology Stack:** Preference for open-source, widely supported technologies. Specific recommendations to be provided by io8architect.
*   **Compliance:** Consider data privacy regulations if applicable.



## IMPLEMENTATION PLAN - Messaging App (io8codermaster) - 2025-10-10 04:04:00

**Project Title:** Messaging App
**User Prompt:** `messaging app`

### 1. High-Level Implementation Phases

*   **Phase 1: Discovery & Requirements (io8analyst, io8architect, io8pm)**
    *   **Goal:** Define comprehensive functional and non-functional requirements and establish a solid architectural foundation.
    *   **Key Activities:**
        *   Detailed user story elicitation for all core messaging features.
        *   Feasibility study for integrating with Angular Clarity base.
        *   High-level system design including component interaction, data flow, and technology selection.
        *   Initial project planning, scope definition, and risk assessment.
    *   **Expected Outputs:** `messaging_app_base_cloned/.sureai/analysis_document.md`, `messaging_app_base_cloned/.sureai/requirements_document.md`, `messaging_app_base_cloned/.sureai/architecture_document.md`, `messaging_app_base_cloned/.sureai/tech_stack_document.md`, `messaging_app_base_cloned/.sureai/prd_document.md`, `messaging_app_base_cloned/.sureai/project_plan.md`.

*   **Phase 2: Core Development & Integration (io8developer, io8sm, io8devops)**
    *   **Goal:** Develop and integrate the core messaging functionalities, ensuring real-time communication and user management.
    *   **Key Activities:**
        *   **Sprint 1 (Backend Core):** Implement user authentication, user profile management, and basic one-to-one message persistence API in `backend/`.
        *   **Sprint 2 (Frontend & Real-time):** Develop chat UI components in `messaging_app_base_cloned/frontend/src/`, integrate with backend APIs, and establish WebSocket connections for real-time messaging.
        *   **Sprint 3 (Deployment Foundation):** Create `Dockerfile.backend`, `Dockerfile.frontend`, and `docker-compose.yml` for local development setup. Set up basic CI/CD for automated builds.
        *   Continuous unit and integration testing.
    *   **Expected Outputs:** Functional backend services, integrated frontend UI, containerized applications, updated `messaging_app_base_cloned/.sureai/tasks_list.md`, `messaging_app_base_cloned/.sureai/sprint_plan.md`.

*   **Phase 3: Feature Expansion & Quality Assurance (io8developer, io8sm, io8devops)**
    *   **Goal:** Implement advanced messaging features, conduct thorough testing, and prepare for production deployment.
    *   **Key Activities:**
        *   **Sprint 4 (Advanced Features):** Implement group chat, file sharing, and notification services.
        *   **Sprint 5 (Refinement & QA):** Comprehensive testing (E2E, performance, security), bug fixing, and UI/UX polish.
        *   **Sprint 6 (Production Readiness):** Finalize `deployment_config.yml`, `nginx.conf`, and CI/CD pipelines for production environment. Performance tuning and monitoring setup.
    *   **Expected Outputs:** Fully functional messaging app, comprehensive test reports, production-ready deployment configurations, stable CI/CD pipelines.

### 2. Estimated Resources (Per Phase - Subject to io8pm/io8architect refinement)

*   **io8analyst:** ~20% of Phase 1 (Initial), then ~5% for ongoing clarifications.
*   **io8architect:** ~30% of Phase 1 (Design), then ~10% for architectural guidance and reviews.
*   **io8pm:** ~25% throughout all phases (Coordination, planning, risk management).
*   **io8sm:** ~25% during development sprints (Facilitation, backlog management).
*   **io8developer (Backend):** ~50% during Phase 2 & 3 (Backend service implementation).
*   **io8developer (Frontend):** ~50% during Phase 2 & 3 (Frontend UI and integration).
*   **io8devops:** ~20% of Phase 2 (Initial setup), then ~40% during Phase 3 (Deployment, CI/CD, infrastructure).

### 3. Key Deliverables

*   Functional Messaging App (Web-based) hosted via Docker containers.
*   Detailed `messaging_app_base_cloned/.sureai/analysis_document.md` and `requirements_document.md`.
*   Robust `messaging_app_base_cloned/.sureai/architecture_document.md` and `tech_stack_document.md`.
*   Comprehensive `messaging_app_base_cloned/.sureai/project_plan.md` and `tasks_list.md`.
*   Containerization (Dockerfiles, `docker-compose.yml`) and CI/CD pipelines.
*   Well-documented codebase for both `backend/` and `frontend/`.

### 4. Next Steps

The `io8codermaster` has laid the foundational plan. The next agent in the workflow, `io8analyst`, should now proceed to gather detailed functional and non-functional requirements, elaborating on the core features outlined in this plan. The `io8analyst` will update `messaging_app_base_cloned/.sureai/analysis_document.md` and `messaging_app_base_cloned/.sureai/requirements_document.md`.

## Base Agent Prompt Reference

This agent is based on the standard io8codermaster agent with project-specific customizations above.
Refer to the base io8codermaster agent prompt for general principles and workflow instructions.
