Skip to main content

Laundry Management System - Backend

A Spring Boot application that serves as the backend for a laundry management system. This application handles customer data, branches, transactions, and payment processing

Technologies Used

Prerequisites

  • JDK 17 or higher
  • MySQL 8.x
  • Maven 3.x
  • Ngrok (for payment gateway integration)

Installation

Several quick start options are available:
  1. Clone the repo: git clone https://github.com/initheo/Final-Project-Laundry.git
  2. Run cd to the newly created /Final-Project-Laundry/backend directory
  3. Install java and maven first if you don’t have it in your machine.
  4. Update the database configuration in application.properties
  5. Update the payment gateway configuration in application.properties
  6. Update the Ngrok configuration in application.properties
  7. Run the application using the Maven Wrapper or Maven
  8. Done Next Frontend Installation
Read the documentation page for more information on the framework contents, templates and examples, and more.

Project Structure

backend/ 
    ├── src/  
    ├── main/  
    │ ├── java/com/laundry/backend/
    │ │ ├── controller/ 
    │ │ ├── dto/ 
    │ │ ├── model/ 
    │ │ ├── repository/
    │ │ ├── service/ 
    │ │ └── BackendApplication.java
    │ └── resources/
    │ └── application.properties
    └── test/ 
    └── pom.xml

Configuration

Database Configuration

Update application.properties:
spring.datasource.url=jdbc:mysql://localhost:3306/laundry_service
spring.datasource.username=your_username
spring.datasource.password=your_password

Payment Gateway Configuration

Update application.properties:
ipaymu.virtual-account=your_virtual_account
ipaymu.api-key=your_api_key
ipaymu.payment-url=payment_gateway_url

# Change the following URLs to your frontend URLs
ipaymu.return-url=<Frontend Url>/transactions?payment=success
ipaymu.cancelUrl=<Frontend Url>/transactions?payment=cancel

Ngrok Configuration

Update application.properties:
ngrok.authtoken=your_authtoken
ngrok.edge=your_edge_label
ngrok.edge.url=your_edge_url

Running the Application

Using Maven Wrapper

# Build the project
./mvnw clean install

# Run the application
./mvnw spring-boot:run

Using Maven

# Build the project
mvn clean install

# Run the application
mvn spring-boot:run
The application will start on port 8080 by default.

API Documentation