This guide lists common local debugging workflows for backend, frontend, and integration issues.
When something fails locally:
- Confirm services are up:
docker compose ps- Check backend and frontend logs:
docker compose logs -f backend
docker compose logs -f frontend- Validate backend health:
curl http://localhost:3000/api/v1/health- Confirm OpenAPI is reachable:
curl http://localhost:3000/api-doc/openapi.jsonCommon symptoms:
- Container exits at startup
Config/env validation errors- Migration failures
Checks:
docker compose logs --tail=200 backendTypical root causes:
- Missing required env vars (
JWT_PRIVATE_KEY_PEM,JWT_PUBLIC_KEY_PEM,SMS_PROVIDER,ACTIVATION_CODE_PEPPER) - Invalid provider credentials for selected
SMS_PROVIDER - Invalid DB connection values
Symptoms:
Database error- Migration apply errors
- Query behavior mismatch after schema updates
Checks:
docker compose logs --tail=200 db
docker compose logs --tail=200 backendUse Adminer for quick verification:
http://localhost:8081
Rules:
- Never edit already-applied migrations on shared branches.
- Add a new migration for every schema change.
Symptoms:
401 UNAUTHORIZED403 FORBIDDEN- Unexpected route access denial
Checks:
- Verify the token is attached by frontend interceptor.
- Confirm route group and middleware in
iviss-backend/src/routes.rs. - Confirm role mapping in backend (
admin,manager,org_admin,agent).
Useful files:
iviss-backend/src/middleware/auth.rsiviss-backend/src/middleware/rbac.rsfrontend/src/services/auth/authInterceptor.ts
Symptoms:
- Frontend TypeScript errors after API changes
- Missing generated hooks/types
Fix sequence:
cd frontend
BACKEND_OPENAPI_URL=http://127.0.0.1:3000/api-doc/openapi.json npm run predev
npm run codegen
npm run ts:checkIf backend is not running, predev falls back to frontend/openapi.json.
Symptoms:
- Blank page / navigation loop
- API calls failing in browser
- Role-based page access mismatch
Checks:
docker compose logs --tail=200 frontendAlso check:
- Router guards in
frontend/src/router/RequireAuth.tsx - Role values returned by backend user profile endpoint
- Browser network tab for failing
/apirequests
Backend:
cd iviss-backend
cargo test -- --nocaptureFrontend:
cd frontend
npm run testIf tests rely on generated API types, regenerate code first.
Full local stack restart:
docker compose down
docker compose --profile dev up -d --buildReset local volumes (destructive):
docker compose down -v
docker compose --profile dev up -d --buildUse destructive resets only for local development environments.