# pr0xiuss/stacksense architecture

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

- Interactive diagram: https://gitdiagram.com/pr0xiuss/stacksense
- Repository: https://github.com/pr0xiuss/stacksense

## Overview

StackSense is a source-code intelligence platform with authenticated project and repository management, plus a repository-ingestion workflow that captures source revisions and exposes discovered artifacts. The visible path runs from the repository UI through ingestion API endpoints to the ingestion application service; source acquisition, validation, classification, and persistence are represented from the repository structure and documented API capabilities, but their internal calls were not sampled. The frontend also provides sign-in and project-management flows. Dashed edges indicate these unverified implementation links.

Main entry points: [`backend/platform/ingestion/application/service.py`](https://github.com/pr0xiuss/stacksense/blob/main/backend/platform/ingestion/application/service.py) (Ingestion orchestration), [`frontend/src/pages/RepositoryDetailPage.jsx`](https://github.com/pr0xiuss/stacksense/blob/main/frontend/src/pages/RepositoryDetailPage.jsx) (Repository detail), [`backend/api/v1/router.py`](https://github.com/pr0xiuss/stacksense/blob/main/backend/api/v1/router.py) (API v1 routing), [`frontend/src/App.jsx`](https://github.com/pr0xiuss/stacksense/blob/main/frontend/src/App.jsx) (App routing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_appui["App routing<br/>[App.jsx]"]
  node_authui["Authentication UI<br/>[AuthPage.jsx]"]
  node_dashboard["Projects dashboard"]
  node_repositoryui["Repository detail"]
  node_ingestionui["Ingestion views<br/>[IngestionTab.jsx]"]
  node_ingestionmodal["Ingestion submission"]
  node_authserviceui["Auth API client<br/>[authService.js]"]
  node_ingestionclient["Ingestion API client"]
  node_projectclient["Project API client<br/>[projectService.js]"]
  node_repoclient["Repository API client"]
end

subgraph group_access["Identity and access"]
  node_authapi["Authentication endpoints<br/>[auth.py]"]
  node_identity["Identity services<br/>[auth_service.py]"]
end

subgraph group_catalog["Project catalog"]
  node_projectapi["Project endpoints<br/>[projects.py]"]
  node_repositoryapi["Repository endpoints<br/>[repositories.py]"]
  node_catalogservice["Repository services<br/>[service.py]"]
end

subgraph group_ingestion["Source ingestion"]
  node_ingestionapi["Ingestion endpoints<br/>[ingestions.py]"]
  node_ingestionservice["Ingestion orchestration<br/>[service.py]"]
  node_acquisition["Source acquisition<br/>[acquisition.py]"]
  node_validation["Source validation<br/>[validator.py]"]
  node_classification["Artifact classification<br/>[classifier.py]"]
  node_storage["Source storage<br/>[local_storage.py]"]
  node_ingestionrecords[("Ingestion records")]
end

subgraph group_platform["Runtime platform"]
  node_api["FastAPI application<br/>[app.py]"]
  node_router["API v1 routing<br/>[router.py]"]
  node_postgres[("PostgreSQL<br/>[postgres.py]")]
end

node_user(("User"))

node_user -->|"uses"| node_appui
node_appui -->|"routes to"| node_dashboard
node_appui -->|"routes to"| node_repositoryui
node_user -.->|"signs in"| node_authui
node_authui -.->|"requests auth"| node_authserviceui
node_dashboard -.->|"loads projects"| node_projectclient
node_dashboard -.->|"manages repositories"| node_repoclient
node_repositoryui -->|"renders"| node_ingestionui
node_repositoryui -->|"loads ingestions"| node_ingestionclient
node_repositoryui -->|"loads project"| node_projectclient
node_repositoryui -->|"loads repository"| node_repoclient
node_ingestionmodal -->|"submits source"| node_ingestionclient
node_ingestionclient -.->|"sends API requests"| node_api
node_authserviceui -.->|"sends API requests"| node_api
node_api -->|"mounts routes"| node_router
node_router -->|"registers"| node_authapi
node_router -->|"registers"| node_ingestionapi
node_router -->|"registers"| node_projectapi
node_router -->|"registers"| node_repositoryapi
node_authapi -.->|"delegates auth"| node_identity
node_projectapi -.->|"delegates project work"| node_catalogservice
node_repositoryapi -.->|"delegates repository work"| node_catalogservice
node_ingestionapi -->|"delegates requests"| node_ingestionservice
node_ingestionservice -.->|"acquires source"| node_acquisition
node_ingestionservice -.->|"validates source"| node_validation
node_ingestionservice -.->|"classifies artifacts"| node_classification
node_ingestionservice -.->|"stores source"| node_storage
node_ingestionservice -.->|"persists status"| node_ingestionrecords
node_ingestionrecords -.->|"stores records"| node_postgres

click node_appui "https://github.com/pr0xiuss/stacksense/blob/main/frontend/src/App.jsx"
click node_authui "https://github.com/pr0xiuss/stacksense/blob/main/frontend/src/pages/AuthPage.jsx"
click node_dashboard "https://github.com/pr0xiuss/stacksense/blob/main/frontend/src/pages/ProjectsDashboardPage.jsx"
click node_repositoryui "https://github.com/pr0xiuss/stacksense/blob/main/frontend/src/pages/RepositoryDetailPage.jsx"
click node_ingestionui "https://github.com/pr0xiuss/stacksense/blob/main/frontend/src/components/repository/IngestionTab.jsx"
click node_ingestionmodal "https://github.com/pr0xiuss/stacksense/blob/main/frontend/src/components/repository/NewIngestionModal.jsx"
click node_authserviceui "https://github.com/pr0xiuss/stacksense/blob/main/frontend/src/services/authService.js"
click node_ingestionclient "https://github.com/pr0xiuss/stacksense/blob/main/frontend/src/services/ingestionService.js"
click node_projectclient "https://github.com/pr0xiuss/stacksense/blob/main/frontend/src/services/projectService.js"
click node_repoclient "https://github.com/pr0xiuss/stacksense/blob/main/frontend/src/services/repositoryService.js"
click node_api "https://github.com/pr0xiuss/stacksense/blob/main/backend/api/app.py"
click node_router "https://github.com/pr0xiuss/stacksense/blob/main/backend/api/v1/router.py"
click node_authapi "https://github.com/pr0xiuss/stacksense/blob/main/backend/api/v1/auth.py"
click node_identity "https://github.com/pr0xiuss/stacksense/blob/main/backend/platform/identity/application/auth_service.py"
click node_projectapi "https://github.com/pr0xiuss/stacksense/blob/main/backend/api/v1/projects.py"
click node_repositoryapi "https://github.com/pr0xiuss/stacksense/blob/main/backend/api/v1/repositories.py"
click node_catalogservice "https://github.com/pr0xiuss/stacksense/blob/main/backend/platform/repositories/application/service.py"
click node_ingestionapi "https://github.com/pr0xiuss/stacksense/blob/main/backend/api/v1/ingestions.py"
click node_ingestionservice "https://github.com/pr0xiuss/stacksense/blob/main/backend/platform/ingestion/application/service.py"
click node_acquisition "https://github.com/pr0xiuss/stacksense/blob/main/backend/platform/ingestion/application/acquisition.py"
click node_validation "https://github.com/pr0xiuss/stacksense/blob/main/backend/platform/ingestion/application/validator.py"
click node_classification "https://github.com/pr0xiuss/stacksense/blob/main/backend/platform/ingestion/application/classifier.py"
click node_storage "https://github.com/pr0xiuss/stacksense/blob/main/backend/platform/ingestion/infra/storage/local_storage.py"
click node_ingestionrecords "https://github.com/pr0xiuss/stacksense/blob/main/backend/platform/ingestion/infra/ingestion_repository.py"
click node_postgres "https://github.com/pr0xiuss/stacksense/blob/main/backend/infra/postgres.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_appui,node_authui,node_dashboard,node_repositoryui,node_ingestionui,node_ingestionmodal,node_authserviceui,node_ingestionclient,node_projectclient,node_repoclient,node_user toneBlue
class node_authapi,node_identity toneAmber
class node_projectapi,node_repositoryapi,node_catalogservice toneMint
class node_ingestionapi,node_ingestionservice,node_acquisition,node_validation,node_classification,node_storage,node_ingestionrecords toneRose
class node_api,node_router,node_postgres toneIndigo
```

## Components

### Web client

- [App routing](https://github.com/pr0xiuss/stacksense/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Authentication UI](https://github.com/pr0xiuss/stacksense/blob/main/frontend/src/pages/AuthPage.jsx): `frontend/src/pages/AuthPage.jsx`
- [Projects dashboard](https://github.com/pr0xiuss/stacksense/blob/main/frontend/src/pages/ProjectsDashboardPage.jsx): `frontend/src/pages/ProjectsDashboardPage.jsx`
- [Repository detail](https://github.com/pr0xiuss/stacksense/blob/main/frontend/src/pages/RepositoryDetailPage.jsx): `frontend/src/pages/RepositoryDetailPage.jsx`
- [Ingestion views](https://github.com/pr0xiuss/stacksense/blob/main/frontend/src/components/repository/IngestionTab.jsx): `frontend/src/components/repository/IngestionTab.jsx`
- [Ingestion submission](https://github.com/pr0xiuss/stacksense/blob/main/frontend/src/components/repository/NewIngestionModal.jsx): `frontend/src/components/repository/NewIngestionModal.jsx`
- [Auth API client](https://github.com/pr0xiuss/stacksense/blob/main/frontend/src/services/authService.js): `frontend/src/services/authService.js`
- [Ingestion API client](https://github.com/pr0xiuss/stacksense/blob/main/frontend/src/services/ingestionService.js): `frontend/src/services/ingestionService.js`
- [Project API client](https://github.com/pr0xiuss/stacksense/blob/main/frontend/src/services/projectService.js): `frontend/src/services/projectService.js`
- [Repository API client](https://github.com/pr0xiuss/stacksense/blob/main/frontend/src/services/repositoryService.js): `frontend/src/services/repositoryService.js`

### Identity and access

- [Authentication endpoints](https://github.com/pr0xiuss/stacksense/blob/main/backend/api/v1/auth.py): `backend/api/v1/auth.py`
- [Identity services](https://github.com/pr0xiuss/stacksense/blob/main/backend/platform/identity/application/auth_service.py): `backend/platform/identity/application/auth_service.py`

### Project catalog

- [Project endpoints](https://github.com/pr0xiuss/stacksense/blob/main/backend/api/v1/projects.py): `backend/api/v1/projects.py`
- [Repository endpoints](https://github.com/pr0xiuss/stacksense/blob/main/backend/api/v1/repositories.py): `backend/api/v1/repositories.py`
- [Repository services](https://github.com/pr0xiuss/stacksense/blob/main/backend/platform/repositories/application/service.py): `backend/platform/repositories/application/service.py`

### Source ingestion

- [Ingestion endpoints](https://github.com/pr0xiuss/stacksense/blob/main/backend/api/v1/ingestions.py): `backend/api/v1/ingestions.py`
- [Ingestion orchestration](https://github.com/pr0xiuss/stacksense/blob/main/backend/platform/ingestion/application/service.py): `backend/platform/ingestion/application/service.py`
- [Source acquisition](https://github.com/pr0xiuss/stacksense/blob/main/backend/platform/ingestion/application/acquisition.py): `backend/platform/ingestion/application/acquisition.py`
- [Source validation](https://github.com/pr0xiuss/stacksense/blob/main/backend/platform/ingestion/application/validator.py): `backend/platform/ingestion/application/validator.py`
- [Artifact classification](https://github.com/pr0xiuss/stacksense/blob/main/backend/platform/ingestion/application/classifier.py): `backend/platform/ingestion/application/classifier.py`
- [Source storage](https://github.com/pr0xiuss/stacksense/blob/main/backend/platform/ingestion/infra/storage/local_storage.py): `backend/platform/ingestion/infra/storage/local_storage.py`
- [Ingestion records](https://github.com/pr0xiuss/stacksense/blob/main/backend/platform/ingestion/infra/ingestion_repository.py): `backend/platform/ingestion/infra/ingestion_repository.py`

### Runtime platform

- [FastAPI application](https://github.com/pr0xiuss/stacksense/blob/main/backend/api/app.py): `backend/api/app.py`
- [API v1 routing](https://github.com/pr0xiuss/stacksense/blob/main/backend/api/v1/router.py): `backend/api/v1/router.py`
- [PostgreSQL](https://github.com/pr0xiuss/stacksense/blob/main/backend/infra/postgres.py): `backend/infra/postgres.py`

### Other components

- **User**

## Connections

- User → App routing: uses
- App routing → Projects dashboard: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Repository detail: routes to (evidence: `frontend/src/App.jsx`)
- User → Authentication UI: signs in
- Authentication UI → Auth API client: requests auth
- Projects dashboard → Project API client: loads projects
- Projects dashboard → Repository API client: manages repositories
- Repository detail → Ingestion views: renders (evidence: `frontend/src/pages/RepositoryDetailPage.jsx`)
- Repository detail → Ingestion API client: loads ingestions (evidence: `frontend/src/pages/RepositoryDetailPage.jsx`)
- Repository detail → Project API client: loads project (evidence: `frontend/src/pages/RepositoryDetailPage.jsx`)
- Repository detail → Repository API client: loads repository (evidence: `frontend/src/pages/RepositoryDetailPage.jsx`)
- Ingestion submission → Ingestion API client: submits source (evidence: `frontend/src/components/repository/NewIngestionModal.jsx`)
- Ingestion API client → FastAPI application: sends API requests
- Auth API client → FastAPI application: sends API requests
- FastAPI application → API v1 routing: mounts routes (evidence: `backend/api/app.py`)
- API v1 routing → Authentication endpoints: registers (evidence: `backend/api/v1/router.py`)
- API v1 routing → Ingestion endpoints: registers (evidence: `backend/api/v1/router.py`)
- API v1 routing → Project endpoints: registers (evidence: `backend/api/v1/router.py`)
- API v1 routing → Repository endpoints: registers (evidence: `backend/api/v1/router.py`)
- Authentication endpoints → Identity services: delegates auth
- Project endpoints → Repository services: delegates project work
- Repository endpoints → Repository services: delegates repository work
- Ingestion endpoints → Ingestion orchestration: delegates requests (evidence: `backend/api/v1/ingestions.py`)
- Ingestion orchestration → Source acquisition: acquires source
- Ingestion orchestration → Source validation: validates source
- Ingestion orchestration → Artifact classification: classifies artifacts
- Ingestion orchestration → Source storage: stores source
- Ingestion orchestration → Ingestion records: persists status
- Ingestion records → PostgreSQL: stores records
