-
Notifications
You must be signed in to change notification settings - Fork 0
Setup
How to get the project running locally, plus the main ways to run and deploy it.
Live demo: https://customer-management-hj57iqzdmq-nw.a.run.app — sign in with admin / admin123.
| Tool | Version | Needed for |
|---|---|---|
| JDK | 21 | backend (the Gradle wrapper is included) |
| Node.js | 18+ (20 recommended) | frontend |
| Docker | recent | container run + the Testcontainers Redis test |
| gcloud + Terraform | optional | Cloud Run deployment |
git clone https://github.com/stdOWL/customermanagement.git
cd customermanagement./gradlew bootRunStarts on http://localhost:8080 with the in-memory (local) profile. bootRun injects a development JWT_SECRET automatically, and Flyway creates the schema and seeds the accounts.
| Username | Password | Role |
|---|---|---|
admin |
admin123 |
ADMIN |
user |
user123 |
USER |
TOKEN=$(curl -s localhost:8080/api/auth/login -H 'Content-Type: application/json' \
-d '{"username":"admin","password":"admin123"}' | jq -r .accessToken)
curl -s localhost:8080/api/me -H "Authorization: Bearer $TOKEN"cd frontend
npm install
npm run devOpens http://localhost:5173 and calls the API at http://localhost:8080 (override with VITE_API_BASE_URL). The backend already allows the Vite dev origin via CORS.
- Swagger UI: http://localhost:8080/swagger-ui.html — run the login operation and the bearer token is applied automatically.
- OpenAPI JSON: http://localhost:8080/v3/api-docs
-
Postman: the collection + environment live in
postman/(seepostman/README.md).
./gradlew testUnit + integration tests (including a Testcontainers-backed Redis test — needs Docker). Coverage report: build/reports/jacoco/test/html/index.html.
docker compose up --buildBuilds the full-stack image (the React SPA is bundled into the backend jar) plus Redis, served on http://localhost:8080.
terraform/ provisions a minimal, scale-to-zero Cloud Run stack — see terraform/README.md. CI/CD (GitHub Actions) builds the image and deploys to Cloud Run on every push to main.
| Variable | Purpose | Default |
|---|---|---|
JWT_SECRET |
HS256 signing key, ≥ 32 bytes (required) | dev/test injected |
SPRING_PROFILES_ACTIVE |
active environment profile | local |
RATELIMIT_ENABLED |
toggle rate limiting | true |
CORS_ALLOWED_ORIGINS |
allowed browser origins (comma-separated) | http://localhost:5173 |
Getting started
How it works
Operations
Reference