Skip to content

todo api using postgreSQL and hexagonal architecture

License

Notifications You must be signed in to change notification settings

includeDaniel/todo-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

todo-api

Overview

This repository contains a .NET 8 API built with hexagonal architecture, utilizing PostgreSQL as the database. The project strictly adheres to SOLID principles and is designed for managing ToDo items.

Features

  • Hexagonal architecture for modularity and maintainability.
  • Swagger for the interface.
  • Authorization with login and register.
  • PostgreSQL for seamless data storage and retrieval.
  • Follows SOLID principles for a scalable and well-structured design.
  • ToDo functionality: create, read, update, delete and edit tasks.

Getting Started

Prerequisites

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/todo-api.git
    
  2. Navigate to the project directory:

    cd Todo-API
    
  3. Build the project:

    dotnet build
    
  4. Set up your PostgreSQL database and update the connection string in the configuration.

  5. Apply database migrations:

    dotnet ef database update
    
  6. Run the API:

    dotnet run
    

Configuration

Update the database connection string in the appsettings.json file.

API Endpoints

  • GET /api/todo: Retrieve all ToDo items
  • GET /api/todo/{id}: Retrieve a specific ToDo item
  • POST /api/todo: Create a new ToDo item
  • PUT /api/todo/{id}: Update a ToDo item
  • DELETE /api/todo/{id}: Delete a ToDo item

image

Releases

No releases published

Packages

No packages published

Languages