# io8 System Architect Agent - Customized for This Project

## Project-Specific Instructions

## Architecture Design Methodology

Generated: 2025-09-24T05:41:20

This project will utilize a microservices architecture for scalability and maintainability.  The application will be divided into distinct services responsible for user authentication, note storage, and search functionality.  This allows for independent scaling and deployment of each component.

The frontend will consume APIs exposed by the backend microservices.  A RESTful API will be used for communication between the frontend and backend.  This approach promotes loose coupling and independent evolution of each service.

**Frontend:** Angular will be used for building the user interface.  The frontend will interact with the backend API for data management.

**Backend:**  A combination of Node.js with Express.js (for API) and potentially a separate service for search using Elasticsearch will be considered.

**Database:** MongoDB will be used for storing note data due to its scalability and flexibility in handling semi-structured data.  The database will be designed to support efficient querying and indexing for the search functionality.

**Data Flow:** The data flow will be as follows:

1. User interacts with the frontend Angular application.
2. Frontend sends requests to the backend API services.
3. Backend services interact with the MongoDB database for data persistence.
4. Search requests are handled by the dedicated search service (if implemented using Elasticsearch).
5. Responses are sent back to the frontend for display.

## Technical Architecture Approach

Generated: 2025-09-24T05:41:20

The application will adopt a three-tier architecture:

* **Presentation Tier:**  Angular application responsible for user interaction and rendering.
* **Application Tier:**  Node.js microservices handling business logic and API requests.
* **Data Tier:**  MongoDB database for persistent storage of notes.

This approach offers clear separation of concerns, improving maintainability and scalability.  A layered approach will be used, where each layer has specific responsibilities and interacts with other layers through well-defined interfaces.

## System Design Framework

Generated: 2025-09-24T05:41:20

We will utilize a model-view-controller (MVC) pattern for the frontend (Angular) and a RESTful API design for the backend.  The backend services will be designed using a microservices architecture, emphasizing modularity, independence, and scalability.  The domain-driven design (DDD) approach will be employed to ensure the software accurately reflects the business domain of note-taking.

## Technology Selection Strategy

Generated: 2025-09-24T05:41:20

Technology selection will be based on several factors, including:

* **Scalability:** The chosen technologies should be able to handle a growing number of users and notes.
* **Maintainability:**  The technologies should be easy to maintain and update.
* **Security:** Security best practices will be followed, including data encryption and secure authentication.
* **Community Support:** Technologies with large and active communities will be preferred for easier troubleshooting and support.

## Customized io8architect Workflow

Generated: 2025-09-24T05:41:20

1. **Document Analysis:** Thorough review of all provided documents (analysis, requirements) to fully understand the requirements and existing architecture.
2. **Architecture Design:** Design the microservices architecture, defining the responsibilities of each service, data models, and API contracts.
3. **Technology Selection:** Choose specific technologies for frontend, backend, database, and deployment based on the architecture design and requirements.
4. **Component Design:** Detailed design of each microservice and its components, including data flow and interactions.
5. **Security Design:** Implement appropriate security measures, including data encryption, authentication, and authorization.
6. **Deployment Planning:** Plan the deployment strategy, considering scalability and maintainability.
7. **Documentation:** Update the architecture and tech stack documents with the chosen technologies, design decisions, and rationales.

## Frontend Technologies

Generated: 2025-09-24T05:41:20

- **Framework:** Angular
- **UI Library:** Clarity Design System (to maintain consistency with base project)
- **State Management:** NgRx or Akita (to be decided based on project complexity)
- **Routing:** Angular Router
- **Testing:** Jasmine, Karma
- **Rich Text Editor:** Quill.js or Slate.js (to be decided based on feature requirements and performance)

## Backend Technologies

Generated: 2025-09-24T05:41:20

- **Language:** Node.js
- **Framework:** Express.js
- **API:** RESTful API
- **Database:** MongoDB
- **Search (Optional):** Elasticsearch
- **Authentication:** JWT (JSON Web Tokens)
- **Testing:** Jest, Supertest

## Database Technologies

Generated: 2025-09-24T05:41:20

- **Primary Database:** MongoDB

## Infrastructure

Generated: 2025-09-24T05:41:20

- **Deployment:** Docker and Kubernetes (for scalability)
- **Hosting:** AWS, GCP, or Azure (to be decided based on cost and scalability requirements)
- **CI/CD:** Jenkins, GitLab CI, or similar

## Development Tools

Generated: 2025-09-24T05:41:20

- **Version Control:** Git
- **IDE:** VS Code or WebStorm


## Base Agent Prompt Reference

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