# forif-npo/forif-official architecture

> Architecture diagram of the GitHub repository forif-npo/forif-official, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/forif-npo/forif-official
- Repository: https://github.com/forif-npo/forif-official

## Overview

##### Project Type and Purpose
- This project is the official website for Hanyang University’s largest academic programming club (“FORIF-OFFICIAL”). It consists of two main applications – an Admin portal and a User-oriented website – that share common component libraries and utilities.
- The README outlines font style guidelines, suggesting that typography and consistent UI design are important. The website likely displays information-rich pages with clearly defined text presentation (display, headline, title, body, label).

##### Key Components Identified from the File Tree
- Administrative App (apps/admin): Contains routes for dashboard, posts, studies, members, authentication, and common UI components such as AppBar and SideBar.
- User App (apps/user): Contains routes for announcements, applications, club information, FAQ, hackathon details, studies, tech-blog, and UI components such as AppBar, error pages, and profile.
- Shared Component Library (packages/components): A reusable library of UI components including common elements (Button, Input, Modal, etc.), form components, and table components.
- Shared Constants and Configuration (packages/constants, packages/ts-config, .eslintrc, .prettierrc, etc.): These files govern global code formatting, standards, and TypeScript configurations.
- GitHub Workflows & Scripts: Contains CI/CD configurations for deployment, inspections, and push events.
- Testing and Build Tools: While not explicitly diagrammed, note that configuration files such as pnpm-workspace.yaml and package.json at the root highlight that this is a monorepo with multiple packages and apps.

##### Relationships and Interactions
- Each application has its own routing structure, service layers, and state management (stores), which interact with the UI layer.

##### Architectural Patterns and Design Principles
- The separation into apps (admin and user) points to a multi-application, monorepo architecture.
- Both apps follow a component-based architecture (React with TypeScript) and emphasize proper UI abstraction by reusing common UI components from packages/components.
- The structure of routes and services in the apps suggests adherence to design patterns like MVC (Model-View-Controller) – where routes/pages (views) interact with services (controllers and models) and state stores.
- Usage of tools for code consistency (e.g., ESLint, Prettier) and CI/CD workflows reflects good DevOps practices integrated into the project architecture.

## Diagram (Mermaid)

```mermaid
flowchart TD

    %% Monorepo & Build Tools
    subgraph "Monorepo & Build Tools"
        MW("pnpm-workspace.yaml"):::buildTool
        PK("package.json"):::buildTool
    end

    %% Deployment and CI/CD
    subgraph "Deployment and CI/CD"
        CICD("CI/CD Pipeline"):::cicd
    end

    %% Shared Resources
    subgraph "Shared Resources"
        COMP("Shared Component Library"):::shared
        subgraph "Constants and Configurations"
            CONST("Constants"):::sharedConfig
            TS("TS Config"):::sharedConfig
            ESL("ESLint Config"):::sharedConfig
            PRE("Prettier Config"):::sharedConfig
        end
    end

    %% Admin Application
    subgraph "Admin Application (apps/admin)"
        adminRoutes("Admin Routes"):::admin
        adminUI("Admin UI Components"):::admin
        adminService("Admin Services"):::admin
        adminStore("Admin State Management"):::admin
    end

    %% User Application
    subgraph "User Application (apps/user)"
        userRoutes("User Routes"):::user
        userUI("User UI Components"):::user
        userService("User Services"):::user
        userStore("User State Management"):::user
    end

    %% External API
    API(("External API")):::external

    %% Connections
    MW --> PK
    PK --> CICD
    CICD --> adminRoutes
    CICD --> userRoutes
    CICD --> COMP
    CICD --> CONST

    adminRoutes --> adminUI
    adminUI --> adminService
    adminService --> adminStore

    userRoutes --> userUI
    userUI --> userService
    userService --> userStore

    adminUI --> COMP
    userUI --> COMP

    adminService --> CONST
    userService --> CONST

    adminService -->|"callsAPI"| API
    userService -->|"callsAPI"| API

    %% Click Events
    click adminRoutes "https://github.com/forif-npo/forif-official/tree/main/apps/admin"
    click userRoutes "https://github.com/forif-npo/forif-official/tree/main/apps/user"
    click COMP "https://github.com/forif-npo/forif-official/tree/main/packages/components"
    click CONST "https://github.com/forif-npo/forif-official/tree/main/packages/constants"
    click TS "https://github.com/forif-npo/forif-official/tree/main/packages/ts-config"
    click CICD "https://github.com/forif-npo/forif-official/tree/main/.github/workflows"
    click MW "https://github.com/forif-npo/forif-official/blob/main/pnpm-workspace.yaml"
    click PK "https://github.com/forif-npo/forif-official/blob/main/package.json"
    click ESL "https://github.com/forif-npo/forif-official/blob/main/.eslintrc.js"
    click PRE "https://github.com/forif-npo/forif-official/blob/main/.prettierrc.json"

    %% Styles
    classDef admin fill:#E8F5E9,stroke:#388E3C,stroke-width:2px;
    classDef user fill:#E3F2FD,stroke:#1976D2,stroke-width:2px;
    classDef shared fill:#FFF9C4,stroke:#FBC02D,stroke-width:2px;
    classDef sharedConfig fill:#FFF59D,stroke:#F9A825,stroke-width:2px;
    classDef cicd fill:#FFCCBC,stroke:#E64A19,stroke-width:2px;
    classDef buildTool fill:#F3E5F5,stroke:#8E24AA,stroke-width:2px;
    classDef external fill:#ECEFF1,stroke:#607D8B,stroke-width:2px;
```
