# Archon V2 Beta - Brownfield Enhancement Architecture

## Table of Contents

- [Archon V2 Beta - Brownfield Enhancement Architecture](#table-of-contents)
  - [Frontend Authentication System](./frontend-authentication-system.md)
  - [Change Log](./change-log.md)
  - [Introduction](./introduction.md)
    - [Existing Project Analysis](./introduction.md#11-existing-project-analysis)
      - [Current Project State](./introduction.md#current-project-state)
      - [Available Documentation](./introduction.md#available-documentation)
      - [Identified Constraints](./introduction.md#identified-constraints)
  - [Enhancement Scope and Integration Strategy](./enhancement-scope-and-integration-strategy.md)
    - [Enhancement Overview](./enhancement-scope-and-integration-strategy.md#21-enhancement-overview)
    - [Integration Approach](./enhancement-scope-and-integration-strategy.md#22-integration-approach)
      - [Code Integration Strategy](./enhancement-scope-and-integration-strategy.md#code-integration-strategy)
      - [Database Integration](./enhancement-scope-and-integration-strategy.md#database-integration)
      - [API Integration](./enhancement-scope-and-integration-strategy.md#api-integration)
      - [UI Integration](./enhancement-scope-and-integration-strategy.md#ui-integration)
    - [Compatibility Requirements](./enhancement-scope-and-integration-strategy.md#23-compatibility-requirements)
  - [Tech Stack](./tech-stack.md)
    - [Existing Technology Stack](./tech-stack.md#31-existing-technology-stack)
    - [New Technology Additions](./tech-stack.md#32-new-technology-additions)
  - [Data Models and Schema Changes](./data-models-and-schema-changes.md)
    - [New Data Models](./data-models-and-schema-changes.md#41-new-data-models)
      - [User Model (Managed by Supabase Auth)](./data-models-and-schema-changes.md#user-model-managed-by-supabase-auth)
    - [Schema Integration Strategy](./data-models-and-schema-changes.md#42-schema-integration-strategy)
      - [New Columns Added to Existing Tables](./data-models-and-schema-changes.md#new-columns-added-to-existing-tables)
      - [New Indexes for Performance](./data-models-and-schema-changes.md#new-indexes-for-performance)
      - [Updated RLS Policies](./data-models-and-schema-changes.md#updated-rls-policies)
      - [Migration Strategy](./data-models-and-schema-changes.md#migration-strategy)
  - [Component Architecture](./component-architecture.md)
    - [New Components](./component-architecture.md#51-new-components)
      - [Component: AuthProvider (Context Provider)](./component-architecture.md#component-authprovider-context-provider)
      - [Component: LoginPage](./component-architecture.md#component-loginpage)
      - [Component: SignupPage](./component-architecture.md#component-signuppage)
      - [Component: ProtectedRoute](./component-architecture.md#component-protectedroute)
      - [Component: AuthService (Service Layer)](./component-architecture.md#component-authservice-service-layer)
    - [Component Interaction Diagram](./component-architecture.md#52-component-interaction-diagram)
  - [API Design and Integration](./api-design-and-integration.md)
    - [API Integration Strategy](./api-design-and-integration.md#61-api-integration-strategy)
    - [New API Endpoints](./api-design-and-integration.md#62-new-api-endpoints)
      - [Endpoint: POST /api/auth/session](./api-design-and-integration.md#endpoint-post-apiauthsession)
      - [Endpoint: POST /api/auth/refresh](./api-design-and-integration.md#endpoint-post-apiauthrefresh)
    - [Modified Existing Endpoints (Backward Compatible)](./api-design-and-integration.md#63-modified-existing-endpoints-backward-compatible)
  - [Source Tree](./source-tree.md)
    - [Existing Project Structure](./source-tree.md#71-existing-project-structure)
    - [New File Organization](./source-tree.md#72-new-file-organization)
    - [Integration Guidelines](./source-tree.md#73-integration-guidelines)
  - [Infrastructure and Kubernetes Deployment](./infrastructure-and-kubernetes-deployment.md)
    - [Existing Infrastructure](./infrastructure-and-kubernetes-deployment.md#81-existing-infrastructure)
    - [Enhancement Deployment Strategy](./infrastructure-and-kubernetes-deployment.md#82-enhancement-deployment-strategy)
      - [Docker Compose Changes](./infrastructure-and-kubernetes-deployment.md#docker-compose-changes)
      - [Kubernetes Manifests (NEW)](./infrastructure-and-kubernetes-deployment.md#kubernetes-manifests-new)
    - [Rollback Strategy](./infrastructure-and-kubernetes-deployment.md#83-rollback-strategy)
  - [Coding Standards](./coding-standards.md)
    - [Existing Standards Compliance](./coding-standards.md#91-existing-standards-compliance)
    - [Enhancement-Specific Standards](./coding-standards.md#92-enhancement-specific-standards)
    - [Critical Integration Rules](./coding-standards.md#93-critical-integration-rules)
  - [Testing Strategy](./testing-strategy.md)
    - [Integration with Existing Tests](./testing-strategy.md#101-integration-with-existing-tests)
    - [New Testing Requirements](./testing-strategy.md#102-new-testing-requirements)
      - [Unit Tests for New Components](./testing-strategy.md#unit-tests-for-new-components)
      - [Backend Unit Tests](./testing-strategy.md#backend-unit-tests)
    - [Integration Tests](./testing-strategy.md#103-integration-tests)
    - [Regression Testing](./testing-strategy.md#104-regression-testing)
  - [Security Integration](./security-integration.md)
    - [Existing Security Measures](./security-integration.md#111-existing-security-measures)
    - [Enhancement Security Requirements](./security-integration.md#112-enhancement-security-requirements)
      - [Authentication Security](./security-integration.md#authentication-security)
      - [Authorization Security](./security-integration.md#authorization-security)
    - [Security Testing](./security-integration.md#113-security-testing)
  - [Next Steps](./next-steps.md)
    - [Story Manager Handoff](./next-steps.md#121-story-manager-handoff)
    - [Developer Handoff](./next-steps.md#122-developer-handoff)
  - [Appendix A: Reference Documentation](./appendix-a-reference-documentation.md)
    - [Key Files Referenced](./appendix-a-reference-documentation.md#key-files-referenced)
  - [Appendix B: Decision Log](./appendix-b-decision-log.md)
