# qoziwe/academicspace architecture

> Architecture diagram of the GitHub repository qoziwe/academicspace, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/qoziwe/academicspace
- Repository: https://github.com/qoziwe/academicspace

## Overview

AcademicSpace is a student-facing university-planning and study app: students explore Safety/Match/Reach options, analyze portfolios and use an AI mentor, manage documents and study tools, and access gamification and focus features. The frontend is an Expo app whose documented web demo uses mocks; the Flask/PostgreSQL backend is described as in development. The graph preserves those product areas and the sampled task/API and provider layers. Backend feature wiring beyond the task endpoint is not shown, so those relationships are omitted.

Main entry points: [`frontend/services/api/http/tasks.ts`](https://github.com/qoziwe/academicspace/blob/main/frontend/services/api/http/tasks.ts) (Tasks HTTP adapter), [`backend/app/models/task.py`](https://github.com/qoziwe/academicspace/blob/main/backend/app/models/task.py) (Domain models), [`frontend/services/api/tasks.ts`](https://github.com/qoziwe/academicspace/blob/main/frontend/services/api/tasks.ts) (Tasks adapter), [`backend/app/__init__.py`](https://github.com/qoziwe/academicspace/blob/main/backend/app/__init__.py) (Flask app setup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Student app"]
  node_app["App entry<br/>[index.tsx]"]
  node_admissions["University matching<br/>[results.tsx]"]
  node_portfolio["Portfolio analysis<br/>[preview.tsx]"]
  node_mentor["AI mentor<br/>[chat.tsx]"]
  node_documents["Document vault<br/>[index.tsx]"]
  node_flashcards["Flashcards<br/>[index.tsx]"]
  node_studytools["Tasks and focus<br/>[index.tsx]"]
  node_profile["Profile and rewards<br/>[index.tsx]"]
  node_subscription["Subscriptions<br/>[plans.tsx]"]
end

subgraph group_api["API access"]
  node_taskadapter["Tasks adapter<br/>[tasks.ts]"]
  node_http_tasks["Tasks HTTP adapter<br/>[tasks.ts]"]
  node_http_client["HTTP client<br/>[client.ts]"]
end

subgraph group_server["Backend domain"]
  node_app_factory["Flask app setup<br/>[__init__.py]"]
  node_task_endpoint["Task endpoints<br/>[tasks.py]"]
  node_domain_models[("Domain models<br/>[task.py]")]
end

subgraph group_integrations["Provider services"]
  node_ai_router["AI provider selection<br/>[router.py]"]
  node_ai_providers["AI providers<br/>[base.py]"]
  node_payment_router["Payment selection<br/>[router.py]"]
  node_storage_router["Storage selection<br/>[router.py]"]
  node_payment_provider["Mock payment provider<br/>[mock_provider.py]"]
  node_storage_provider["Local storage provider<br/>[local.py]"]
end

node_student(("Student"))

node_student -->|"uses"| node_app
node_taskadapter -->|"selects HTTP"| node_http_tasks
node_http_tasks -->|"calls"| node_http_client
node_task_endpoint -->|"queries and updates"| node_domain_models
node_app_factory -->|"loads models"| node_domain_models
node_ai_router -->|"selects provider"| node_ai_providers
node_payment_router -.->|"selects provider"| node_payment_provider
node_storage_router -.->|"selects backend"| node_storage_provider

click node_app "https://github.com/qoziwe/academicspace/blob/main/frontend/app/index.tsx"
click node_admissions "https://github.com/qoziwe/academicspace/blob/main/frontend/app/universities/results.tsx"
click node_portfolio "https://github.com/qoziwe/academicspace/blob/main/frontend/app/ai/analysis/preview.tsx"
click node_mentor "https://github.com/qoziwe/academicspace/blob/main/frontend/app/ai/chat.tsx"
click node_documents "https://github.com/qoziwe/academicspace/blob/main/frontend/app/documents/index.tsx"
click node_flashcards "https://github.com/qoziwe/academicspace/blob/main/frontend/app/flashcards/index.tsx"
click node_studytools "https://github.com/qoziwe/academicspace/blob/main/frontend/app/tasks/index.tsx"
click node_profile "https://github.com/qoziwe/academicspace/blob/main/frontend/app/profile/index.tsx"
click node_subscription "https://github.com/qoziwe/academicspace/blob/main/frontend/app/subscription/plans.tsx"
click node_taskadapter "https://github.com/qoziwe/academicspace/blob/main/frontend/services/api/tasks.ts"
click node_http_tasks "https://github.com/qoziwe/academicspace/blob/main/frontend/services/api/http/tasks.ts"
click node_http_client "https://github.com/qoziwe/academicspace/blob/main/frontend/services/api/http/client.ts"
click node_app_factory "https://github.com/qoziwe/academicspace/blob/main/backend/app/__init__.py"
click node_task_endpoint "https://github.com/qoziwe/academicspace/blob/main/backend/app/api/v1/tasks.py"
click node_domain_models "https://github.com/qoziwe/academicspace/blob/main/backend/app/models/task.py"
click node_ai_router "https://github.com/qoziwe/academicspace/blob/main/backend/app/services/ai/router.py"
click node_ai_providers "https://github.com/qoziwe/academicspace/blob/main/backend/app/services/ai/base.py"
click node_payment_router "https://github.com/qoziwe/academicspace/blob/main/backend/app/services/payments/router.py"
click node_storage_router "https://github.com/qoziwe/academicspace/blob/main/backend/app/services/storage/router.py"
click node_payment_provider "https://github.com/qoziwe/academicspace/blob/main/backend/app/services/payments/mock_provider.py"
click node_storage_provider "https://github.com/qoziwe/academicspace/blob/main/backend/app/services/storage/local.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_admissions,node_portfolio,node_mentor,node_documents,node_flashcards,node_studytools,node_profile,node_subscription toneBlue
class node_taskadapter,node_http_tasks,node_http_client toneAmber
class node_app_factory,node_task_endpoint,node_domain_models toneMint
class node_ai_router,node_ai_providers,node_payment_router,node_storage_router,node_payment_provider,node_storage_provider toneRose
class node_student toneIndigo
```

## Components

### Student app

- [App entry](https://github.com/qoziwe/academicspace/blob/main/frontend/app/index.tsx): `frontend/app/index.tsx`
- [University matching](https://github.com/qoziwe/academicspace/blob/main/frontend/app/universities/results.tsx): `frontend/app/universities/results.tsx`
- [Portfolio analysis](https://github.com/qoziwe/academicspace/blob/main/frontend/app/ai/analysis/preview.tsx): `frontend/app/ai/analysis/preview.tsx`
- [AI mentor](https://github.com/qoziwe/academicspace/blob/main/frontend/app/ai/chat.tsx): `frontend/app/ai/chat.tsx`
- [Document vault](https://github.com/qoziwe/academicspace/blob/main/frontend/app/documents/index.tsx): `frontend/app/documents/index.tsx`
- [Flashcards](https://github.com/qoziwe/academicspace/blob/main/frontend/app/flashcards/index.tsx): `frontend/app/flashcards/index.tsx`
- [Tasks and focus](https://github.com/qoziwe/academicspace/blob/main/frontend/app/tasks/index.tsx): `frontend/app/tasks/index.tsx`
- [Profile and rewards](https://github.com/qoziwe/academicspace/blob/main/frontend/app/profile/index.tsx): `frontend/app/profile/index.tsx`
- [Subscriptions](https://github.com/qoziwe/academicspace/blob/main/frontend/app/subscription/plans.tsx): `frontend/app/subscription/plans.tsx`

### API access

- [Tasks adapter](https://github.com/qoziwe/academicspace/blob/main/frontend/services/api/tasks.ts): `frontend/services/api/tasks.ts`
- [Tasks HTTP adapter](https://github.com/qoziwe/academicspace/blob/main/frontend/services/api/http/tasks.ts): `frontend/services/api/http/tasks.ts`
- [HTTP client](https://github.com/qoziwe/academicspace/blob/main/frontend/services/api/http/client.ts): `frontend/services/api/http/client.ts`

### Backend domain

- [Flask app setup](https://github.com/qoziwe/academicspace/blob/main/backend/app/__init__.py): `backend/app/__init__.py`
- [Task endpoints](https://github.com/qoziwe/academicspace/blob/main/backend/app/api/v1/tasks.py): `backend/app/api/v1/tasks.py`
- [Domain models](https://github.com/qoziwe/academicspace/blob/main/backend/app/models/task.py): `backend/app/models/task.py`

### Provider services

- [AI provider selection](https://github.com/qoziwe/academicspace/blob/main/backend/app/services/ai/router.py): `backend/app/services/ai/router.py`
- [AI providers](https://github.com/qoziwe/academicspace/blob/main/backend/app/services/ai/base.py): `backend/app/services/ai/base.py`
- [Payment selection](https://github.com/qoziwe/academicspace/blob/main/backend/app/services/payments/router.py): `backend/app/services/payments/router.py`
- [Storage selection](https://github.com/qoziwe/academicspace/blob/main/backend/app/services/storage/router.py): `backend/app/services/storage/router.py`
- [Mock payment provider](https://github.com/qoziwe/academicspace/blob/main/backend/app/services/payments/mock_provider.py): `backend/app/services/payments/mock_provider.py`
- [Local storage provider](https://github.com/qoziwe/academicspace/blob/main/backend/app/services/storage/local.py): `backend/app/services/storage/local.py`

### Other components

- **Student**

## Connections

- Student → App entry: uses (evidence: `README.md`)
- Tasks adapter → Tasks HTTP adapter: selects HTTP (evidence: `frontend/services/api/tasks.ts`)
- Tasks HTTP adapter → HTTP client: calls (evidence: `frontend/services/api/http/tasks.ts`)
- Task endpoints → Domain models: queries and updates (evidence: `backend/app/api/v1/tasks.py`)
- Flask app setup → Domain models: loads models (evidence: `backend/app/__init__.py`)
- AI provider selection → AI providers: selects provider (evidence: `backend/app/services/ai/router.py`)
- Payment selection → Mock payment provider: selects provider (evidence: `backend/app/services/payments/router.py`)
- Storage selection → Local storage provider: selects backend (evidence: `backend/app/services/storage/router.py`)
