Backend (Kotlin)
Backend (Kotlin/Java Spring Boot)
The backend of this project is built using Kotlin, Java, and Spring Boot. It also incorporates the Wanim Library, which is a custom library I developed. You can find the instructions and details of this library in the Wanim Library GitHub repository. I will add more detailed information about it later.
Our backend repository can be found here: Backend Repository.
Dependencies in the Backend
The backend includes the following dependencies in the build.gradle file:
dependencies {
implementation("com.wanim_ms:wanim-library:$baseLibLatestVersion")
implementation("org.springframework.boot:spring-boot-starter-data-jdbc")
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
implementation("org.springframework.boot:spring-boot-starter-jdbc")
implementation("org.springframework.boot:spring-boot-starter-security")
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
implementation("org.jetbrains.kotlin:kotlin-reflect")
implementation("org.springframework.boot:spring-boot-starter-websocket")
runtimeOnly("org.postgresql:postgresql")
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("org.jetbrains.kotlin:kotlin-test-junit5")
testImplementation("org.springframework.security:spring-security-test")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
// JWT Dependencies
implementation("io.jsonwebtoken:jjwt-api:0.12.6")
implementation("io.jsonwebtoken:jjwt-impl:0.12.6")
implementation("io.jsonwebtoken:jjwt-jackson:0.12.6")
}API Endpoints
I won't go into the details of each dependency, but I will provide the API endpoints that are used in the backend. Some of these APIs may be outdated or not working correctly. If you find any issues, please open an issue on the GitHub Issues page and I will update the APIs accordingly.
Here are some of the key API endpoints:
ESP32 API
Create ESP32: Method:
POSTURL:http://localhost:8080/api/v1/esp32Request Body:Get ESP32 by ID: Method:
GETURL:http://localhost:8080/api/v1/esp32/{id}Get All ESP32 Devices: Method:
GETURL:http://localhost:8080/api/v1/esp32?page=0&pageSize=10&sortOrder=ASC&sortBy=titleUpdate ESP32: Method:
PUTURL:http://localhost:8080/api/v1/esp32/{id}Request Body:Delete ESP32: Method:
DELETEURL:http://localhost:8080/api/v1/esp32/{id}
Smart Home API
Create Device: Method:
POSTURL:{{baseUrl}}/api/devicesGet Device by ID: Method:
GETURL:{{baseUrl}}/api/devices/:idGet All Devices: Method:
GETURL:{{baseUrl}}/api/devices?page=0&pageSize=10&sortOrder=DESC&sortBy=idCreate ESP32: Method:
POSTURL:{{baseUrl}}/api/v1/esp32Update ESP32: Method:
PUTURL:{{baseUrl}}/api/v1/esp32/:idDelete ESP32: Method:
DELETEURL:{{baseUrl}}/api/v1/esp32/:id
Homes API
Create Home: Method:
POSTURL:{{baseUrl}}/api/homesGet Home by ID: Method:
GETURL:{{baseUrl}}/api/homes/:idGet All Homes: Method:
GETURL:{{baseUrl}}/api/homes?page=0&pageSize=10&sortOrder=DESC&sortBy=idUpdate Home: Method:
PUTURL:{{baseUrl}}/api/homes/:id
Users API
Register User: Method:
POSTURL:{{baseUrl}}/api/users/registerLogin User: Method:
POSTURL:{{baseUrl}}/api/users/login
You can refer to these API details and endpoints in your development process.
Last updated