# shishirise/2143-object-oriented-programming architecture

> Architecture diagram of the GitHub repository shishirise/2143-object-oriented-programming, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/shishirise/2143-object-oriented-programming
- Repository: https://github.com/shishirise/2143-object-oriented-programming

## Overview

##### Project type and purpose
- From the file tree we see this repo is a collection of OOP course assignments (A01–A07, H01–H07, P01, Notes).
- The most “software‐architecture”–oriented subproject is P01, which implements a simple RESTful API (meteorites.py) for meteorite data (meteorites.json) with separate docs for GET, POST, DELETE, UPDATE.
- The README simply contains personal/contact info and no high‐level architecture description.

##### File structure
- Top level:
- Assignment/A04–A07 and Homework PDFs – pure deliverables, no code.
- Assignment/P01 – the only code directory:
– MAIN code: meteorites.py
– JSON: meteorites.json (data store)
– Method folders (GET, POST, DELETE, UPDATE): markdown docs describing each route
- No build or deployment scripts; likely run via `python meteorites.py`.
- No frontend code, no external databases—just a file‐based store.

##### Architecture overview for P01
- This is a single‐process, RESTful web service:
a) HTTP client (e.g. curl, Postman, browser)
b) Python Flask (or similar) application (meteorites.py) implementing CRUD routes
c) JSON file (meteorites.json) serving as the persistent datastore
- Under the hood the application will:
- Parse incoming HTTP requests (GET/POST/PUT/DELETE)
- Them to class methods (per the UML: e.g. MeteoriteManager, Meteorite classes)
- Read/write the JSON file
- Return JSON responses and HTTP status codes

##### Additional advice
- Domain classes inside a “Domain Model” container.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Components
    Client["Client"]:::external
    Service["REST API Service"]:::service
    subgraph "Domain Model"
        Meteorite["Meteorite Class"]:::domain
        Manager["MeteoriteManager Class"]:::domain
    end
    Datastore[(meteorites.json)]:::datastore

    subgraph "Documentation"
        GETdoc["GET Route Spec"]:::docs
        POSTdoc["POST Route Spec"]:::docs
        DELETEdoc["DELETE Route Spec"]:::docs
        UPDATEdoc["UPDATE Route Spec"]:::docs
        UML["UML Diagram"]:::docs
        MainDoc["Main Code Overview"]:::docs
    end

    %% Flows
    Client -->|"HTTP GET/POST/PUT/DELETE"| Service
    Service -->|"instantiate, call CRUD methods"| Manager
    Manager -->|"use Meteorite entity"| Meteorite
    Manager -->|"read/write JSON file"| Datastore
    Meteorite -->|"return objects/status codes"| Service
    Service -->|"JSON response, HTTP status"| Client

    %% Click Events
    click Service "https://github.com/shishirise/2143-object-oriented-programming/blob/main/Assignment/P01/MAIN code/meteorites.py"
    click Meteorite "https://github.com/shishirise/2143-object-oriented-programming/blob/main/Assignment/P01/MAIN code/meteorites.py"
    click Datastore "https://github.com/shishirise/2143-object-oriented-programming/blob/main/Assignment/P01/JSON/meteorites.json"
    click GETdoc "https://github.com/shishirise/2143-object-oriented-programming/blob/main/Assignment/P01/GET method/GETmethod.md"
    click POSTdoc "https://github.com/shishirise/2143-object-oriented-programming/blob/main/Assignment/P01/POST Method/Post.md"
    click DELETEdoc "https://github.com/shishirise/2143-object-oriented-programming/blob/main/Assignment/P01/DELETE Method/DELETE.md"
    click UPDATEdoc "https://github.com/shishirise/2143-object-oriented-programming/blob/main/Assignment/P01/UPDATE Method/Update.md"
    click UML "https://github.com/shishirise/2143-object-oriented-programming/blob/main/Assignment/P01/Uml diagram/uml.md"
    click MainDoc "https://github.com/shishirise/2143-object-oriented-programming/blob/main/Assignment/P01/MAIN code/maincode.md"

    %% Styles
    classDef external fill:#ADD8E6,stroke:#000,stroke-width:1px
    classDef service fill:#90EE90,stroke:#000,stroke-width:1px
    classDef domain fill:#98FB98,stroke:#000,stroke-width:1px
    classDef datastore fill:#FFFF99,stroke:#000,stroke-width:1px
    classDef docs fill:#D3D3D3,stroke:#000,stroke-width:1px
```
