From b9a76e43c71668df563cf1fee95801a260d9d0eb Mon Sep 17 00:00:00 2001 From: Anant Nagaraj Hegde Date: Mon, 7 Jul 2025 11:34:39 +0530 Subject: [PATCH 1/7] Create README.md --- README.md | 159 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 159 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..68244ba --- /dev/null +++ b/README.md @@ -0,0 +1,159 @@ +# Equipment Management System + +This project is a comprehensive equipment management system designed to streamline construction operations. It consists of two main parts: a Spring Boot backend for managing data and a Next.js frontend for providing a user interface. The system allows for tracking equipment, managing maintenance, handling financial transactions, and generating reports. + +## Technologies Used + +* **Backend:** Spring Boot, Java 17 +* **Frontend:** Next.js 14, React, Tailwind CSS, Radix UI, Supabase + +## Backend Setup + +### Prerequisites + +* Java Development Kit (JDK) version 17 +* Maven +* MySQL Database + +### Configuration + +1. **Database Configuration:** Update the `application.properties` file located in `backend/src/main/resources/` with your MySQL database credentials. Example: + + ```properties + spring.datasource.url=jdbc:mysql://localhost:3306/machinery-mgmt?createDatabaseIfNotExist=true&useSSL=false&serverTimezone=UTC&useSSL=false&allowPublicKeyRetrieval=true + spring.datasource.username=root + spring.datasource.password=password + ``` + +2. **Build the Application:** Navigate to the `backend/` directory and use the Maven wrapper to build the project. + + ```bash + ./mvnw clean install + ``` + +3. **Run the Application:** After building, run the Spring Boot application. + + ```bash + java -jar target/machinary-mgmt-0.0.1-SNAPSHOT.jar + ``` + +### Key Backend Components + +* **DataInitializer.java:** Initializes the database with sample data. + * [backend/src/main/java/com/machinarymgmt/service/api/components/DataInitializer.java](https://github.com/AnantNagarajHegde/MI-6.0/blob/main/backend/src/main/java/com/machinarymgmt/service/api/components/DataInitializer.java) + +* **ApiResponseBuilder.java:** Builds standardized API responses. + * [backend/src/main/java/com/machinarymgmt/service/api/builder/ApiResponseBuilder.java](https://github.com/AnantNagarajHegde/MI-6.0/blob/main/backend/src/main/java/com/machinarymgmt/service/api/builder/ApiResponseBuilder.java) + +* **Repositories:** JPA repositories for database interactions. Examples include `DepartmentRepository.java`, `EmployeeRepository.java`, and `EquipmentRepository.java`. + * [backend/src/main/java/com/machinarymgmt/service/api/data/DepartmentRepository.java](https://github.com/AnantNagarajHegde/MI-6.0/blob/main/backend/src/main/java/com/machinarymgmt/service/api/data/DepartmentRepository.java) + +* **Controllers:** REST controllers for handling API endpoints, such as `DepartmentController.java` and `EquipmentController.java`. + * [backend/src/main/java/com/machinarymgmt/service/api/v1/DepartmentController.java](https://github.com/AnantNagarajHegde/MI-6.0/blob/main/backend/src/main/java/com/machinarymgmt/service/api/v1/DepartmentController.java) + +* **OpenApiConfig.java:** Configuration for OpenAPI (Swagger) documentation. + * [backend/src/main/java/com/machinarymgmt/service/api/config/OpenApiConfig.java](https://github.com/AnantNagarajHegde/MI-6.0/blob/main/backend/src/main/java/com/machinarymgmt/service/api/config/OpenApiConfig.java) + +### API Endpoints + +The backend provides a variety of REST API endpoints, including: + +* `/api/v1/equipment`: Manages equipment inventory. +* `/api/v1/projects`: Manages construction projects. +* `/api/v1/maintenance`: Manages maintenance and servicing records. +* `/api/v1/categories`: Manages equipment categories. + +## Frontend Setup + +### Prerequisites + +* Node.js (version 18 or higher) +* npm (version 9 or higher) + +### Configuration + +1. **Install Dependencies:** Navigate to the `fro4.0/` directory and install the required dependencies. + + ```bash + npm install + ``` + +2. **Environment Variables:** Create a `.env.local` file in the root directory of the `fro4.0/` folder to configure the Supabase URL and anonymous key. + + ``` + NEXT_PUBLIC_SUPABASE_URL=your_supabase_url + NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key + ``` + +3. **Run the Application:** Start the Next.js development server. + + ```bash + npm run dev + ``` + + Open your browser and go to `http://localhost:3000` to view the application. + +### Key Frontend Components + +* **app directory:** Contains Next.js route handlers and page components. + * `/src/app/` + +* **components directory:** Contains reusable UI components. + * `/src/components/` + +* **services directory:** Contains API service functions for interacting with the backend. + * `/src/services/` + +* **lib directory:** Contains utility functions and configurations such as `supabase.ts` and `api.ts`. + * `/src/lib/` + +### Important files + +* `config.ts`: Contains the API URL. + * [/fro4.0/src/config.ts](https://github.com/AnantNagarajHegde/MI-6.0/blob/main/fro4.0/src/config.ts) +* `supabase.ts`: Initializes the Supabase client. + * [/fro4.0/src/lib/supabase.ts](https://github.com/AnantNagarajHegde/MI-6.0/blob/main/fro4.0/src/lib/supabase.ts) + +## Database Schema + +The backend uses a MySQL database with several tables to manage different aspects of the system. The key tables include: + +* `Dept`: Departments +* `Designation`: Designations +* `Employee`: Employees +* `Project`: Projects +* `Equipment_Category`: Equipment Categories +* `Equipment`: Equipment +* `Equipment_Utilization`: Equipment Utilization data +* `Incident_Report`: Incident Reports +* `Items`: Items for materials and spares +* `Machinery_Maintenance_Log`: Maintenance Logs +* `Maintenance_Parts_Used`: Maintenance Parts Used +* `Maintenance_Readings`: Maintenance Readings +* `Make`: Equipment Makes +* `Mast_Anchorage_Details`: Mast Anchorage Details +* `Model`: Equipment Models +* `Overtime_Report`: Overtime Reports +* `Petty_Cash_Transaction`: Petty Cash Transactions +* `Stock_Statement`: Stock Statements +* `users`: User data + +## Sequence Diagram + +Here is a high-level sequence diagram illustrating the interaction between the frontend, backend, and database for a typical data fetch operation: + +```mermaid +sequenceDiagram + participant F as Frontend (Next.js) + participant B as Backend (Spring Boot) + participant DB as Database (MySQL) + + F->>B: API Request (e.g., GET /api/v1/equipment) + activate B + B->>DB: Query Database + activate DB + DB->>B: Data Response + deactivate DB + B->>F: API Response (JSON) + deactivate B + F->>Browser: Display Data From fa927b3f41b1d16c27bccd05c36861f113f8fe82 Mon Sep 17 00:00:00 2001 From: Anant Nagaraj Hegde Date: Mon, 7 Jul 2025 11:49:02 +0530 Subject: [PATCH 2/7] Update README.md --- README.md | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/README.md b/README.md index 68244ba..d523162 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,57 @@ This project is a comprehensive equipment management system designed to streamline construction operations. It consists of two main parts: a Spring Boot backend for managing data and a Next.js frontend for providing a user interface. The system allows for tracking equipment, managing maintenance, handling financial transactions, and generating reports. +📑 Table of Contents +Project Overview + +Technologies Used + +Backend Setup + +Prerequisites + +Configuration + +Key Backend Components + +API Endpoints + +Frontend Setup + +Prerequisites + +Configuration + +Key Frontend Components + +Important Files + +Database Schema + +Sequence Diagram + +🚀 Project Overview +The Equipment Management System is tailored for construction firms to monitor and manage heavy machinery and associated resources efficiently. It provides: + +Real-time equipment tracking. + +Detailed maintenance logs. + +Role-based access for employees. + +Visual dashboards and reports. + +Financial tools such as petty cash and stock tracking. + +🔍 Screenshots +📸 Add real screenshots of your UI here. Replace image links with actual URLs or local paths. + +Dashboard View + +Equipment Detail Page + +Maintenance Logs Page + ## Technologies Used * **Backend:** Spring Boot, Java 17 From 996112c6b22f3e9b4f8008ebc57f10b8368be770 Mon Sep 17 00:00:00 2001 From: Anant Nagaraj Hegde Date: Mon, 7 Jul 2025 11:58:24 +0530 Subject: [PATCH 3/7] Update README.md --- README.md | 63 +++++++++++++++++++------------------------------------ 1 file changed, 22 insertions(+), 41 deletions(-) diff --git a/README.md b/README.md index d523162..efe0a30 100644 --- a/README.md +++ b/README.md @@ -2,56 +2,37 @@ This project is a comprehensive equipment management system designed to streamline construction operations. It consists of two main parts: a Spring Boot backend for managing data and a Next.js frontend for providing a user interface. The system allows for tracking equipment, managing maintenance, handling financial transactions, and generating reports. -📑 Table of Contents -Project Overview +## 📑 Table of Contents -Technologies Used +- [Project Overview](#project-overview) +- [Technologies Used](#technologies-used) +- [Backend Setup](#backend-setup) +- [Frontend Setup](#frontend-setup) +- [Database Schema](#database-schema) +- [Sequence Diagram](#sequence-diagram) -Backend Setup +--- -Prerequisites +## 🚀 Project Overview -Configuration +The **Equipment Management System** is tailored for construction firms to monitor and manage heavy machinery and associated resources efficiently. It provides: -Key Backend Components +- Real-time equipment tracking +- Detailed maintenance logs +- Role-based access for employees +- Visual dashboards and reports +- Financial tools such as petty cash and stock tracking -API Endpoints +### 🔍 Screenshots -Frontend Setup +**Dashboard View** +![Dashboard Screenshot](https://via.placeholder.com/800x400?text=Dashboard+Screenshot) -Prerequisites +**Equipment Detail Page** +![Equipment Detail](https://via.placeholder.com/800x400?text=Equipment+Detail) -Configuration - -Key Frontend Components - -Important Files - -Database Schema - -Sequence Diagram - -🚀 Project Overview -The Equipment Management System is tailored for construction firms to monitor and manage heavy machinery and associated resources efficiently. It provides: - -Real-time equipment tracking. - -Detailed maintenance logs. - -Role-based access for employees. - -Visual dashboards and reports. - -Financial tools such as petty cash and stock tracking. - -🔍 Screenshots -📸 Add real screenshots of your UI here. Replace image links with actual URLs or local paths. - -Dashboard View - -Equipment Detail Page - -Maintenance Logs Page +**Maintenance Logs Page** +![Maintenance Logs](https://via.placeholder.com/800x400?text=Maintenance+Logs) ## Technologies Used From eb3d465aa1c81ae59c820ea3e0a43605fb7e29a2 Mon Sep 17 00:00:00 2001 From: Anant Nagaraj Hegde Date: Mon, 7 Jul 2025 12:23:09 +0530 Subject: [PATCH 4/7] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index efe0a30..d938191 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,9 @@ The **Equipment Management System** is tailored for construction firms to monito ### 🔍 Screenshots +![Landing_page](https://github.com/user-attachments/assets/10b14748-2fdf-40de-a04f-5266f42c1e84) + + **Dashboard View** ![Dashboard Screenshot](https://via.placeholder.com/800x400?text=Dashboard+Screenshot) From 74281bc5fe47ab277ec0fe185d0ddd4cd335e501 Mon Sep 17 00:00:00 2001 From: Anant Nagaraj Hegde Date: Mon, 7 Jul 2025 12:27:20 +0530 Subject: [PATCH 5/7] Update README.md --- README.md | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index d938191..6536147 100644 --- a/README.md +++ b/README.md @@ -24,18 +24,11 @@ The **Equipment Management System** is tailored for construction firms to monito - Financial tools such as petty cash and stock tracking ### 🔍 Screenshots +![Landing_page](https://github.com/user-attachments/assets/65fafb25-be5e-49bd-b974-a10d3a676464) +![Home_page](https://github.com/user-attachments/assets/9b1e0d76-a4ed-407d-ad3b-f2f21b718b3d) +![Projects](https://github.com/user-attachments/assets/f1197372-29f9-4a45-a35d-bf1355265914) +![Footer](https://github.com/user-attachments/assets/b9f65f9b-ac89-4c5d-b017-d80b950259b7) -![Landing_page](https://github.com/user-attachments/assets/10b14748-2fdf-40de-a04f-5266f42c1e84) - - -**Dashboard View** -![Dashboard Screenshot](https://via.placeholder.com/800x400?text=Dashboard+Screenshot) - -**Equipment Detail Page** -![Equipment Detail](https://via.placeholder.com/800x400?text=Equipment+Detail) - -**Maintenance Logs Page** -![Maintenance Logs](https://via.placeholder.com/800x400?text=Maintenance+Logs) ## Technologies Used From dd8557ebc5368e0785d03416e64aa097e2877d11 Mon Sep 17 00:00:00 2001 From: Anant Nagaraj Hegde Date: Mon, 7 Jul 2025 12:33:00 +0530 Subject: [PATCH 6/7] Update README.md --- README.md | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/README.md b/README.md index 6536147..68b55b0 100644 --- a/README.md +++ b/README.md @@ -106,14 +106,8 @@ The backend provides a variety of REST API endpoints, including: npm install ``` -2. **Environment Variables:** Create a `.env.local` file in the root directory of the `fro4.0/` folder to configure the Supabase URL and anonymous key. - ``` - NEXT_PUBLIC_SUPABASE_URL=your_supabase_url - NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key - ``` - -3. **Run the Application:** Start the Next.js development server. +2. **Run the Application:** Start the Next.js development server. ```bash npm run dev From b109017f95c79d46fbd83e43f766f2fb7f1779dc Mon Sep 17 00:00:00 2001 From: Anant Nagaraj Hegde Date: Mon, 7 Jul 2025 12:34:25 +0530 Subject: [PATCH 7/7] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 68b55b0..0561c2f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Equipment Management System +# Machinery Inventory Management System This project is a comprehensive equipment management system designed to streamline construction operations. It consists of two main parts: a Spring Boot backend for managing data and a Next.js frontend for providing a user interface. The system allows for tracking equipment, managing maintenance, handling financial transactions, and generating reports.