Skip to content

Latest commit

 

History

History
35 lines (24 loc) · 1.8 KB

README.md

File metadata and controls

35 lines (24 loc) · 1.8 KB

ToDo app template API

A template repository for a ToDo app API with .NET8 and PostgreSQL. REPR (FastEndpoints), CQRS (MediatR) and partially Clean Architecture patterns are used. The API is easily extensible and can be used as a starting point for a new project.

Functionality:

  • Create, read, update and delete ToDos
  • User registration, login, option to reset user's password. Accounts are stored in the database, authentication is done using JWT.
  • Email templates and sending emails via Smtp or SendGrid is supported. Email templates are written in Liquid templating language.

Prerequisites

Applying the database migrations

The database migrations are located in the ToDoAppTemplate.Data project. The following commands can be run from the solution root directory:

# Create a new migration
dotnet ef migrations add MigrationName --project ./ToDoAppTemplate.Data --startup-project ./ToDoAppTemplate.Api
# Apply a migration
dotnet ef database update --project ./ToDoAppTemplate.Data --startup-project ./ToDoAppTemplate.Api

Running the API

Either run the API by running docker-compose up from the root of the solution. This will start the API and a PostgreSQL database in Docker containers.

Or run the API from Visual Studio or the command line. The connection string to the database can be configured in the appsettings.json file.