- Swagger: https://commsflow.onrender.com
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.
- 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
- Install .NET 10 SDK or later.
- 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
- Install EF Core tools (if not already installed):
dotnet tool install --global dotnet-ef
- Restore all dependencies:
dotnet restore
- Apply database migrations:
dotnet ef database update
- Start the API:
dotnet run
Run tests from the project root:
dotnet test CommsFlow.Tests/CommsFlow.Tests.csproj -v normalTo build and run the app in Docker:
- Build the Docker image:
docker build -t commsflow .- Run the container:
docker run -p 5275:8080 commsflow
Or use Docker Compose:
docker-compose up --buildThe API will be available at http://localhost:5275/swagger
Open your browser at http://localhost:5275/swagger to test the endpoints.