Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
3cd7a6b
fix: today best renamed as platform revenue. fix the incorrect busine…
Kaveesha529 Jul 13, 2025
40666f7
feat(inactive drivers): create CRUD to display inactive drivers in a …
Kaveesha529 Jul 13, 2025
0c7cc42
feat(inactive drivers): create CRUD to display inactive drivers in a …
Kaveesha529 Jul 13, 2025
c415532
refactor: remove unused query and imports in OfferRepo
HashiruG Jul 13, 2025
fe9dc79
feat: add OfferedDriversDto class and update OfferResponseDto to incl…
HashiruG Jul 13, 2025
9841425
feat: enhance OfferService to fetch offers with detailed driver infor…
HashiruG Jul 13, 2025
bc9dac6
feat: update entity structures for DeliveryOrder, DriverDetails, Driv…
HashiruG Jul 14, 2025
75dcf51
Merge branch 'test-integration' into back-dev-1.0
HashiruG Jul 14, 2025
91aed72
Merge pull request #20 from HashiruG/back-dev-1.0
HashiruG Jul 14, 2025
7f10e8c
feat: add CommissionRate entity and repository for commission rate ma…
HashiruG Jul 16, 2025
b47b06f
feat: implement CommissionRateController and CommissionRateService fo…
HashiruG Jul 16, 2025
b3cb1bd
refactor: remove unused import for Autowired in CommissionRateController
HashiruG Jul 17, 2025
2584498
feat: enhance DTOs and services for churn driver and offer management
HashiruG Jul 17, 2025
6707635
Merge pull request #21 from HashiruG/commission-rates
HashiruG Jul 17, 2025
7c04cf2
feat(delivery management): created REST Api for delivery management t…
Kaveesha529 Jul 22, 2025
7608539
feat(delivery distribution): created REST Api for delivery distributi…
Kaveesha529 Jul 22, 2025
2795777
feat(delivery distribution): created REST Api for today delivery dist…
Kaveesha529 Jul 22, 2025
7cca737
feat(realTimeDriverLocation): created REST Api for realTimeDriverLoca…
Kaveesha529 Jul 22, 2025
e8dd2c3
Merge pull request #22 from HashiruG/back-dev-1.0
HashiruG Jul 23, 2025
f8104e9
feat(blacklist): created REST Api for blacklisting drivers
Kaveesha529 Jul 24, 2025
8038302
feat(blacklist): created REST Api for blacklisting drivers
Kaveesha529 Jul 24, 2025
31022d0
fix(ChurnDriver): correct status string casing to "Not Incentivized"
HashiruG Jul 25, 2025
ccbc5ed
feat: add role and name fields to registration DTO
HashiruG Jul 26, 2025
66c12f4
fix: add missing @Repository annotation in UserRepo
HashiruG Jul 26, 2025
524d8ab
feat: add role and name attributes to admin entity
HashiruG Jul 26, 2025
1c3df3c
feat: create AdminResponseDto with name, username, and role fields
HashiruG Jul 26, 2025
59c385e
feat: add endpoints to view and delete admins in AuthController
HashiruG Jul 26, 2025
23e85f3
feat: enhance JWT authentication and authorization flow with role man…
HashiruG Jul 26, 2025
a49e497
refactor: clean up unused imports
HashiruG Jul 26, 2025
16ba756
fix: update query to get churn features
HashiruG Jul 28, 2025
03b4a04
fix: fix deployment issues
HashiruG Jul 28, 2025
46404e2
fix:add vehicle details to tables
Kaveesha529 Jul 28, 2025
1f79a2b
Merge branch 'deployment-backup' into back-dev-1.0
HashiruG Jul 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
254 changes: 131 additions & 123 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,130 +1,138 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.4.3</version>
<relativePath/>
</parent>
<groupId>com.pentagon</groupId>
<artifactId>Quicky_Backend</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>Quicky_Backend</name>
<description>Backend of the Quicky project</description>
<url/>
<licenses>
<license/>
</licenses>
<developers>
<developer/>
</developers>
<scm>
<connection/>
<developerConnection/>
<tag/>
<url/>
</scm>
<properties>
<java.version>17</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.stripe</groupId>
<artifactId>stripe-java</artifactId>
<version>24.9.0</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-test</artifactId>
<scope>test</scope>
</dependency>
<modelVersion>4.0.0</modelVersion>

<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-api</artifactId>
<version>0.12.6</version>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-impl</artifactId>
<version>0.12.6</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-jackson</artifactId>
<version>0.12.6</version>
<scope>runtime</scope>
</dependency>
<dependency>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
</dependency>
</dependencies>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.4.3</version>
<relativePath/>
</parent>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
<groupId>com.pentagon</groupId>
<artifactId>Quicky_Backend</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>Quicky_Backend</name>
<description>Backend of the Quicky project</description>

