# empacts-github/empacts-matching-fe architecture

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

- Interactive diagram: https://gitdiagram.com/empacts-github/empacts-matching-fe
- Repository: https://github.com/empacts-github/empacts-matching-fe

## Overview

##### Project type and purpose
- This is a full-stack, React-based front-end application built with Next.js (app router), styled with Tailwind CSS and PostCSS, and deployed on Vercel.
- Its purpose is to provide a mentor–startup matching platform: users can sign up as mentors or startups, manage profiles, browse matches, schedule meetings, and upload documents.

##### File structure
- Top-level config: next.config.js, tailwind.config.ts, tsconfig.json, ESLint/Prettier/GitHub templates.
- `src/app/` contains Next.js pages, layouts, global CSS, auth flows, protected routes.
- `src/apis/` is a client-side API layer (auth.ts, mentor.ts, startup.ts, upload.ts, etc.) that wraps calls to REST endpoints.
- `src/components/` & `src/containers/` implement UI atoms, molecules, and pages following a component-container pattern.
- `src/stores/` holds global state (error, matching, mentor, startup stores), likely using Zustand or similar.
- Utilities, constants, interfaces, services, and hooks support business logic and data formatting.

##### README
- Confirms Next.js 13 project scaffold, development commands, and Vercel deployment.
- No built-in backend in this repo—backend is an external set of REST services.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Front-end Layer
    subgraph "Front-end (Browser & Next.js)" 
        direction TB
        Browser["User Browser"]:::frontend
        CDN["CDN (Static Assets)"]:::frontend
        Vercel["Vercel Edge"]:::frontend
        subgraph "Next.js Application" 
            direction TB
            NextApp["Next.js App (SSR/CSR & Routing)"]:::frontend
            Layout["Global Layout & Providers"]:::frontend
            AuthFlows["Authentication Flows"]:::frontend
            StaticAssets["Public Static Assets"]:::frontend
            APIClient["Client-side API Layer"]:::frontend
            Stores["Client-side State Stores"]:::frontend
            Components["UI Atomic Components"]:::frontend
            Containers["UI Container Components"]:::frontend
            ConstInterfaces["Constants & Interfaces"]:::frontend
            Utils["Utility Functions & Data"]:::frontend
            Services["Core Services"]:::frontend
            Configs["Next/Tailwind/PostCSS/TS Config"]:::config
        end
    end

    %% Backend Services
    subgraph "External Backend Services" 
        direction TB
        AuthSvc["Auth Service"]:::backend
        MentorMatchSvc["Mentor Matching Service"]:::backend
        MentorProfileSvc["Mentor Profile Service"]:::backend
        StartupMatchSvc["Startup Matching Service"]:::backend
        StartupProfileSvc["Startup Profile Service"]:::backend
        UploadSvc["File Upload Service"]:::backend
    end

    %% Data Layer
    subgraph "Data & Storage" 
        direction TB
        Database["Relational/NoSQL Database"]:::data
        ObjectStorage["Object Storage (Uploads)"]:::data
    end

    %% Relationships
    Browser -->|"HTTPS Request"| CDN
    CDN -->|"Fetch Static Files"| Browser
    Browser -->|"Navigate/Interact"| NextApp
    Browser -->|"Hydration"| NextApp
    NextApp -->|"Uses Layout & Providers"| Layout
    NextApp -->|"Renders Auth Pages"| AuthFlows
    NextApp -->|"Serves Assets"| StaticAssets
    NextApp -->|"Calls APIs via"| APIClient
    NextApp -->|"Reads/Writes State"| Stores
    NextApp -->|"Renders UI"| Components
    Components -->|"Uses Containers"| Containers
    Containers -->|"Imports Consts/Interfaces"| ConstInterfaces
    Containers -->|"Calls Utils/Services"| Utils
    Containers -->|"Calls Utils/Services"| Services
    NextApp -->|"Loads Configs"| Configs

    APIClient -->|"HTTP Calls"| AuthSvc
    APIClient -->|"HTTP Calls"| MentorMatchSvc
    APIClient -->|"HTTP Calls"| MentorProfileSvc
    APIClient -->|"HTTP Calls"| StartupMatchSvc
    APIClient -->|"HTTP Calls"| StartupProfileSvc
    APIClient -->|"HTTP Calls"| UploadSvc

    AuthSvc -->|"Reads/Writes"| Database
    MentorMatchSvc -->|"Reads/Writes"| Database
    MentorProfileSvc -->|"Reads/Writes"| Database
    StartupMatchSvc -->|"Reads/Writes"| Database
    StartupProfileSvc -->|"Reads/Writes"| Database
    UploadSvc -->|"Stores Files"| ObjectStorage

    %% Click Events - Front-end
    click NextApp "https://github.com/empacts-github/empacts-matching-fe/tree/main/src/app"
    click Layout "https://github.com/empacts-github/empacts-matching-fe/blob/main/src/app/layout.tsx"
    click Layout "https://github.com/empacts-github/empacts-matching-fe/blob/main/src/app/Providers.tsx"
    click AuthFlows "https://github.com/empacts-github/empacts-matching-fe/tree/main/src/app/auth"
    click StaticAssets "https://github.com/empacts-github/empacts-matching-fe/tree/main/public/assets"
    click Configs "https://github.com/empacts-github/empacts-matching-fe/blob/main/tailwind.config.ts"
    click Configs "https://github.com/empacts-github/empacts-matching-fe/blob/main/postcss.config.js"
    click Configs "https://github.com/empacts-github/empacts-matching-fe/blob/main/next.config.js"
    click Configs "https://github.com/empacts-github/empacts-matching-fe/blob/main/tsconfig.json"
    click APIClient "https://github.com/empacts-github/empacts-matching-fe/tree/main/src/apis"
    click AuthSvc "https://github.com/empacts-github/empacts-matching-fe/blob/main/src/apis/auth.ts"
    click MentorMatchSvc "https://github.com/empacts-github/empacts-matching-fe/blob/main/src/apis/mentor-matching.ts"
    click MentorProfileSvc "https://github.com/empacts-github/empacts-matching-fe/blob/main/src/apis/mentor-profile.ts"
    click StartupMatchSvc "https://github.com/empacts-github/empacts-matching-fe/blob/main/src/apis/startup-matching.ts"
    click StartupProfileSvc "https://github.com/empacts-github/empacts-matching-fe/blob/main/src/apis/startup-profile.ts"
    click UploadSvc "https://github.com/empacts-github/empacts-matching-fe/blob/main/src/apis/upload.ts"
    click Stores "https://github.com/empacts-github/empacts-matching-fe/tree/main/src/stores"
    click Stores "https://github.com/empacts-github/empacts-matching-fe/blob/main/src/stores/error-store.ts"
    click Stores "https://github.com/empacts-github/empacts-matching-fe/blob/main/src/stores/matching-store.ts"
    click Stores "https://github.com/empacts-github/empacts-matching-fe/blob/main/src/stores/mentor-store.ts"
    click Stores "https://github.com/empacts-github/empacts-matching-fe/blob/main/src/stores/search-store.ts"
    click Stores "https://github.com/empacts-github/empacts-matching-fe/blob/main/src/stores/startup-store.ts"
    click Components "https://github.com/empacts-github/empacts-matching-fe/tree/main/src/components"
    click Containers "https://github.com/empacts-github/empacts-matching-fe/tree/main/src/containers"
    click ConstInterfaces "https://github.com/empacts-github/empacts-matching-fe/tree/main/src/constants"
    click ConstInterfaces "https://github.com/empacts-github/empacts-matching-fe/tree/main/src/interfaces"
    click Utils "https://github.com/empacts-github/empacts-matching-fe/tree/main/src/utils"
    click Services "https://github.com/empacts-github/empacts-matching-fe/tree/main/src/services"

    %% Styles
    classDef frontend fill:#D6EFFF,stroke:#333,stroke-width:1px
    classDef backend fill:#D6F5D6,stroke:#333,stroke-width:1px
    classDef data fill:#FFE6CC,stroke:#333,stroke-width:1px
    classDef config fill:#F0E5FF,stroke:#333,stroke-width:1px
```
