Digital Money House is a Java 21 Spring Boot microservices backend that orchestrates authentication, user management, and account operations behind a single API Gateway. The fastest way to run the full stack locally is with Docker Compose, which handles building all service images, wiring up MySQL, RabbitMQ, and Eureka, and exposing each service on its designated port — no manual database setup or service registration required.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Gianluca-X/DigitalMoney/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before you begin, make sure the following are installed and available on your machine:| Requirement | Minimum version | Notes |
|---|---|---|
| Docker | 24+ | Required to build and run all service containers |
| Docker Compose | v2 (bundled with Docker Desktop) | Uses the docker compose or docker-compose CLI |
| Git | Any recent version | For cloning the repository |
| Java 21 | 21 (OpenJDK) | Optional — only needed if running services outside Docker |
| Available RAM | 4 GB minimum | All eight containers combined use up to ~5.5 GB |
Step-by-step setup
Create the .env file
Docker Compose reads credentials and connection strings from a Note that the JDBC URLs use
.env file in the repository root. Copy the template below into a new file called .env and update the passwords before proceeding.mysql (the Docker service hostname) rather than localhost. Docker Compose resolves inter-container hostnames on the shared back_network bridge network.Start MySQL and Eureka first
The application services all depend on MySQL being healthy before they start. Bring up MySQL and Eureka Server in detached mode so that their health checks complete before the rest of the stack starts:Wait until you see MySQL report The MySQL healthcheck polls
ready for connections in the logs:mysqladmin ping every 30 seconds with up to 5 retries. Once the container is healthy, the dependent services will be allowed to start. The init.sql file at the repository root is automatically executed on first run, creating the three service databases and their dedicated users.Start all remaining services
With MySQL healthy, start the full stack:To run everything in the background instead:Docker Compose will build each service image from source (this takes a few minutes on first run), then start them in dependency order. You can monitor startup progress with:
Verify all services are running
Once the stack is up, confirm that every service has registered successfully.Eureka Dashboard — open in your browser to see all registered service instances:You should see Expected response:RabbitMQ Management UI — for inspecting message queues:Log in with the default credentials
AUTH-SERVICE, USER-SERVICE, ACCOUNTS-SERVICE, and GATEWAY-SERVICE listed as UP.Gateway health endpoint — confirms the gateway is live and can route requests:guest / guest.Service startup order
Docker Compose respects thedepends_on conditions declared in docker-compose.yml. The effective startup sequence is:
mysql with condition: service_healthy will not start until the MySQL healthcheck passes. Services that depend on eureka-server and config-server use condition: service_started, meaning they start as soon as those containers are running — Spring Cloud’s retry logic handles any brief unavailability during initial registration.
Accessing services after startup
| Service | URL | Notes |
|---|---|---|
| API Gateway | http://localhost:8085 | Entry point for all client requests |
| Eureka Server | http://localhost:8761 | Service registry dashboard |
| Config Server | http://localhost:8888 | Spring Cloud Config endpoint |
| Auth Service | http://localhost:8082 | Direct access (normally via Gateway) |
| User Service | http://localhost:8087 | Direct access (normally via Gateway) |
| Accounts Service | http://localhost:8084 | Direct access (normally via Gateway) |
| RabbitMQ UI | http://localhost:15672 | Management console (guest/guest) |
| MySQL | localhost:3308 | Mapped from container port 3306 |
The Gateway routes
/auth/** to the Auth Service, /users/** to the User Service, and /accounts/** to the Accounts Service. For day-to-day API testing, send all requests through http://localhost:8085 rather than hitting individual service ports.Troubleshooting
Services not registering with Eureka
Services not registering with Eureka
If one or more services are missing from the Eureka dashboard at
http://localhost:8761, check the following:-
Eureka is fully started — the dependent services use
condition: service_started, which only waits for the container process to begin, not for Eureka to finish booting. Give the server 30–60 seconds, then check again. -
EUREKA_CLIENT_SERVICEURL_DEFAULTZONEis set correctly — the value in your.envfile must use the Docker service hostnameeureka-server, notlocalhost: -
Inspect service logs for
Cannot execute request on any known servererrors:Spring Cloud will retry registration automatically, but if the hostname is wrong the service will never register. -
Network connectivity — all services must be on the shared
back_network. If you editeddocker-compose.yml, confirm no service is missing thenetworks: - back_networkentry.
Database connection refused
Database connection refused
If a service logs
Communications link failure or Connection refused on startup, MySQL may not be fully healthy yet.-
Check MySQL health status:
Wait until
Statusis"healthy"before the application services start. -
Verify
init.sqlran successfully — the script creates all three databases and their users. If MySQL data is already present from a previous run and the script did not re-execute, the databases should already exist. To force a clean reinitialisation, remove the named volume: -
Confirm JDBC URLs use container hostnames — datasource URLs must reference
mysql(the service name), notlocalhost: -
Port conflict on 3308 — MySQL is mapped to host port
3308(not the default3306) to avoid conflicts with a locally installed MySQL instance. If port 3308 is already in use, update theportsmapping indocker-compose.yml.
JWT validation failing
JWT validation failing
If requests through the Gateway return
401 Unauthorized even with a valid token, the JWT secret is likely out of sync across services.-
All three services must share the same secret —
auth-service,accounts-service, andgatewayeach readJWT_SECRETfrom the environment. Confirm the variable is set identically in.env: - Secret length — the HS256 algorithm requires a secret of at least 256 bits (32 characters). Shorter secrets will cause key initialisation failures at startup.
-
Inspect the Gateway logs for token parsing errors:
Look for
SignatureExceptionorMalformedJwtExceptionmessages. -
Token expiry — the Auth Service issues tokens with a 24-hour expiry (
86400000ms). If the system clock on your Docker host is incorrect, tokens may appear expired immediately. Verify with:
