Backend API for neighborhood management with RBAC & real-time features
v1.0.0 - DevelopmentJWT-based authentication with access & refresh tokens. Multi-device session management with device tracking.
View Auth Endpoints โ10 roles with hierarchical permissions: Master, Admin, Ketua RT/RW, Kepala Desa, Camat, Polsek, Koramil, Pengurus, Warga.
View Permissions โWebSocket support via Centrifugo integration for live notifications, panic alerts, and instant messaging.
Track and manage sessions across multiple devices. Secure logout from all devices or specific ones.
View Sessions โ
# Login with demo account
curl -X POST http://localhost:8080/api/v1/auth/login \
-H "Content-Type: application/json" \
-d '{"email":"master@rtrw.com","password":"master123"}'
# Get current user profile
curl http://localhost:8080/api/v1/auth/me \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
| Master (all access) | master@rtrw.com / master123 |
| Admin | admin@rtrw.com / password123 |
| Ketua RT | ketuart@rtrw.com / password123 |
| Warga (resident) | warga@rtrw.com / password123 |
| Method | Endpoint | Description |
|---|---|---|
| GET | /health | Health check |
| GET | /docs | API Documentation (Scalar) |
| POST | /api/v1/auth/login | User login |
| POST | /api/v1/auth/refresh | Refresh access token |
| POST | /api/v1/auth/logout | Logout current session |
| GET | /api/v1/auth/me | Get current user |
| GET | /api/v1/auth/sessions | List active sessions |
| GET | /api/v1/users | List users (Admin+) |
| GET | /api/v1/permissions | List permissions (Master) |