# longlekuro2106/finance-tracker-app architecture

> Architecture diagram of the GitHub repository longlekuro2106/finance-tracker-app, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-11-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/longlekuro2106/finance-tracker-app
- Repository: https://github.com/longlekuro2106/finance-tracker-app

## Overview

##### Project Type and Purpose
- This is a full-stack finance tracker application (“finance-tracker-app”) consisting of:
- A React/Next.js 13 frontend (client/) that renders pages, components, and implements API routes.
- A NestJS backend (server/) exposing a REST API, using Prisma ORM to persist data in a relational database (e.g., PostgreSQL).
- The app’s use case is to let authenticated users create, view, edit, and categorize financial transactions.

##### File-Structure Analysis
- Top-level:
- client/ – Next.js 13 “app” directory with pages, API route handlers under client/app/api, React UI components under client/components, config files (tsconfig.json, next.config.ts), and static assets (public/).
- server/ – NestJS application with modules (auth, users, transactions, categories), DTOs, controllers, services, Prisma schema + migrations, and test suite.
- Architectural patterns:
- Frontend uses the Next.js App Router, Server Components, and API Routes (route.ts files) to handle client-side navigation and to proxy API calls.
- Backend follows NestJS’s modular MVC pattern: Controllers → Services → (Prisma) ORM → Database.
- Deployment/config: GitHub Workflows, ESLint, Prettier, build scripts, Prisma migrations.

