feat: migrate server to spring boot#31
Conversation
There was a problem hiding this comment.
Pull request overview
This PR represents a complete architectural migration from a Node.js/TypeScript backend using Prisma ORM to a Spring Boot microservices architecture with Java 17, PostgreSQL, and Keycloak authentication. The frontend has been updated to use TanStack Query with Axios for API communication, replacing the previous server actions approach.
Changes:
- Replaced Node.js/Prisma backend with Spring Boot 3.4.1 application featuring REST APIs, JPA/Hibernate, and Flyway migrations
- Migrated frontend data layer from server actions to TanStack Query with Axios-based API clients
- Introduced Docker Compose orchestration for PostgreSQL, Keycloak, and the Spring Boot application
- Removed all Prisma-related code, domain_core directory, and server actions
Reviewed changes
Copilot reviewed 115 out of 118 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| server/build.gradle | Gradle build configuration with Spring Boot 3.4.1, Java 17, and required dependencies |
| server/src/main/resources/db/migration/V1__init_schema.sql | Flyway migration creating database schema with enums and tables |
| server/src/main/java/.../entity/* | JPA entities for User, Competency, LearningResource, and relationships |
| server/src/main/java/.../service/* | Business logic layer with transactional service methods |
| server/src/main/java/.../controller/* | REST API controllers with OpenAPI documentation |
| server/src/main/java/.../security/SecurityConfig.java | Spring Security configuration with OAuth2/JWT via Keycloak |
| server/docker-compose.yml | Multi-container setup for app, PostgreSQL 18.1, and Keycloak 26.4 |
| lib/api/* | TypeScript API clients using Axios with proper typing |
| lib/auth/* | Keycloak integration and simplified AuthProvider |
| lib/providers.tsx | QueryClient configuration for TanStack Query |
| package.json | Updated dependencies removing Prisma, adding TanStack Query, Axios, and Keycloak |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
🔍 Code Quality Report📊 Code Statistics🚨 Potential Issues
|
🔍 Code Quality Report📊 Code Statistics🚨 Potential Issues
|
🔍 Code Quality Report📊 Code Statistics🚨 Potential Issues
|
🔍 Code Quality Report📊 Code Statistics🚨 Potential Issues✅ No console statements found |
🔍 Code Quality Report📊 Code Statistics🚨 Potential Issues
|
🔍 Code Quality Report📊 Code Statistics🚨 Potential Issues✅ No console statements found |
🔍 Code Quality Report📊 Code Statistics🚨 Potential Issues✅ No console statements found |
|
Please remember to get rid of Next.js entirely. |
🔍 Code Quality Report📊 Code Statistics🚨 Potential Issues✅ No console statements found |
🔍 Code Quality Report📊 Code Statistics🚨 Potential Issues✅ No console statements found |
🔍 Code Quality Report📊 Code Statistics🚨 Potential Issues✅ No console statements found |
🔍 Code Quality Report📊 Code Statistics🚨 Potential Issues✅ No console statements found |
There was a problem hiding this comment.
Functionally, this works. I've tested everything locally and the migration seems successful.
That said, I'm honestly feeling a bit overwhelmed by the sheer size of this PR. It's really hard for me to guarantee I've caught every issue because besides the backend migration it also swaps our frontend from Next.js to Vite. I did spot some UI regressions (colors/fonts), but those can be adjusted in a follow-up PR.
Open to discuss: Did we really mean to remove Next.js from the frontend as well?
🔍 Code Quality Report📊 Code Statistics🚨 Potential Issues✅ No console statements found |
1 similar comment
🔍 Code Quality Report📊 Code Statistics🚨 Potential Issues✅ No console statements found |
markstockhausen
left a comment
There was a problem hiding this comment.
Approved with reference to this: #31 (review)
Description
Complete migration from Node.js/Prisma backend to Spring Boot microservices architecture. This PR replaces the original TypeScript/Prisma backend with a production-ready Spring Boot application featuring PostgreSQL, Keycloak authentication, and Docker Compose orchestration. The frontend has been updated to use TanStack Query with Axios for API communication while preserving the original UI design.
Type of Change
Related Issues
Changes Made
Server
server/server-manage.sh) for common operationsClient
API Integration Layer
lib/api/directory with Axios-based API clientsSession Page Rewrite
Authentication
AuthProviderto guest mode (Keycloak integration ready but not enforced)Infrastructure
QueryClientProviderto app layoutdomain_coretolib/utilsDatabase
server/src/main/resources/db/migration/Removed
domain_core/TypeScript backendprisma/directory and schemaapp/actions/server actionsOther
Testing
Test Cases
Manual Testing
Tested in development environment
Tested core functionality
Tested build processes
./server-manage.sh buildsuccessfully builds Spring Boot JARnpm run buildsuccessfully builds Next.js production bundleKnown Issues Fixed
Screenshots/Videos
Before
After
Deployment Notes
Starting the application: