NSENGIYUMVA CHRISTOPHE
A full-stack, Dockerized Task Manager application built with Spring Boot, React, PostgreSQL, Redis, and Keycloak.
The application is structured as a multi-container Docker application:
- Frontend: React application served via Nginx.
- Backend: Spring Boot REST API.
- Database: PostgreSQL for persistent task storage.
- Cache: Redis for caching task and analytics data.
- Identity Provider: Keycloak for OAuth2 / OIDC authentication.
For more details, see docs/architecture.md.
- Docker and Docker Compose installed.
- Clone the repository and navigate to the root directory.
- Ensure you have the
.envfile set up (copy.env.exampleto.envif necessary):cp .env.example .env
- Start the containers using Docker Compose:
docker compose up --build
The services will be available at:
- Frontend: http://localhost:3000
- Backend API: http://localhost:8081
- Keycloak: http://localhost:8080
- pgAdmin: http://localhost:5050
Keycloak is pre-configured with the following users in the task-manager realm:
| Role | Username | Password |
|---|---|---|
| Admin | admin@example.com | admin123 |
| User | user@example.com | user123 |
Keycloak Admin Console:
- Username:
admin - Password:
admin123
The application relies on environment variables for configuration. See .env.example for the required variables. Key variables include:
POSTGRES_DB,POSTGRES_USER,POSTGRES_PASSWORDKEYCLOAK_ADMIN,KEYCLOAK_ADMIN_PASSWORDVITE_KEYCLOAK_URL,VITE_API_URL
Once the backend is running, the Swagger / OpenAPI documentation is available at:
- Swagger UI: http://localhost:8081/swagger-ui.html
- OpenAPI JSON: http://localhost:8081/api-docs
The application includes a Dashboard (/dashboard) that displays user-specific analytics:
- Total / Completed / In-Progress / Overdue: Quick summary metric cards.
- Completion Rate: A progress bar showing the percentage of completed tasks.
- Tasks by Status: A Pie Chart visualizing the distribution of task statuses.
- Tasks Created Over Time: A Line Chart tracking the number of tasks created daily.
All analytics endpoints are secured and scoped to only show data belonging to the currently authenticated user.
Redis is used as a caching layer to improve application performance and reduce database load:
- Task List Cache: Caches the user's task list (
@Cacheable(value = "tasks")). - Individual Task Cache: Caches single tasks (
@Cacheable(value = "task")). - Analytics Cache: Caches the results of the status distribution, time series, and summary queries.
Cache invalidation (@CacheEvict) is automatically triggered whenever a task is created, updated, or deleted, ensuring the user always sees fresh data without unnecessary DB queries.
Windows (PowerShell):
New-Item -ItemType Directory -Force -Path backups
docker exec -t task-manager-postgres pg_dump -U postgres -d taskmanager -F p -c -v > backups/task-manager-backup.sqlWindows (PowerShell):
# Copy backup file into container and execute restore
docker cp backups/task-manager-backup.sql task-manager-postgres:/tmp/restore.sql
docker exec -t task-manager-postgres psql -U postgres -d taskmanager -f /tmp/restore.sql
docker exec -t task-manager-postgres rm -f /tmp/restore.sql- The JWT refresh mechanism in the frontend currently uses a simple
setIntervalapproach. - Only a single Keycloak realm is supported, and user registration is disabled by default.
- Test coverage is minimal and needs to be expanded.
See AI_USAGE.md for details on how AI tools were used during the development of this project.