# wildcodeschool/2023-09-wns-vert-groupe3 architecture

> Architecture diagram of the GitHub repository wildcodeschool/2023-09-wns-vert-groupe3, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/wildcodeschool/2023-09-wns-vert-groupe3
- Repository: https://github.com/wildcodeschool/2023-09-wns-vert-groupe3

## Overview

##### Project type and purpose
- This is a full-stack web application (“Wildrent”) for an equipment rental company.
- It consists of:
- A GraphQL backend (Node.js + TypeORM + PostgreSQL)
- A Next.js frontend (React + Tailwind + Radix UI)
- An auxiliary image-upload microservice
- End-to-end (Playwright) tests
- Docker Compose orchestration for development, production, and E2E environments

##### File structure
- Top-level folders:
- backend/ – GraphQL API, TypeORM entities, migrations, services, resolvers
- frontend/ – Next.js app with pages, components, contexts, styles, and API routes
- imagesupload/ – standalone Dockerized microservice for handling image assets
- e2e/ – Playwright tests and Dockerfile to run browser-based tests
- Config and orchestration:
- docker-compose.yml (development), docker-compose.prod.yml, docker-compose.e2e.yml
- .env.* files for environment-specific settings
- nginx.conf for reverse-proxy setup
- CI:
- .github/workflows/jest-ci.yml for backend unit tests

##### README for additional insights
- The README confirms:
- Backend: GraphQL, PostgreSQL, TypeORM
- Frontend: Next.js, SSR, TailwindCSS, Radix UI
- Deployment via Docker Compose (development & production)
- Future integrations: Stripe payments, multi-hub storage, internationalization

##### Detail and essential elements
- Environment variables (.env) as a note on configuration management.
- Build or CI steps if relevant (e.g., Jest CI pipeline).

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Presentation Layer
    subgraph "Presentation Layer"
        Client["Client (Browser/Mobile)"]:::frontend
        Frontend["Frontend Service (Next.js)"]:::frontend
    end

    %% Business Logic Layer
    subgraph "Business Logic Layer"
        Backend["GraphQL API (Node.js, TypeORM)"]:::backend
        ImageService["Image Upload Microservice"]:::aux
    end

    %% Data Layer
    subgraph "Data Layer"
        DB["PostgreSQL"]:::data
    end

    %% External Services
    subgraph "External Services"
        Stripe["Stripe Payment Service"]:::ext
    end

    %% CI/Test
    subgraph "CI/Test"
        CI["CI Pipeline (Jest)"]:::test
        E2E["E2E Test Runner (Playwright)"]:::test
    end

    %% Reverse Proxy
    Nginx["Nginx Reverse Proxy"]:::aux

    %% Connections
    Client -->|"HTTPS"| Nginx
    Nginx -->|"/_next/static & public"| Frontend
    Nginx -->|"/api/graphql"| Backend
    Frontend -->|"GraphQL Queries/Mutations"| Backend
    Backend -->|"SQL via TypeORM"| DB
    Backend -->|"HTTP Uploads"| ImageService
    Frontend -->|"Direct Upload API"| ImageService
    Backend -->|"Checkout Integration"| Stripe
    E2E -->|"HTTP Tests"| Frontend
    E2E -->|"GraphQL Tests"| Backend
    CI -->|"Unit Tests"| Backend

    %% Click Events
    click Backend "https://github.com/wildcodeschool/2023-09-wns-vert-groupe3/tree/main/backend/"
    click Frontend "https://github.com/wildcodeschool/2023-09-wns-vert-groupe3/tree/main/frontend/"
    click ImageService "https://github.com/wildcodeschool/2023-09-wns-vert-groupe3/tree/main/imagesupload/"
    click E2E "https://github.com/wildcodeschool/2023-09-wns-vert-groupe3/tree/main/e2e/"
    click CI "https://github.com/wildcodeschool/2023-09-wns-vert-groupe3/blob/main/.github/workflows/jest-ci.yml"
    click Nginx "https://github.com/wildcodeschool/2023-09-wns-vert-groupe3/blob/main/nginx.conf"

    %% Styles
    classDef frontend fill:#ccf,stroke:#336699,color:#000;
    classDef backend fill:#cfc,stroke:#339933,color:#000;
    classDef data fill:#fcf,stroke:#993399,color:#000;
    classDef aux fill:#fcc,stroke:#993333,color:#000;
    classDef ext fill:#eef,stroke:#666699,color:#000;
    classDef test fill:#ffc,stroke:#996600,color:#000;
```
