DSMTaskTracker is a RESTful API built using Java 17 and Spring Boot, designed to manage DSM tasks efficiently. It features secure JWT authentication, task management, activity logs, team collaboration, and more. The API is containerized using Docker for easy deployment.
- Java
- Maven
- Docker
- Clone the repository:
git clone https://github.com/yourusername/dsmtasktracker.git cd dsmtasktracker
- Build the project using Maven:
mvn clean install
- Configure your environment variables for email services:
EMAIL_SERVICE_USERNAME
EMAIL_SERVICE_PASSWORD
- Run the application locally:
mvn spring-boot:run
You can use tools like Postman or curl to interact with the API. Below are some of the main API endpoints.
- Login:
Request Body:
POST /auth/login
LoginRequest
- Register:
Request Body:
POST /auth/register
User
- Verify Email:
GET /auth/verifyemail?email={email}
- Generate OTP:
POST /auth/generateOTP?email={email}
- Validate OTP:
POST /auth/validateOTP?email={email}&OTP={OTP}
- Reset Password:
Request Body:
POST /auth/resetPassword
ResetPasswordBody
- Get Activities by User ID:
GET /api/activities/{userId}
- Delete Activities by User ID:
DELETE /api/activities/{userId}
- Add New Task:
Request Body:
POST /api/tasks
Task
- Get All Tasks by User ID:
GET /api/tasks/{userId}
- Get Tasks by User ID and Date:
GET /api/tasks/date/{userId}?date={date}
- Update Task by Task ID:
Request Body:
PUT /api/tasks/{taskId}
Task
- Delete Task by Task ID:
DELETE /api/tasks/{taskId}
- Add New Team:
Request Body:
POST /api/teams
Team
- Get All Teams by User ID:
GET /api/teams/{userId}
- Update Team by Team ID:
Request Body:
PUT /api/teams/{teamId}
Team
- Delete Team by Team ID:
DELETE /api/teams/{teamId}
- Delete Multiple Teams:
Request Body:
DELETE /api/teams
List<String>
- Get User by ID:
GET /api/users/{userId}
- Get User by Email:
GET /api/users/email/{email}
- Delete User by ID:
DELETE /api/users/{userId}
- Update User by ID:
Request Body:
PUT /api/users/{userId}
User
- Update User by Email:
Request Body:
PUT /api/users/email/{email}
User
To run the unit tests, use the following command:
mvn test
To deploy the API using Docker:
- Build the Docker image:
docker build -t dsmtasktracker .
- Run the Docker container:
docker run -p 8080:8080 dsmtasktracker
The application is now accessible at http://localhost:8080
.
The live version of the API is hosted here.
Note: Since the API is deployed on a shared server, the initial response may take a few minutes, but subsequent requests should be faster.
Contributions are welcome! Please fork this repository and submit a pull request for any improvements or new features.