# maryamrachid/job-fiksi-app architecture

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

- Interactive diagram: https://gitdiagram.com/maryamrachid/job-fiksi-app
- Repository: https://github.com/maryamrachid/job-fiksi-app

## Overview

##### Project type and purpose
- This is a full-stack Angular application using Angular Universal (server.ts + main.server.ts) for Server-Side Rendering (SSR).
- It serves a job-listing and user-profile interface in the browser, fetching data via a REST API (via offres.service.ts).

##### File structure
- Top-level “server.ts” + “main.server.ts” indicate a Node/Express SSR entrypoint.
- “src” holds the Angular client code:
– src/main.ts: bootstrap CSR application
– src/main.server.ts + server.ts: bootstrap SSR via Express
– src/app: root AppModule, routing, config files.
– Feature modules: offers-components.module.ts, profile-components.module.ts, pages.module.ts, shared.module.ts.
- assets/public: static assets and webmanifest.
- Configuration: angular.json, tsconfig*.json, ngsw-config.json (service worker).

##### Extract additional insights from README
- Built with Angular CLI v18.2.9
- Standard Angular dev/build/test commands
– Browser ↔ SSR server ↔ External API
– SSR hydration to CSR

##### Main components
a. Browser (Client)
b. Node/Express SSR Server
c. Angular Universal (main.server.ts + server.ts)
d. Angular Client Application (main.ts → AppModule)
e. Feature Modules & Components:
- Offers module (filter, job-list, job-details, search-bar)
- Profile module (contact, cv, experiences, formation, …)
- Shared module (header, menu)
- Pages module (home, login, profile pages)
f. OffresService (REST client)
g. External REST API (job offers, user profiles)
h. Static assets host (public folder)

##### Relationships and interactions
- Browser → HTTP GET → SSR Server (server.ts)
– SSR server invokes Angular Universal (main.server.js bundle)
– SSR server may fetch data via OffresService (calls external API)
– SSR server returns pre-rendered HTML + CSS + JS
- Browser receives SSR HTML → bootstraps Angular CSR (main.ts)
– Angular Router (app-routing.module.ts/app.routes.ts) drives client navigation
– Components call OffresService to fetch real-time data from API

##### Architectural patterns/design principles
- Universal/isomorphic rendering (SSR + CSR)
- Angular modularization (feature modules for separation of concerns)
- Service abstraction (OffresService for API interactions)
- Lazy loading (if configured in app.routes.ts)

##### Final checklist
– All primary components present and labeled
– Notes on module boundaries and lazy-loading if used
– Indication of where unit tests (spec.ts files) and service worker (ngsw-config.json) fit in

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Server-Side Layer
    subgraph "Server-Side (SSR)" 
        direction TB
        SSRServer["SSR Server\n(Node/Express)"]:::server
        AngularUniversal["Angular Universal Bundle\n(main.server.js)"]:::server
        ServerConfig["Server Config\n(app.config.server.ts)"]:::server
    end

    %% Client-Side Layer
    subgraph "Client-Side (CSR)"
        direction TB
        Browser["Browser (Client)"]:::client
        AngularApp["Angular AppModule"]:::client
        ClientConfig["Client Config\n(app.config.ts)"]:::client
        AppRouting["App Routing\n(app-routing.module.ts,\napp.routes.ts)"]:::client
        subgraph "Feature Modules"
            direction TB
            OffersModule["Offers Module"]:::client
            ProfileModule["Profile Module"]:::client
            PagesModule["Pages Module"]:::client
            SharedModule["Shared Module"]:::client
        end
    end

    %% Services & External
    subgraph "Services & API"
        direction TB
        OffresService["OffresService"]:::service
        ExternalAPI["External REST API"]:::service
    end

    %% Static & Config
    subgraph "Static & Build"
        direction TB
        StaticAssets["Static Assets\n(public/)"]:::static
        SWConfig["Service Worker Config\n(ngsw-config.json)"]:::static
        CLIConfig["Angular CLI Config\n(angular.json)"]:::static
        TSConfigs["TS Configs\n(tsconfig*.json)"]:::static
    end

    %% Build Artifacts
    dist["Build Output\n(dist/)"]:::static

    %% Relationships
    Browser -->|"HTTP GET"| SSRServer
    SSRServer -->|"uses"| AngularUniversal
    SSRServer -->|"fetch data via"| OffresService
    OffresService -->|"REST calls"| ExternalAPI
    SSRServer -->|"rendered HTML"| Browser

    Browser -->|"bootstrap\n(main.ts)"| AngularApp
    AngularApp -->|imports| AppRouting
    AngularApp -->|imports| OffersModule
    AngularApp -->|imports| ProfileModule
    AngularApp -->|imports| PagesModule
    AngularApp -->|imports| SharedModule
    Browser -->|"requests"| StaticAssets
    Browser -->|"runtime API calls"| OffresService
    OffresService -->|"REST calls"| ExternalAPI

    %% Build flow
    CLIConfig -->|build| dist
    TSConfigs -->|compile| dist
    SWConfig -->|bundle| dist

    %% Click Events
    click SSRServer "https://github.com/maryamrachid/job-fiksi-app/blob/main/server.ts"
    click AngularUniversal "https://github.com/maryamrachid/job-fiksi-app/blob/main/src/main.server.ts"
    click Browser "https://github.com/maryamrachid/job-fiksi-app/blob/main/src/main.ts"
    click AngularApp "https://github.com/maryamrachid/job-fiksi-app/blob/main/src/app/app.module.ts"
    click AppRouting "https://github.com/maryamrachid/job-fiksi-app/blob/main/src/app/app-routing.module.ts"
    click AppRouting "https://github.com/maryamrachid/job-fiksi-app/blob/main/src/app/app.routes.ts"
    click ServerConfig "https://github.com/maryamrachid/job-fiksi-app/blob/main/src/app/app.config.server.ts"
    click ClientConfig "https://github.com/maryamrachid/job-fiksi-app/blob/main/src/app/app.config.ts"
    click OffersModule "https://github.com/maryamrachid/job-fiksi-app/blob/main/src/offers-components.module.ts"
    click ProfileModule "https://github.com/maryamrachid/job-fiksi-app/blob/main/src/app/profile-components/profile-components.module.ts"
    click PagesModule "https://github.com/maryamrachid/job-fiksi-app/blob/main/src/app/pages/pages.module.ts"
    click SharedModule "https://github.com/maryamrachid/job-fiksi-app/blob/main/src/app/shared/shared.module.ts"
    click OffresService "https://github.com/maryamrachid/job-fiksi-app/blob/main/src/app/offres.service.ts"
    click StaticAssets "https://github.com/maryamrachid/job-fiksi-app/tree/main/public/"
    click SWConfig "https://github.com/maryamrachid/job-fiksi-app/blob/main/ngsw-config.json"
    click CLIConfig "https://github.com/maryamrachid/job-fiksi-app/blob/main/angular.json"
    click TSConfigs "https://github.com/maryamrachid/job-fiksi-app/blob/main/tsconfig.json"
    click TSConfigs "https://github.com/maryamrachid/job-fiksi-app/blob/main/tsconfig.app.json"
    click TSConfigs "https://github.com/maryamrachid/job-fiksi-app/blob/main/tsconfig.spec.json"

    %% Styles
    classDef server fill:#FFA500,stroke:#333,stroke-width:1px
    classDef client fill:#ADD8E6,stroke:#333,stroke-width:1px
    classDef service fill:#90EE90,stroke:#333,stroke-width:1px
    classDef static fill:#D3D3D3,stroke:#333,stroke-width:1px
```
