The canonical project documentation now lives in ../README.md. This file keeps the backend-specific run notes in one place.
This backend is configured to use MySQL only. It does not include an H2 fallback.
Before starting the app, either fill in backend/.env or set these environment variables in the same PowerShell session:
SPRING_DATASOURCE_URL- example:jdbc:mysql://localhost:3306/loan_discovery?useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=UTCSPRING_DATASOURCE_USERNAME- your MySQL user, for examplerootSPRING_DATASOURCE_PASSWORD- your MySQL passwordJWT_SECRET- a long random secret used to sign tokensJWT_EXPIRATION_MS- optional, defaults to86400000ADMIN_EMAIL- optional, defaults toadmin@loandiscovery.local
Note: The app also accepts legacy DB_URL, DB_USERNAME, and DB_PASSWORD names for local backward compatibility.
Example PowerShell session:
$env:SPRING_DATASOURCE_URL = 'jdbc:mysql://localhost:3306/loan_discovery?useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=UTC'
$env:SPRING_DATASOURCE_USERNAME = 'root'
$env:SPRING_DATASOURCE_PASSWORD = 'your-mysql-password'
$env:JWT_SECRET = 'replace-with-a-long-random-secret'
$env:ADMIN_EMAIL = 'admin@loandiscovery.local'
Set-Location 'C:\Users\ASUS\Documents\Backend\Loan-Discovery-Web-Application\backend'
.\mvnw.cmd spring-boot:runIf port 8080 is already in use, either stop the existing backend instance or run this one on another port:
$env:PORT = '8081'
.\mvnw.cmd spring-boot:runQuick checks:
# Find process currently listening on 8080
Get-NetTCPConnection -LocalPort 8080 -State Listen | Select-Object LocalAddress, LocalPort, OwningProcess
# Stop a process by PID (replace 12345)
Stop-Process -Id 12345 -ForceThis project now supports a local backend/.env file automatically through Spring config import. Keep real credentials only in that private file and out of git.
Set-Location 'C:\Users\ASUS\Documents\Backend\Loan-Discovery-Web-Application\backend'
\.\mvnw.cmd -q -DskipTests compileRender can run this backend as a Java web service using ../render.yaml.
Production backend URL: https://loan-discovery-app.onrender.com
Production frontend URL: https://loan-discovery-app.vercel.app/
Use these environment variables in Render:
SPRING_DATASOURCE_URLSPRING_DATASOURCE_USERNAMESPRING_DATASOURCE_PASSWORDJWT_SECRETJWT_EXPIRATION_MSADMIN_EMAILAPP_CORS_ALLOWED_ORIGINS
The backend listens on Render’s PORT automatically through backend/src/main/resources/application.properties.
Render does not read backend/.env, so copy the real values into the Render service environment settings.
For the current production setup, include https://loan-discovery-app.vercel.app in APP_CORS_ALLOWED_ORIGINS.