<properties>
<java.version>17</java.version>
</properties>

<dependencies>
<!-- Spring Boot Starters -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>

<!-- Database -->
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<scope>runtime</scope>
</dependency>

<!-- Stripe Payments -->
<dependency>
<groupId>com.stripe</groupId>
<artifactId>stripe-java</artifactId>
<version>24.9.0</version>
</dependency>

<!-- JSON Web Token (JJWT for JWT auth) -->
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-api</artifactId>
<version>0.12.6</version>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-impl</artifactId>
<version>0.12.6</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-jackson</artifactId>
<version>0.12.6</version>
<scope>runtime</scope>
</dependency>

<!-- Lombok (for DTOs, Entities, etc) -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.32</version> <!-- Use latest compatible version -->
<scope>provided</scope>
</dependency>

<!-- Test dependencies -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<!-- Lombok Annotation Processing for Maven -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.32</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>

<!-- Spring Boot Maven Plugin -->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<excludes>
<!-- Exclude Lombok from final artifact -->
<exclude>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>

</project>
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
package com.pentagon.Quicky_Backend.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.pentagon.Quicky_Backend.dto.AdminResponseDto;
import com.pentagon.Quicky_Backend.dto.ForgotPasswordRequestDto;
import com.pentagon.Quicky_Backend.dto.LoginRequestDto;
import com.pentagon.Quicky_Backend.dto.LoginResponseDto;
import com.pentagon.Quicky_Backend.dto.RegisterRequestDto;
import com.pentagon.Quicky_Backend.dto.ResetPasswordRequestDto;
import com.pentagon.Quicky_Backend.service.AuthService;

import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@RestController
@RequestMapping("/auth")
public class AuthController {
Expand All @@ -30,6 +37,16 @@ public ResponseEntity<String> register(@RequestBody RegisterRequestDto registerR
return authService.Register(registerRequest);
}

@GetMapping("register/view-admins")
public ResponseEntity<List<AdminResponseDto>> getAllAdmins() {
return authService.getAllAdmins();
}

@DeleteMapping("/register/delete-admin/{username}")
public ResponseEntity<String> deleteAdmin(@PathVariable String username) {
return authService.deleteAdmin(username);
}

@PostMapping("/login")
public ResponseEntity<LoginResponseDto> login(@RequestBody LoginRequestDto loginRequest) {
return authService.Login(loginRequest);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package com.pentagon.Quicky_Backend.controller;

import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.pentagon.Quicky_Backend.dto.CommissionRateDto;
import com.pentagon.Quicky_Backend.service.CommissionRateService;

@RestController
@RequestMapping("/commission")
public class CommissionRateController {

private final CommissionRateService commissionRateService;

public CommissionRateController(CommissionRateService commissionRateService) {
this.commissionRateService = commissionRateService;
}

@GetMapping("/get-commission-rate")
public ResponseEntity<CommissionRateDto> getLatestCommissionRate() {
CommissionRateDto response = commissionRateService.getLatestCommissionRate();
return ResponseEntity.ok(response);
}

@PostMapping("/change-commission-rate")
public ResponseEntity<String> changeCommissionRate(@RequestBody CommissionRateDto commissionRateDto) {
commissionRateService.updateCommissionRate(commissionRateDto.getCommissionRate());
return ResponseEntity.ok("Commission rate updated successfully");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
package com.pentagon.Quicky_Backend.controller;

import com.pentagon.Quicky_Backend.dto.DeliveriesCountDto;
import com.pentagon.Quicky_Backend.dto.DeliveryRecordsDto;
import com.pentagon.Quicky_Backend.service.DeliveryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@CrossOrigin(origins = "http://localhost:5173")
public class DeliveryController {

@Autowired
private DeliveryService deliveryService;

@GetMapping("/delivery_records")
public ResponseEntity<List<DeliveryRecordsDto>> getDeliveryRecords() {
List<DeliveryRecordsDto> deliveries = deliveryService.getDeliveryRecords();
return new ResponseEntity<>(deliveries, HttpStatus.OK);
}

@GetMapping("/deliveries_count")
public ResponseEntity<List<DeliveriesCountDto>> getDeliveriesCount() {
List<DeliveriesCountDto> deliveries = deliveryService.getDeliveriesCount();
return new ResponseEntity<>(deliveries, HttpStatus.OK);
}

@GetMapping("/delivery_records/today")
public ResponseEntity<List<DeliveryRecordsDto>> getDeliveryRecordsToday() {
List<DeliveryRecordsDto> deliveries = deliveryService.getDeliveryRecordsToday();
return new ResponseEntity<>(deliveries, HttpStatus.OK);
}
}
Loading