# samithreddychinni/university-management-system architecture

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

- Interactive diagram: https://gitdiagram.com/samithreddychinni/university-management-system
- Repository: https://github.com/samithreddychinni/university-management-system

## Overview

##### Project Overview & Type
- The project is a console-based, CRUD application developed using Java procedural programming.
- It covers four major domain modules – Student Portal, Cafe Management System, Library Management System, and Transport Management System.
- The system relies on file handling (text files stored in a hierarchy of directories) for data persistence, and the user interacts via the console while both user-level and admin-level operations exist.

##### Main Architectural Components
a. User Interfaces and Controllers:
- Main Entrance (Main.java) – Acts as the primary controller initiating the program.
- Separate interfaces for User operations (e.g., signing up, logging in, course registration) and Admin operations (viewing or modifying stored data).

b. Domain Modules:
- Student Portal Module – Handles user registrations, course registration (CourseRegistration.java, Courses.java), and student records.
- Cafe Management Module – Manages functionalities such as displaying menus, item selection (DrinkSelection.java, FoodSelection.java, Displaymenu.java), bill generation, and payment processing. Use files under the "cafe" directory to illustrate storage of menus and bills.
- Library Management Module – Covers book searches, borrowing, returns, and fines (LibraryManagement.java, Library.java). Representation should include files like AvailableBooks.txt and BorrowedBooks.
- Transport Management Module – Deals with bus registrations, route information, and fee handling (TMS.java, TransportManagement.java). The "transport" directory (including Bus ID files and registration data) is key to illustrating data persistence.

c. Data Persistence (File Handling Subsystem):
- File-based storage for each module (e.g., "cafe", "courses", "library", "transport", and additional files like "roll_numbers" and "students_data").
- Configuration files and naming patterns (each student or transaction is stored as a reg_number.txt or similar naming convention).

##### Relationships and Interactions
- The Main controller directs flow to the appropriate module based on user type (Admin vs. Student) and selected operation.
- Each module performs CRUD operations on its respective data store (resolved through file-handling operations).

##### Architectural Patterns and Design Principles
- Separation of Concerns – Each domain (Student Portal, Cafe, Library, Transport) is neatly separated into its own set of classes and file directories.
- Procedural Programming – Note that the application is not object-oriented in the full enterprise sense but is organized into discrete functions across Java files.
- Data Persistence via File System – Instead of a database, the design relies on directories and text files. This can be indicated as an I/O subsystem that all modules interact with.

##### Including Relevant Technologies and Libraries
- Java for the core logic.
- Basic file I/O operations (using Java’s standard libraries such as java.io.*).
- Since it is a console-based application, no GUI frameworks are involved.

##### Final Recommendations
- Even though the system is primarily file-based and procedural, showing the “layers of responsibility” (user input, processing logic, and data storage) will benefit future development or maintenance.
- Double-check that the square aspect ratio and decreased overall width are maintained so that your design remains visually balanced when presented.

## Diagram (Mermaid)

