feat: initialisation du projet Olhar-API en Clean Architecture

- Spring Boot 3.4.1 + Gradle Kotlin DSL, Java 21
- Clean Architecture (domain / application / infrastructure / interfaces)
- Spring Security stateless avec JWT (JJWT 0.12.6)
- Flyway + PostgreSQL (migration V1 table users)
- SpringDoc OpenAPI / Swagger UI avec auth Bearer
- Testcontainers pour les tests d'intégration
- Use cases Register et Authenticate (endpoints POST /api/v1/auth/register et /login)
- GlobalExceptionHandler avec ProblemDetail (RFC 9457)
- docker-compose.yml pour Postgres local

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-07 05:56:46 +02:00
commit c230a999ab
36 changed files with 1131 additions and 0 deletions
+69
View File
@@ -0,0 +1,69 @@
import org.springframework.boot.gradle.tasks.bundling.BootJar
plugins {
java
id("org.springframework.boot") version "3.4.1"
id("io.spring.dependency-management") version "1.1.7"
}
group = "com.olhar"
version = "0.0.1-SNAPSHOT"
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
repositories {
mavenCentral()
}
val testcontainersVersion = "1.20.4"
dependencies {
// Spring Boot starters
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
implementation("org.springframework.boot:spring-boot-starter-security")
implementation("org.springframework.boot:spring-boot-starter-validation")
// Database
runtimeOnly("org.postgresql:postgresql")
implementation("org.flywaydb:flyway-core")
implementation("org.flywaydb:flyway-database-postgresql")
// OpenAPI / Swagger
implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:2.7.0")
// JWT
implementation("io.jsonwebtoken:jjwt-api:0.12.6")
runtimeOnly("io.jsonwebtoken:jjwt-impl:0.12.6")
runtimeOnly("io.jsonwebtoken:jjwt-jackson:0.12.6")
// Utils
compileOnly("org.projectlombok:lombok")
annotationProcessor("org.projectlombok:lombok")
// Test
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("org.springframework.security:spring-security-test")
testImplementation("org.testcontainers:junit-jupiter")
testImplementation("org.testcontainers:postgresql")
testCompileOnly("org.projectlombok:lombok")
testAnnotationProcessor("org.projectlombok:lombok")
}
dependencyManagement {
imports {
mavenBom("org.testcontainers:testcontainers-bom:${testcontainersVersion}")
}
}
tasks.withType<Test> {
useJUnitPlatform()
}
tasks.named<BootJar>("bootJar") {
archiveFileName.set("olhar-api.jar")
}