# brucewang15/watclub architecture

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

- Interactive diagram: https://gitdiagram.com/brucewang15/watclub
- Repository: https://github.com/brucewang15/watclub

## Overview

##### Project Overview & Main Components
- WatClub is a full-stack web application that helps users find and review clubs, design teams, and intramurals at the University of Waterloo.
- The key components include:
- Frontend: A React application (found under the “static” directory) using Redux for state management. It includes UI components for navigation, club search, display pages, profiles, comments, and filtering.
- Backend: A Django RESTful API (with entry points in “manage.py”, “config/settings.py”, and several Django apps such as “comments_and_ratings”, “organizations”, “users”, and “recommendation_system”). Each Django app is responsible for a distinct part of the functionality such as user management, organization handling, and managing reviews.
- Database: SQLite (db.sqlite3) as configured in Django.
- Data Ingestion & Processing: There are modules dealing with data loading and web scraping (“organizations/management/commands”, “webscraping” directories) and even a recommendation system component.
- Containerization & Deployment: Docker files and docker-compose indicate containerized deployment.

##### Architectural Relationships & Interactions
- The backend is made up of several apps:
- “organizations”: Handles club/organization data (including data loading from JSON files and web scraping),
- “comments_and_ratings”: Manages user feedback and ratings,
- “users”: Manages user authentication, profile settings, and related commands,
- “recommendation_system”: Builds and potentially serves recommendations for clubs.
- The “webscraping” module is used to aggregate data from different sources, and so it should be represented as a component that feeds data into the “organizations” module or an external ETL layer.
- Docker and docker-compose indicate that the entire application (frontend, backend, and possibly data services) can be deployed in containers. This can be depicted around the main components to emphasize container orchestration.

## Diagram (Mermaid)

```mermaid
graph TD
  %% Deployment Artifacts
  subgraph "Deployment Artifacts"
    D1("Dockerfile"):::containerization
    D2("docker-compose.yml"):::containerization
    D3("Static Dockerfile"):::containerization
  end

  %% Containerization Layer
  subgraph "Containerization (Docker)"
    FE("Frontend – React/Redux"):::frontend
    BE("Backend API – Django"):::backend
    DB("Database – SQLite"):::database
  end

  %% Django Applications (Backend Submodules)
  subgraph "Django Applications"
    ORG("Organizations Module"):::backend
    COM("Comments & Ratings Module"):::backend
    USR("Users Module"):::backend
    REC("Recommendation System"):::backend
  end

  %% Data Ingestion Components
  subgraph "Data Ingestion"
    CMD("Management Commands"):::data
    WS("Web Scraping Scripts"):::data
  end

  %% Connections between Deployment Artifacts and Containerization
  D1 -->|"deploys"| BE
  D2 -->|"orchestrates"| BE
  D3 -->|"deploys"| FE

  %% Main application flow
  FE -->|"REST_API_calls"| BE
  BE -->|"data_persistence"| DB

  %% Backend internal structure
  BE --> ORG
  BE --> COM
  BE --> USR
  BE --> REC

  %% Data ingestion feeding into Organizations Module
  CMD -->|"load_data"| ORG
  WS -->|"scrapes_data"| ORG

  %% Click Events
  click FE "https://github.com/brucewang15/watclub/tree/main/static/"
  click BE "https://github.com/brucewang15/watclub/blob/main/manage.py"
  click ORG "https://github.com/brucewang15/watclub/tree/main/organizations/"
  click COM "https://github.com/brucewang15/watclub/tree/main/comments_and_ratings/"
  click USR "https://github.com/brucewang15/watclub/tree/main/users/"
  click REC "https://github.com/brucewang15/watclub/tree/main/recommendation_system/"
  click DB "https://github.com/brucewang15/watclub/blob/main/db.sqlite3"
  click CMD "https://github.com/brucewang15/watclub/tree/main/organizations/management/commands/"
  click WS "https://github.com/brucewang15/watclub/tree/main/webscraping/"
  click D1 "https://github.com/brucewang15/watclub/tree/main/Dockerfile"
  click D2 "https://github.com/brucewang15/watclub/blob/main/docker-compose.yml"
  click D3 "https://github.com/brucewang15/watclub/tree/main/static/Dockerfile"

  %% Styles
  classDef frontend fill:#AED6F1,stroke:#2471A3,stroke-width:2px;
  classDef backend fill:#A9DFBF,stroke:#196F3D,stroke-width:2px;
  classDef database fill:#F9E79F,stroke:#B7950B,stroke-width:2px;
  classDef data fill:#FAD7A0,stroke:#E67E22,stroke-width:2px;
  classDef containerization fill:#D7BDE2,stroke:#8E44AD,stroke-width:2px;
```
