This repository now contains:
servease-backend: Java Spring Boot REST API with session auth + role checks.servease-frontend: Angular app with login/logout, guards, role dashboards, profile, and admin user management.
ADMINCUSTOMERSUPERVISORTECHNICIAN
- Auth endpoints:
POST /auth/login?userId=&password=POST /auth/logoutGET /auth/session/validate
- User registration + management via
/user - Admin-only user listing/update/delete in
UserController - In-memory session handling using
sessionIdheader - PostgreSQL via environment-configurable datasource properties
- Angular route protection with:
- Auth guard (must be logged in)
- Role guard (must match route role)
- Separate pages:
/admin/customer/supervisor/technician/profile/admin/users
- Session storage + interceptor for attaching
sessionId - Basic API error interceptor handling unauthorized sessions
createdb servease_dbOr configure your own DB and export:
export DB_URL=jdbc:postgresql://localhost:5432/your_db
export DB_USERNAME=your_user
export DB_PASSWORD=your_passwordcd servease-backend
mvn clean install
mvn spring-boot:runBackend runs at http://localhost:8080 by default.
cd servease-frontend
npm install
npm startFrontend runs at http://localhost:4200 and talks to http://localhost:8080.
sessionIdis sent as an HTTP header for protected requests.- Admin user management page calls backend
/userAPI and is role-protected in frontend and backend.