| name | compile |
| description | Compile dashboard and loyalty projects in dev mode with hot reload. Dashboard uses npm, loyalty uses Maven with Spring Boot DevTools. |
| metadata | {"author":"Alexandre Roman","version":"1.0"} |
Compile Projects in Dev Mode
Instructions for compiling and running the Dashboard and Loyalty Service in development mode with automatic hot reload.
Dashboard (Nuxt.js)
The dashboard is a Nuxt.js application with hot reload support for rapid development.
Start Development Server
cd dashboard
npm run dev
This starts the Nuxt dev server with:
- Hot Module Replacement (HMR) for instant updates
- Vue DevTools support
- TypeScript type checking
- Development server typically runs on port 3000 (configurable)
Important Notes
- Access via Gateway: Even when running on the host, always access the dashboard through http://localhost:8080 (gateway proxies to the dev server)
- First run: Run
npm install if dependencies are missing
- Port conflicts: If port 3000 is busy, Nuxt will try the next available port
Development Commands
npm install
npm run dev
npm run build --typecheck
npm run generate
Loyalty Service (Spring Boot + Maven)
The loyalty service is a Spring Boot application with Maven and Spring Boot DevTools for automatic reload.
Start Development Mode
cd loyalty
mvn spring-boot:run
This starts the Spring Boot application with:
- Spring Boot DevTools for automatic restart on code changes
- LiveReload integration
- Automatic restart when classpath files change
- Application runs on port 8081 (configured in application.properties)
Important Notes
- Access via Gateway: Always use http://localhost:8080/api/loyalty/* (gateway proxies to the service)
- Temporal Connection: Ensure Temporal Server is running (
docker compose -f compose-dev.yaml up -d temporal)
- First run: Maven will download dependencies automatically
- Build artifacts: DevTools watches
target/classes for changes
Development Commands
mvn clean compile
mvn spring-boot:run
mvn test
mvn package -DskipTests
mvn spring-boot:run -Dspring-boot.run.profiles=dev
Hot Reload Behavior
Spring Boot DevTools triggers automatic restart when:
- Java source files are modified and recompiled
- Resources in
src/main/resources are changed
- Dependencies are updated
Restart is fast because DevTools uses two classloaders:
- Base classloader (unchanged dependencies)
- Restart classloader (application code)
Complete Development Workflow
Typical workflow for working on both projects simultaneously:
docker compose -f compose-dev.yaml up -d
cd dashboard
npm run dev
cd loyalty
mvn spring-boot:run
Compilation Without Running
If you need to compile without starting the servers:
Dashboard:
cd dashboard
npm run build
Loyalty Service:
cd loyalty
mvn compile
Troubleshooting
Dashboard not reloading:
- Check if the dev server is running
- Verify no syntax errors in the console
- Try restarting with
Ctrl+C and npm run dev
Loyalty Service not reloading:
- Ensure
spring-boot-devtools is in dependencies (already configured)
- Check if IDE auto-build is enabled (for IntelliJ/Eclipse)
- Manually trigger rebuild with
mvn compile in another terminal
- Verify Temporal connection in logs
Port conflicts:
- Dashboard dev server: Check port 3000 availability
- Loyalty Service: Check port 8081 availability
- Gateway: Ensure port 8080 is free
IDE Integration
IntelliJ IDEA:
- Enable "Build project automatically" in Settings
- Enable "Allow auto-make to start even if developed application is currently running"
- DevTools will trigger restart automatically on save
VS Code:
- Dashboard: Uses Vite/Nuxt's built-in watcher
- Loyalty: Use "Java Extension Pack" for automatic compilation