Skip to content

Sehbaz/CommsFlow

Repository files navigation

CommsFlow

Live App

A simple ASP.NET Core Web API for managing templates. This project lets you create and list templates using a SQLite database. It includes basic endpoints and Swagger UI for easy testing.

Features

  • List all templates
  • Add new templates
  • Simple SQLite database integration
  • Swagger UI for API documentation
  • Global exception handling middleware
  • Request validation with data annotations
  • Health check endpoint at /health
  • Automated tests with xUnit and EF Core InMemory

How to Run

  1. Install .NET 10 SDK or later.
  2. Install required NuGet packages:
    dotnet add package Microsoft.EntityFrameworkCore
    dotnet add package Microsoft.EntityFrameworkCore.Sqlite
    dotnet add package Microsoft.EntityFrameworkCore.Design
    dotnet add package Swashbuckle.AspNetCore
  3. Install EF Core tools (if not already installed):
    dotnet tool install --global dotnet-ef
  4. Restore all dependencies:
    dotnet restore
  5. Apply database migrations:
    dotnet ef database update
  6. Start the API:
    dotnet run

Testing

Run tests from the project root:

dotnet test CommsFlow.Tests/CommsFlow.Tests.csproj -v normal

Docker

To build and run the app in Docker:

  1. Build the Docker image:
docker build -t commsflow .
  1. Run the container:
    docker run -p 5275:8080 commsflow

Or use Docker Compose:

docker-compose up --build

The API will be available at http://localhost:5275/swagger

Open your browser at http://localhost:5275/swagger to test the endpoints.

About

A simple ASP.NET Core Web API for managing templates.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors