A scalable, enterprise-grade task management platform built with Java and Spring Boot, featuring dual-channel notifications (real-time and scheduled), file management, and comprehensive audit logging.
- JWT Authentication: Secure token-based authentication with role-based access control (RBAC)
- Full CRUD Operations: Complete REST API for tasks and users
- Advanced Filtering: Filter tasks by status, priority, assignee, due date, and search terms
- Bulk Import: CSV-based bulk task creation with validation
- File Management: Upload/download file attachments with pre-signed URLs (S3 or local storage)
- Audit Logging: Comprehensive tracking of all significant actions
- Real-time Notifications: Instant notifications on task assignment and status changes
- Scheduled Reminders: Automated reminders before task due dates (configurable)
- Multi-channel Delivery: Email and Kafka-based event streaming
- Clean Architecture: Layered design (Controller β Service β Repository)
- Event-Driven: Spring Events and Kafka for asynchronous processing
- Cloud-Native: Docker containerization with docker-compose orchestration
- API Documentation: Interactive Swagger/OpenAPI documentation
- Framework: Spring Boot 3.2.0
- Language: Java 17
- Database: PostgreSQL 15
- Messaging: Apache Kafka
- File Storage: AWS S3 / Local filesystem
- Security: Spring Security with JWT (JJWT 0.12.3) and BCrypt
- API Documentation: SpringDoc OpenAPI (Swagger)
- Build Tool: Maven
- Containerization: Docker & Docker Compose
- Java 17 or higher
- Maven 3.6+
- Docker & Docker Compose (for containerized deployment)
- PostgreSQL 15+ (if running locally without Docker)
- Apache Kafka (if running locally without Docker)
-
Clone the repository
git clone <repository-url> cd "Notification System"
-
Build and start all services
docker-compose up -d
This will start:
- PostgreSQL database (port 5432)
- Apache Kafka & Zookeeper (port 9092)
- Spring Boot application (port 8080)
- pgAdmin (port 5050) - Database management UI
- Kafka UI (port 8090) - Kafka management UI
-
Verify services are running
docker-compose ps
-
View application logs
docker-compose logs -f app
-
Start PostgreSQL
# Using Docker docker run -d --name postgres \ -e POSTGRES_DB=taskmanagement \ -e POSTGRES_USER=postgres \ -e POSTGRES_PASSWORD=postgres \ -p 5432:5432 \ postgres:15-alpine -
Start Kafka
# Using Docker Compose for Kafka only docker-compose up -d zookeeper kafka -
Configure application
- Update
src/main/resources/application.ymlwith your settings - Or create
application-local.ymlfor local overrides
- Update
-
Build and run the application
mvn clean install mvn spring-boot:run
This application uses JWT (JSON Web Token) based authentication with role-based access control.
-
Register a new user:
curl -X POST http://localhost:8080/api/auth/register \ -H "Content-Type: application/json" \ -d '{ "username": "admin", "email": "admin@example.com", "password": "admin123", "role": "ADMIN" }'
-
Copy the JWT token from the response
-
Use the token in subsequent requests:
curl -X GET http://localhost:8080/api/users \ -H "Authorization: Bearer <your-token>"
- ADMIN: Full access to all endpoints
- MANAGER: Can manage tasks and view users
- USER: Can view tasks and manage own data
π For detailed authentication guide, see AUTHENTICATION.md
Once the application is running, access the interactive API documentation:
- Swagger UI: http://localhost:8080/swagger-ui/index.html
- OpenAPI JSON: http://localhost:8080/api-docs
- Open Swagger UI at http://localhost:8080/swagger-ui/index.html
- Register or login via
/api/auth/registeror/api/auth/login - Copy the JWT token from the response
- Click the π Authorize button at the top right
- Paste your token and click Authorize
- Now you can test all protected endpoints
POST /api/auth/register- Register a new userPOST /api/auth/login- Login with credentials
POST /api/users- Create a new userGET /api/users- Get all usersGET /api/users/{id}- Get user by IDGET /api/users/username/{username}- Get user by usernamePUT /api/users/{id}- Update userDELETE /api/users/{id}- Delete user
POST /api/tasks- Create a new task (ADMIN, MANAGER)GET /api/tasks- Get all tasks (ADMIN, MANAGER, USER)GET /api/tasks/{id}- Get task by ID (ADMIN, MANAGER, USER)POST /api/tasks/filter- Get filtered tasks (ADMIN, MANAGER, USER)PUT /api/tasks/{id}- Update task (ADMIN, MANAGER)DELETE /api/tasks/{id}- Delete task (ADMIN only)POST /api/tasks/import/csv- Bulk import tasks from CSV (ADMIN, MANAGER)
POST /api/files/upload- Upload file attachment (ADMIN, MANAGER)GET /api/files/{id}- Get file details (ADMIN, MANAGER, USER)GET /api/files/task/{taskId}- Get all files for a task (ADMIN, MANAGER, USER)GET /api/files/{id}/download-url- Get pre-signed download URL (ADMIN, MANAGER, USER)DELETE /api/files/{id}- Delete file (ADMIN only)
GET /api/audit-logs- Get all audit logs (ADMIN only)GET /api/audit-logs/entity/{entityType}/{entityId}- Get logs for specific entity (ADMIN only)GET /api/audit-logs/user/{username}- Get logs by user (ADMIN only)
# Register a new admin user
curl -X POST http://localhost:8080/api/auth/register \
-H "Content-Type: application/json" \
-d '{
"username": "admin",
"email": "admin@example.com",
"password": "admin123",
"role": "ADMIN"
}'
# Save the token from the response
TOKEN="<your-jwt-token-here>"curl -X POST http://localhost:8080/api/users \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"username": "john.doe",
"email": "john.doe@example.com",
"password": "password123",
"firstName": "John",
"lastName": "Doe",
"role": "USER"
}'curl -X POST http://localhost:8080/api/tasks \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "Implement new feature",
"description": "Add user authentication",
"status": "TODO",
"priority": "HIGH",
"dueDate": "2025-11-15T10:00:00",
"assigneeId": 1,
"estimatedHours": 8
}'curl -X POST http://localhost:8080/api/tasks/filter \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"status": "TODO",
"priority": "HIGH",
"assigneeId": 1
}'curl -X POST http://localhost:8080/api/tasks/import/csv \
-H "Authorization: Bearer $TOKEN" \
-F "file=@sample-tasks.csv"curl -X POST http://localhost:8080/api/files/upload \
-H "Authorization: Bearer $TOKEN" \
-F "file=@document.pdf" \
-F "taskId=1"Key configuration options in application.yml:
# Database
spring.datasource.url: jdbc:postgresql://localhost:5432/taskmanagement
spring.datasource.username: postgres
spring.datasource.password: postgres
# Kafka
spring.kafka.bootstrap-servers: localhost:9092
# File Storage
app.storage.type: S3 # or LOCAL
app.storage.s3.bucket-name: your-bucket-name
app.storage.s3.region: us-east-1
# Notifications
app.notification.enabled: true
app.notification.reminder.hours-before-due: 24
app.notification.reminder.cron: "0 0 * * * *" # Every hour
# Email
spring.mail.host: smtp.gmail.com
spring.mail.username: your-email@gmail.com
spring.mail.password: your-passwordFor Docker deployment, set these environment variables:
SPRING_DATASOURCE_URLSPRING_DATASOURCE_USERNAMESPRING_DATASOURCE_PASSWORDSPRING_KAFKA_BOOTSTRAP_SERVERSAWS_ACCESS_KEY(for S3)AWS_SECRET_KEY(for S3)MAIL_USERNAMEMAIL_PASSWORD
βββββββββββββββββββββββββββββββββββββββββββ
β Controller Layer β
β (REST API, Request/Response Handling) β
βββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββ
β Service Layer β
β (Business Logic, Validation) β
βββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββ
β Repository Layer β
β (Data Access, JPA Repositories) β
βββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββ
β Database β
β (PostgreSQL) β
βββββββββββββββββββββββββββββββββββββββββββ
Task Event (Assignment/Status Change)
β
Spring Event Publisher
β
TaskEventListener
β
NotificationService
β
βββββββββββββββββ¬ββββββββββββββββ
β β β
Email Kafka Topic Database
- users: User accounts with roles and authentication
- tasks: Task details with status, priority, and assignments
- file_attachments: File metadata and storage references
- audit_logs: Comprehensive audit trail
- User β Tasks (One-to-Many: created tasks)
- User β Tasks (One-to-Many: assigned tasks)
- Task β FileAttachments (One-to-Many)
- Password Encryption: BCrypt hashing
- API Security: Spring Security with HTTP Basic (can be extended to JWT)
- CSRF Protection: Disabled for REST API (enable for web applications)
- Input Validation: Jakarta Validation annotations
- SQL Injection Prevention: JPA/Hibernate parameterized queries
- Actuator Endpoints: http://localhost:8080/actuator
- Health Check: http://localhost:8080/actuator/health
- Metrics: http://localhost:8080/actuator/metrics
Run tests with:
mvn test-
Security
- Change JWT secret key (use environment variable)
- Update JWT token expiration as needed
- Enable HTTPS/TLS
- Review and update CORS settings
- Implement rate limiting
-
Infrastructure
- Configure external PostgreSQL and Kafka
- Set up AWS S3 for file storage
- Configure email SMTP settings
- Set up monitoring and logging
- Configure backup strategies
-
Configuration
- Update
application.ymlfor production settings - Use environment variables for sensitive data
- Configure proper logging levels
- Update
docker build -t taskmanagement:latest .src/
βββ main/
β βββ java/com/taskmanagement/
β β βββ config/ # Configuration classes (Security, OpenAPI, etc.)
β β βββ controller/ # REST controllers
β β βββ dto/ # Data Transfer Objects
β β βββ event/ # Event classes
β β βββ exception/ # Custom exceptions
β β βββ model/ # Entity classes
β β βββ repository/ # JPA repositories
β β βββ security/ # JWT authentication & filters
β β βββ service/ # Business logic
β βββ resources/
β βββ application.yml # Application configuration
βββ test/ # Test classes
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the Apache License 2.0.
For issues and questions:
- Create an issue in the repository
- Email: support@taskmanagement.com
- JWT-based authentication with RBAC
- User and task CRUD operations
- CSV bulk import
- File management (local storage)
- Audit logging
- Swagger API documentation
- Docker containerization
- Email notifications (SMTP configuration needed)
- AWS S3 integration (credentials needed)
- Refresh token mechanism
- Password reset functionality
- Email verification
- WebSocket support for real-time updates
- Advanced reporting and analytics
- Mobile app integration
- Multi-tenancy support
- Advanced workflow automation
- Integration with third-party tools (Jira, Slack, etc.)
- AUTHENTICATION.md - Comprehensive JWT authentication guide
- README.md - This file (project overview)
- Swagger UI - Interactive API documentation at http://localhost:8080/swagger-ui/index.html