```mermaid
flowchart TD
    MC["Main Controller (Main.java)"]:::controller

    subgraph "Core Modules"
        AD["Admin Interface (Admin.java)"]:::controller
        SP["Student Portal"]:::student
        CM["Cafe Management"]:::cafe
        LM["Library Management"]:::library
        TM["Transport Management"]:::transport
    end

    MC -->|"selects"| AD
    MC -->|"selects"| SP
    MC -->|"selects"| CM
    MC -->|"selects"| LM
    MC -->|"selects"| TM

    subgraph "Student Portal Details"
        SP1["Course Registration (CourseRegistration.java)"]:::student
        SP2["Courses (Courses.java)"]:::student
        SP3["Roll Numbers (roll_numbers)"]:::storage
        SP4["Student Data (students_data)"]:::storage
    end

    SP --> SP1
    SP --> SP2
    SP --> SP3
    SP --> SP4

    subgraph "Cafe Management Details"
        CM1["Cafe (Cafe.java)"]:::cafe
        CM2["Cafe Management (CafeManagement.java)"]:::cafe
        CM3["Display Menu (Displaymenu.java)"]:::cafe
        CM4["Drink Selection (DrinkSelection.java)"]:::cafe
        CM5["Food Selection (FoodSelection.java)"]:::cafe
        CM6["Cafe Directory (cafe)"]:::storage
    end

    CM --> CM1
    CM --> CM2
    CM --> CM3
    CM --> CM4
    CM --> CM5
    CM --> CM6

    subgraph "Library Management Details"
        LM1["Library (Library.java)"]:::library
        LM2["Library Management (LibraryManagement.java)"]:::library
        LM3["Library Directory (library)"]:::storage
    end

    LM --> LM1
    LM --> LM2
    LM --> LM3

    subgraph "Transport Management Details"
        TM1["TMS (TMS.java)"]:::transport
        TM2["Transport Management (TransportManagement.java)"]:::transport
        TM3["Transport Directory (transport)"]:::storage
    end

    TM --> TM1
    TM --> TM2
    TM --> TM3

    FHS["File Handling System"]:::storage

    SP3 ---|"reads/writes"| FHS
    SP4 ---|"reads/writes"| FHS
    CM6 ---|"reads/writes"| FHS
    LM3 ---|"reads/writes"| FHS
    TM3 ---|"reads/writes"| FHS

    %% Click Events
    click MC "https://github.com/samithreddychinni/university-management-system/blob/master/Main.java"
    click AD "https://github.com/samithreddychinni/university-management-system/blob/master/Admin.java"
    click SP1 "https://github.com/samithreddychinni/university-management-system/blob/master/CourseRegistration.java"
    click SP2 "https://github.com/samithreddychinni/university-management-system/blob/master/Courses.java"
    click SP3 "https://github.com/samithreddychinni/university-management-system/tree/master/roll_numbers"
    click SP4 "https://github.com/samithreddychinni/university-management-system/blob/master/students_data/FA18-BCS-131.txt"
    click CM1 "https://github.com/samithreddychinni/university-management-system/blob/master/Cafe.java"
    click CM2 "https://github.com/samithreddychinni/university-management-system/blob/master/CafeManagement.java"
    click CM3 "https://github.com/samithreddychinni/university-management-system/blob/master/Displaymenu.java"
    click CM4 "https://github.com/samithreddychinni/university-management-system/blob/master/DrinkSelection.java"
    click CM5 "https://github.com/samithreddychinni/university-management-system/blob/master/FoodSelection.java"
    click CM6 "https://github.com/samithreddychinni/university-management-system/tree/master/cafe"
    click LM1 "https://github.com/samithreddychinni/university-management-system/blob/master/Library.java"
    click LM2 "https://github.com/samithreddychinni/university-management-system/blob/master/LibraryManagement.java"
    click LM3 "https://github.com/samithreddychinni/university-management-system/tree/master/library"
    click TM1 "https://github.com/samithreddychinni/university-management-system/blob/master/TMS.java"
    click TM2 "https://github.com/samithreddychinni/university-management-system/blob/master/TransportManagement.java"
    click TM3 "https://github.com/samithreddychinni/university-management-system/tree/master/transport"

    %% Styles
    classDef controller fill:#ffcc00,stroke:#333,stroke-width:2px;
    classDef student fill:#ccffcc,stroke:#333,stroke-width:2px;
    classDef cafe fill:#99ccff,stroke:#333,stroke-width:2px;
    classDef library fill:#ff9999,stroke:#333,stroke-width:2px;
    classDef transport fill:#ffccff,stroke:#333,stroke-width:2px;
    classDef storage fill:#eeeeee,stroke:#666,stroke-dasharray: 5 5;

    %% Adjust overall layout for square compact view (using rankdir to force top-down vertical flow)
    %% This helps in keeping the layout vertically balanced and compact.
    linkStyle default stroke:#2f4f4f,stroke-width:2px,color:#2f4f4f
```
