A microservice example project for an automotive service platform. RevUp contains multiple backend services (Spring Boot), a React + Vite frontend, and Kubernetes manifests for deployment. This README provides a quick overview, local development tips, and deployment notes for GitHub visitors.
backend/services/- Multiple Spring Boot microservices (API gateway, user, vehicle, appointment, project, chatbot, time-tracking, Eureka server). Each service contains a Maven wrapper (mvnw,mvnw.cmd).frontend/- React + Vite frontend application.k8s/- Kubernetes manifests (namespace, backend services, database/statefulset, frontend, ingress, secrets, configmaps).k8s/database/init-configmap.yaml- DB init SQL (creates per-service databases and users).
- Kubernetes manifests:
k8s/ - Docker Compose for local testing (subset):
backend/services/docker-compose.yml
- Java 17+ and Maven (or use the included wrapper
mvnw/mvnw.cmd) - Node.js 18+ and npm/yarn for the frontend
- Docker & Docker Compose (for local container runs)
- kubectl and access to a Kubernetes cluster (for k8s deployments)
- From the repo root, go to the compose folder:
cd backend/services
docker-compose up --build- Wait for services to start. Services expose ports as defined in
docker-compose.yml(e.g., API gateway, user, vehicle, etc.).
Notes: The compose file in backend/services/docker-compose.yml is intended for local development and references the service Dockerfiles in the sibling service folders.
- Install dependencies and start dev server:
cd frontend
npm install
npm run dev- Production build:
npm run build
npm run previewEach backend service is a Spring Boot app with a Maven wrapper. Example (Windows PowerShell):
cd backend/services/api-gateway
./mvnw.cmd clean package
java -jar target/<artifact>.jarOn Unix/macOS use ./mvnw instead of ./mvnw.cmd.
- Create the namespace and CRs (apply in order):
# create namespace
kubectl apply -f k8s/namespace.yaml
# apply database resources
kubectl apply -f k8s/database/init-configmap.yaml
kubectl apply -f k8s/database/secrets.yaml
kubectl apply -f k8s/database/statefulset.yaml
kubectl apply -f k8s/database/service.yaml
# apply backend services (api-gateway, eureka, user, vehicle, appointment, ...)
kubectl apply -f k8s/backend/
# apply frontend
kubectl apply -f k8s/frontend/Adjust the order if you have additional prerequisites (for example ensure the DB StatefulSet and PVCs are ready before backend deployments).
- The PostgreSQL StatefulSet mounts a
ConfigMapat/docker-entrypoint-initdb.d(k8s/database/init-configmap.yaml) which runs the includedinit.sqlto create service databases and users (for exampleappointment_dbandappointment_serviceuser). - Credentials for PostgreSQL are stored in
k8s/database/secrets.yaml(check and update before using in production).
If you need to update a single appointment record's scheduled_start to the current time (useful during testing), use the following command against the Postgres pod (replace the pod name if different):
# Example: update the first appointment's start time to now
kubectl exec -it postgres-0 -n revup-database -- psql -U revup_admin -d appointment_db -c "UPDATE appointments SET scheduled_start = NOW(), updated_at = NOW() WHERE appointment_id = (SELECT appointment_id FROM appointments ORDER BY appointment_id LIMIT 1);"
# Or, update a specific appointment ID (e.g., id = 1):
kubectl exec -it postgres-0 -n revup-database -- psql -U revup_admin -d appointment_db -c "UPDATE appointments SET scheduled_start = NOW(), updated_at = NOW() WHERE appointment_id = 1;"Note: The correct DB user in this setup is revup_admin (not postgres). Confirm secrets in k8s/database/secrets.yaml if your cluster was customized.
- Backend services contain unit and integration tests under
src/testand typical Maven test lifecycle. Run tests via the wrapper:
./mvnw.cmd test- Please open issues or PRs against the
devbranch. - Add clear descriptions and small, focused commits. Include tests for behavioral changes.
This repository includes a LICENSE file at the project root. Review it for permitted usage.
For questions, open an issue or contact the repository owner.
If you'd like, I can also add a short CONTRIBUTING.md, CI workflow (GitHub Actions) skeleton, and badges—tell me which you prefer and I'll add them.