Tasker is a simple task manager that allows you to create, edit, and delete tasks. Also you can register and login to save your tasks. The serviceare using JWT for authentication. For development was user .NET 8.0, Entity Framework Core, and SQL Server.
- .NET 8.0
- A SQL database (SQL Server)
- EF Core Tools
git clone https://github.com/Vladipz/Tasker.git
cd Tasker- Configure Application Settings Copy the example configuration file and edit it to set up your environment:
cd .\Tasker.API\
cp appsettings.example.json appsettings.Development.json
cd ..Edit appsettings.json to include your database connection string and other settings.
- Install dependencies
dotnet restore- Apply migrations
dotnet ef database update- Run the application
dotnet run --project .\Tasker.API\To run the app using docker compose:
- Clone the repository
git clone https://github.com/Vladipz/Tasker.git
cd Tasker- Run docker-compose
docker-compose upThat's it, the app is preconfigured in the compose file, so no extra configuration is required. After all of the containers have started, you'll have 3 running containers:
- ASP .NET Core API on port 5001 (http)
- MsSql database on port 5002 (http)
Retrieve a list of tasks.
priorityQuery: string (optional)statusQuery: string (optional)dueDate: string (date-time) (optional)sortColumn: string (optional)sortOrder: string (optional)page: integer (required)pageSize: integer (required)
- 200 OK: List of tasks returned.
- 400 Bad Request: Invalid query parameters.
Create a new task.
TaskRequest(JSON):title: string (optional)description: string (optional)dueDate: string (date-time) (optional)status: integer (TaskStatusType)priority: integer (TaskPriorityType)
- 200 OK: Task created.
- 400 Bad Request: Validation error.
Retrieve a task by its id.
id: string (uuid) (required)
- 200 OK: Task returned.
- 404 Not Found: Task not found.
- 403 Forbidden: Unauthorized. (user try get task that not belongs to him)
Update an existing task by its id.
id: string (uuid) (required)
TaskRequest(JSON)
- 200 OK: Task updated.
- 400 Bad Request: Validation error.
- 404 Not Found: Task not found.
- 403 Forbidden: Unauthorized(user try edit task that not belongs to him).
Delete a task by its id.
id: string (uuid) (required)
- 200 OK: Task deleted.
- 404 Not Found: Task not found.
Register a new user.
RegistrationRequest(JSON):username: string (required)email: string (email) (required)password: string (required)
- Password Requirements:
- The password cannot be empty.
- Minimum password length is 8 characters.
- Maximum password length is 16 characters.
- Must contain at least one uppercase letter.
- Must contain at least one lowercase letter.
- Must contain at least one number.
- Must contain at least one special character (e.g., !, ?, *, .).
- 200 OK: User registered.
- 409 Conflict: Username or email already exists.
- 400 Bad Request: Validation error.(password)
Login a user.
LoginRequest(JSON):username: string (required)password: string (required)
- 200 OK: User logged in.
- 404 Not Found: User not found.
- 401 Unauthorized: Invalid password.
- 400 Bad Request: Validation error or missing fields in settings
- Properties:
username: string (required, minLength: 1)password: string (required, minLength: 1)
- Properties:
username: string (required, minLength: 1)email: string (required, format: email, minLength: 1)password: string (required, minLength: 1)
- Enum Values: 0, 1, 2, 3
- Properties:
title: string (nullable, optional)description: string (nullable, optional)dueDate: string (format: date-time, nullable, optional)status: integer (TaskStatusType)priority: integer (TaskPriorityType)
- Enum Values: 0, 1, 2, 3