# exa-studio/apivault architecture

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

- Interactive diagram: https://gitdiagram.com/exa-studio/apivault
- Repository: https://github.com/exa-studio/apivault

## Overview

##### Project type and purpose
- ApiVault is a full-stack, containerized web application that catalogs and exposes a searchable vault of public APIs.
- The frontend is built with Nuxt.js/Vue.js (SSR + SPA), and the backend uses Django + Django REST Framework (DRF) with PostgreSQL.

##### File structure
- Top-level “frontend” and “backend” folders, each with its own Dockerfile, .env.dev, and docker-compose.yml.
- “backend/apivault” Django project, plus three Django apps: authentication, interaction (feedback), and vault (data).
- Configuration artifacts: docker-compose.yml (root & per-service), GitHub Actions workflows (.github/workflows), management commands for data population, DRF-YASG static files for API docs.
- Frontend: nuxt.config.ts, pages/, components/, plugins/, services/ (ApivaultServices, GithubServices), Firebase & Bootstrap plugin clients.

##### README for additional insights
- Emphasizes Docker Compose orchestration of client, server, and database.
- Workflow: after cloning, front/backend .env setup, then `docker-compose up`.
- Built-with badges: Nuxt.js, Vue.js, Django.

##### Elements
- Browser → Frontend (SSR & API proxy)
- Frontend → Backend (REST calls)
- Backend → Database (SQL queries)
- Backend → External Data Source (management commands)
- Frontend → Firebase/Google OAuth
- GitHub Actions → build/test → Docker Registry/Compose
- Blue for user-facing components (Browser, Frontend)
- Green for backend services (Django API)
- Orange for data stores (PostgreSQL)
- Purple for external services
- Gray for CI/CD pipelines

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% User Layer
    subgraph "User Layer"
        Browser["User (Browser)"]:::frontend
    end

    %% Web Tier
    subgraph "Web Tier"
        FrontendService["Frontend Service\nNuxt.js + Vue\n(HTTP:3000)"]:::frontend
        subgraph "Frontend Components"
            FE_Config["nuxt.config.ts"]:::frontend
            FE_Pages["Pages"]:::frontend
            FE_Components["Components"]:::frontend
            FE_Services["Services"]:::frontend
            FE_Plugins["Plugins"]:::frontend
            FE_Env[".env.dev"]:::frontend
        end
    end

    %% API Tier
    subgraph "API Tier"
        BackendService["Backend Service\nDjango + DRF\n(HTTP:8000)"]:::backend
        subgraph "Django Apps"
            BE_Auth["Authentication App"]:::backend
            BE_Inter["Interaction App"]:::backend
            BE_Vault["Vault App"]:::backend
        end
        BE_Core["Django Project Core"]:::backend
        BE_Docker["Dockerfile & Compose"]:::backend
        BE_Fixtures["Fixtures"]:::backend
        BE_Env_Backend[".env.dev"]:::backend
        BE_Docs["API Docs\n(/swagger/, /redoc/)"]:::backend
    end

    %% Database Tier
    subgraph "Database Tier"
        Postgres["PostgreSQL\nPort:5432"]:::database
        DB_Env[".env.dev"]:::database
    end

    %% External Services
    subgraph "External Services"
        OAuth["Google OAuth"]:::external
        Firebase["Firebase SDK"]:::external
        PublicAPIs["Public APIs Data"]:::external
        GitHub["GitHub for contributions"]:::external
    end

    %% CI/CD Pipelines
    subgraph "CI/CD"
        CI_Node["Node.js Workflow"]:::cicd
        CI_Django["Django Workflow"]:::cicd
    end

    %% Connections
    Browser -->|"SSR & Client Nav\nHTTP:3000"| FrontendService
    FrontendService -->|"REST API\nHTTP:8000"| BackendService
    BackendService -->|"ORM SQL\n5432"| Postgres
    BackendService -->|"Fetch Data"| PublicAPIs
    FrontendService -->|"SDK Calls"| Firebase
    FrontendService -->|"OAuth Flow"| OAuth
    CI_Node -->|"Build/Test"| FrontendService
    CI_Django -->|"Build/Test"| BackendService

    %% Click Events Frontend
    click FrontendService "https://github.com/exa-studio/apivault/tree/main/frontend/"
    click FE_Config "https://github.com/exa-studio/apivault/blob/main/frontend/nuxt.config.ts"
    click FE_Pages "https://github.com/exa-studio/apivault/tree/main/frontend/pages/"
    click FE_Components "https://github.com/exa-studio/apivault/tree/main/frontend/components/"
    click FE_Services "https://github.com/exa-studio/apivault/blob/main/frontend/services/ApivaultServices.ts"
    click FE_Services "https://github.com/exa-studio/apivault/blob/main/frontend/services/GithubServices.ts"
    click FE_Plugins "https://github.com/exa-studio/apivault/blob/main/frontend/plugins/bootstrap.client.ts"
    click FE_Plugins "https://github.com/exa-studio/apivault/blob/main/frontend/plugins/firebase.client.ts"
    click FE_Plugins "https://github.com/exa-studio/apivault/blob/main/frontend/plugins/fontawesome.ts"
    click FE_Env "https://github.com/exa-studio/apivault/blob/main/frontend/.env.dev"

    %% Click Events Backend
    click BE_Docker "https://github.com/exa-studio/apivault/tree/main/backend/docker/Dockerfile"
    click BE_Docker "https://github.com/exa-studio/apivault/blob/main/backend/docker-compose.yml"
    click BE_Core "https://github.com/exa-studio/apivault/tree/main/backend/apivault/"
    click BE_Auth "https://github.com/exa-studio/apivault/tree/main/backend/authentication/"
    click BE_Inter "https://github.com/exa-studio/apivault/tree/main/backend/interaction/"
    click BE_Vault "https://github.com/exa-studio/apivault/tree/main/backend/vault/"
    click BE_Vault "https://github.com/exa-studio/apivault/blob/main/backend/vault/management/commands/populate_api_data.py"
    click BE_Vault "https://github.com/exa-studio/apivault/blob/main/backend/vault/management/commands/add_apis_guru_data.py"
    click BE_Fixtures "https://github.com/exa-studio/apivault/blob/main/backend/fixtures/apis.json"
    click BE_Fixtures "https://github.com/exa-studio/apivault/blob/main/backend/fixtures/categories.json"
    click BE_Env_Backend "https://github.com/exa-studio/apivault/blob/main/backend/.env.dev"
    click BE_Docs "https://github.com/exa-studio/apivault/tree/main/backend/static/drf-yasg/"

    %% Click Events Database
    click DB_Env "https://github.com/exa-studio/apivault/blob/main/.env.dev"
    click Postgres "https://github.com/exa-studio/apivault/blob/main/docker-compose.yml"
    click Postgres "https://github.com/exa-studio/apivault/blob/main/docker-compose.dev.yml"

    %% Click Events CI/CD
    click CI_Node "https://github.com/exa-studio/apivault/blob/main/.github/workflows/node.js.yml"
    click CI_Django "https://github.com/exa-studio/apivault/blob/main/.github/workflows/django.yml"

    %% Styles
    classDef frontend fill:#cce5ff,stroke:#004085,color:#004085;
    classDef backend fill:#d4edda,stroke:#155724,color:#155724;
    classDef database fill:#fff3cd,stroke:#856404,color:#856404;
    classDef external fill:#e2e3e5,stroke:#6c757d,color:#6c757d;
    classDef cicd fill:#f8d7da,stroke:#721c24,color:#721c24;
```
