https://github.com/mawalou14/todomanagementapi
This repository contains a .NET Core web API project that provides user authentication and todo management functionalities. It includes features such as user registration, login, token-based authentication, CRUD operations for todos, and user profile management.
https://github.com/mawalou14/todomanagementapi
api authentication dotnet8 todo-api
Last synced: 8 days ago
JSON representation
This repository contains a .NET Core web API project that provides user authentication and todo management functionalities. It includes features such as user registration, login, token-based authentication, CRUD operations for todos, and user profile management.
- Host: GitHub
- URL: https://github.com/mawalou14/todomanagementapi
- Owner: mawalou14
- Created: 2024-07-08T15:52:43.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-20T20:50:22.000Z (almost 2 years ago)
- Last Synced: 2025-02-21T18:33:03.479Z (over 1 year ago)
- Topics: api, authentication, dotnet8, todo-api
- Language: C#
- Homepage:
- Size: 62.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Todo Management API
The Todo Management API is a .NET Core web application designed for managing user todos and providing authentication services. It includes orchestration support using Docker Compose.
## Table of Contents
- [Features](#features)
- [Technologies Used](#technologies-used)
- [Getting Started](#getting-started)
- [API Endpoints](#api-endpoints)
- [Input Validations](#input-validations)
- [Web App Repository](#web-app-repository)
## Features
- **User Authentication:**
- Register with email and password.
- Login with JWT token-based authentication.
- Password hashing for security.
- **Todo Management:**
- Create, retrieve, update, and delete todos.
- Set priorities (high, medium, low) and status (e.g., completed, pending) for todos.
- Filter todos by user and status.
- **Profile Management:**
- Update user profile information (e.g., full name).
- Change user password securely.
- **Security Features:**
- JWT token generation and validation.
- Password hashing using BCrypt.
- Role-based access control.
- **Orchestration Support:**
- Docker Compose for managing multi-container Docker applications.
- Includes Dockerfile for building the API container.
- PostgreSQL database container integration.
- **Validation:**
- Input validation using FluentValidation.
- Ensures data integrity and proper error handling.
- Validations for user registration, login, profile updates, and todos.
## Technologies Used
- **Backend:**
- .NET Core
- Entity Framework Core for database interactions
- JWT for authentication
- BCrypt.Net for password hashing
- FluentValidation for input validation
- **Database:**
- PostgreSQL
## Getting Started
To run the application locally using Docker Compose:
1. Clone this repository.
2. Navigate to the project directory.
3. Run `docker-compose up --build` to build and start the containers.
4. Access the API at `http://localhost:5000`.
## API Endpoints
- **Authentication:**
- `POST /auth/register`: Register a new user.
- `POST /auth/login`: Authenticate and retrieve JWT token.
- **Todo Management:**
- `GET /todos`: Get all todos.
- `GET /todos/{id}`: Get a todo by ID.
- `POST /todos`: Create a new todo.
- `PUT /todos/{id}`: Update a todo.
- `PATCH /todos/{id}/status`: Update todo status.
- `PATCH /todos/{id}/priority`: Update todo priority.
- `DELETE /todos/{id}`: Delete a todo.
- **User Profile:**
- `GET /profile/{userId}/todos`: Get todos for a specific user.
- `PATCH /profile/{userId}`: Update user profile.
- `PATCH /profile/{userId}/password`: Change user password.
- `DELETE /profile/{userId}`: Delete user account.
## Input Validations
- **User Registration and Login:**
- Email must be in a valid email format.
- Password must meet minimum length and complexity requirements.
- Confirm Password must match the Password.
- **Profile Updates:**
- Full Name cannot be empty.
- Password change requires current password verification and new password confirmation.
- **Todo Management:**
- Description must be provided.
- Priority must be one of the predefined values (high, medium, low).
- Status must be valid.
- Targeted Time must be a future date.
## Web App Repository
- Here we have the Web Application Repository for this project: [Angular Todo Management Repository](https://github.com/mawalou14/TodoManagementApp.git).
- Note that the API is made with Angular version 16.