##### Key Insights from the README
- The README simply names the project (“finance-tracker-app”), so the structure itself reveals the intended architecture: full-stack with separate client and server codebases.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Legend
    subgraph "Legend"
        direction TB
        UI["UI Components (Blue)"]:::frontend
        APIComp["API Components (Green)"]:::api
        DBComp["Database (Orange)"]:::database
        CIComp["CI/CD (Gray)"]:::ci
    end

    %% Browser
    Browser["User Web Browser"]:::external

    %% Frontend Layer
    subgraph "Frontend Layer"
        direction TB
        UIBox["Next.js Frontend"]:::frontend
        subgraph "UI Rendering"
            direction TB
            ClientApp["Pages & Layouts\n(client/app)"]:::frontend
            Components["React Components\n(client/components)"]:::frontend
        end
        subgraph "API Routes"
            direction TB
            APIRoutes["Serverless API Routes\n(client/app/api)"]:::api
        end
        subgraph "Config & Tools"
            direction TB
            TSConfigClient["tsconfig.json"]:::config
            NextConfig["next.config.ts"]:::config
            ESLintClient["eslint.config.mjs"]:::config
        end
    end

    %% Backend Layer
    subgraph "Backend Layer"
        direction TB
        ServerCore["NestJS Backend"]:::backend
        subgraph "Modules & Services"
            direction TB
            AuthModule["Auth Module\n(server/src/auth)"]:::api
            UsersModule["Users Module\n(server/src/users)"]:::api
            TransModule["Transactions Module\n(server/src/transactions)"]:::api
            CatModule["Categories Module\n(server/src/categories)"]:::api
            CommonUtils["Common Utils\n(server/src/common)"]:::api
            PrismaService["Prisma Service\n(server/src/prisma/prisma.service.ts)"]:::api
        end
        subgraph "Core Bootstrap"
            direction TB
            MainFile["main.ts"]:::api
            AppModule["app.module.ts"]:::api
            AppController["app.controller.ts"]:::api
            AppService["app.service.ts"]:::api
        end
        subgraph "ORM & Data"
            direction TB
            PrismaSchema["schema.prisma"]:::database
            Migrations["migrations"]:::database
            SeedScript["seed.ts"]:::database
            PostgresDB["Relational Database\n(PostgreSQL)"]:::database
        end
        subgraph "Backend Config"
            direction TB
            TSConfigServer["tsconfig.json"]:::config
            TSConfigBuild["tsconfig.build.json"]:::config
            ESLintServer["eslint.config.mjs"]:::config
            Prettier[".prettierrc"]:::config
            NestCLI["nest-cli.json"]:::config
        end
    end

    %% CI/CD
    CICD["GitHub Actions CI/CD\n(.github/workflows/status-checking.yml)"]:::ci

    %% E2E Tests
    E2E["E2E Tests\n(server/test/app.e2e-spec.ts)"]:::test

    %% Relationships
    Browser -->|"HTTP/HTTPS"| UIBox
    UIBox -->|"renders Pages & Components"| ClientApp
    UIBox -->|"uses Components"| Components
    UIBox -->|"fetch()/submit()"| APIRoutes
    ClientApp --> APIRoutes
    APIRoutes -->|"HTTP REST"| ServerCore
    ServerCore --> AuthModule
    ServerCore --> UsersModule
    ServerCore --> TransModule
    ServerCore --> CatModule
    AuthModule --> CommonUtils
    UsersModule --> CommonUtils
    TransModule --> CommonUtils
    CatModule --> CommonUtils
    AuthModule --> PrismaService
    UsersModule --> PrismaService
    TransModule --> PrismaService
    CatModule --> PrismaService
    PrismaService --> PrismaSchema
    PrismaService --> Migrations
    PrismaService --> SeedScript
    PrismaService --> PostgresDB
    MainFile --> AppModule
    AppModule --> AppController
    AppModule --> AppService
    ServerCore --> MainFile
    CICD --> ClientApp
    CICD --> ServerCore
    E2E --> ServerCore
    E2E --> PostgresDB

    %% Styles
    classDef frontend fill:#D0E7FF,stroke:#0366d6,color:#0366d6
    classDef api fill:#DFFFE0,stroke:#28a745,color:#28a745
    classDef database fill:#FFEFD5,stroke:#FF8C00,color:#FF8C00
    classDef config fill:#F0F0F0,stroke:#CCCCCC,color:#333333
    classDef ci fill:#E8E8E8,stroke:#6a737d,color:#6a737d
    classDef test fill:#FFF5F5,stroke:#d73a49,color:#d73a49
    classDef external fill:#FFFFFF,stroke:#000000,color:#000000

    %% Click Events
    click ClientApp "https://github.com/longlekuro2106/finance-tracker-app/tree/main/client/app"
    click Components "https://github.com/longlekuro2106/finance-tracker-app/tree/main/client/components"
    click APIRoutes "https://github.com/longlekuro2106/finance-tracker-app/tree/main/client/app/api"
    click TSConfigClient "https://github.com/longlekuro2106/finance-tracker-app/blob/main/client/tsconfig.json"
    click NextConfig "https://github.com/longlekuro2106/finance-tracker-app/blob/main/client/next.config.ts"
    click ESLintClient "https://github.com/longlekuro2106/finance-tracker-app/blob/main/client/eslint.config.mjs"
    click ServerCore "https://github.com/longlekuro2106/finance-tracker-app/tree/main/server/src"
    click AuthModule "https://github.com/longlekuro2106/finance-tracker-app/tree/main/server/src/auth"
    click UsersModule "https://github.com/longlekuro2106/finance-tracker-app/tree/main/server/src/users"
    click TransModule "https://github.com/longlekuro2106/finance-tracker-app/tree/main/server/src/transactions"
    click CatModule "https://github.com/longlekuro2106/finance-tracker-app/tree/main/server/src/categories"
    click CommonUtils "https://github.com/longlekuro2106/finance-tracker-app/tree/main/server/src/common"
    click PrismaService "https://github.com/longlekuro2106/finance-tracker-app/blob/main/server/src/prisma/prisma.service.ts"
    click MainFile "https://github.com/longlekuro2106/finance-tracker-app/blob/main/server/src/main.ts"
    click AppModule "https://github.com/longlekuro2106/finance-tracker-app/blob/main/server/src/app.module.ts"
    click AppController "https://github.com/longlekuro2106/finance-tracker-app/blob/main/server/src/app.controller.ts"
    click AppService "https://github.com/longlekuro2106/finance-tracker-app/blob/main/server/src/app.service.ts"
    click TSConfigServer "https://github.com/longlekuro2106/finance-tracker-app/blob/main/server/tsconfig.json"
    click TSConfigBuild "https://github.com/longlekuro2106/finance-tracker-app/blob/main/server/tsconfig.build.json"
    click ESLintServer "https://github.com/longlekuro2106/finance-tracker-app/blob/main/server/eslint.config.mjs"
    click Prettier "https://github.com/longlekuro2106/finance-tracker-app/blob/main/server/.prettierrc"
    click NestCLI "https://github.com/longlekuro2106/finance-tracker-app/blob/main/server/nest-cli.json"
    click PrismaSchema "https://github.com/longlekuro2106/finance-tracker-app/blob/main/server/prisma/schema.prisma"
    click Migrations "https://github.com/longlekuro2106/finance-tracker-app/tree/main/server/prisma/migrations"
    click SeedScript "https://github.com/longlekuro2106/finance-tracker-app/blob/main/server/prisma/seed.ts"
    click CICD "https://github.com/longlekuro2106/finance-tracker-app/blob/main/.github/workflows/status-checking.yml"
    click E2E "https://github.com/longlekuro2106/finance-tracker-app/blob/main/server/test/app.e2e-spec.ts"
```
