chore(kitchen-dal): checkpoint pending development updates

This commit is contained in:
José René White Enciso 2026-03-09 11:57:46 -06:00
parent a5853f39b9
commit 583d345222
11 changed files with 171 additions and 2 deletions

9
.dockerignore Normal file
View File

@ -0,0 +1,9 @@
**/bin/
**/obj/
.vs/
TestResults/
.git/
.repo-tasks/
.repo-context/
.tasks/
.agile/

View File

@ -3,8 +3,8 @@
<Authors>AgileWebs</Authors>
<Company>AgileWebs</Company>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>http://192.168.10.100:3000/AgileWebs/kitchen-dal</RepositoryUrl>
<PackageProjectUrl>http://192.168.10.100:3000/AgileWebs/kitchen-dal</PackageProjectUrl>
<RepositoryUrl>https://gitea.dream-views.com/AgileWebs/kitchen-dal</RepositoryUrl>
<PackageProjectUrl>https://gitea.dream-views.com/AgileWebs/kitchen-dal</PackageProjectUrl>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
</PropertyGroup>
</Project>

20
Dockerfile Normal file
View File

@ -0,0 +1,20 @@
# syntax=docker/dockerfile:1.7
ARG SDK_IMAGE=mcr.microsoft.com/dotnet/sdk:10.0
ARG RUNTIME_IMAGE=mcr.microsoft.com/dotnet/aspnet:10.0
FROM ${SDK_IMAGE} AS build
ARG NUGET_FEED_URL=https://gitea.dream-views.com/api/packages/AgileWebs/nuget/index.json
ARG NUGET_FEED_USERNAME=
ARG NUGET_FEED_TOKEN=
WORKDIR /src
COPY . .
RUN if [ -n "$NUGET_FEED_USERNAME" ] && [ -n "$NUGET_FEED_TOKEN" ]; then dotnet nuget add source "$NUGET_FEED_URL" --name gitea-org --username "$NUGET_FEED_USERNAME" --password "$NUGET_FEED_TOKEN" --store-password-in-clear-text --allow-insecure-connections --configfile /root/.nuget/NuGet/NuGet.Config; fi
RUN dotnet restore "src/Kitchen.DAL.Host/Kitchen.DAL.Host.csproj" --configfile /root/.nuget/NuGet/NuGet.Config
RUN dotnet publish "src/Kitchen.DAL.Host/Kitchen.DAL.Host.csproj" -c Release -o /app/publish /p:UseAppHost=false --no-restore
FROM ${RUNTIME_IMAGE} AS runtime
WORKDIR /app
ENV ASPNETCORE_URLS=http://+:8080 ASPNETCORE_ENVIRONMENT=Production
EXPOSE 8080
COPY --from=build /app/publish .
ENTRYPOINT ["dotnet", "Kitchen.DAL.Host.dll"]

View File

@ -1,5 +1,6 @@
<Solution>
<Folder Name="/src/">
<Project Path="src/Kitchen.DAL.Host/Kitchen.DAL.Host.csproj" />
<Project Path="src/Kitchen.DAL/Kitchen.DAL.csproj" />
</Folder>
</Solution>

View File

@ -0,0 +1,18 @@
# Feature Epics
## Repository
kitchen-dal
## Core Epics
- Epic 1: Expand domain-aligned capabilities for restaurant operations.
- Epic 2: Stabilize service contracts for containerized runtime integration.
- Epic 3: Improve observability and operational readiness for demo compose environments.
## Domain-Specific Candidate Features
- Order lifecycle consistency and state transitions.
- Kitchen queue and dispatch optimization hooks.
- Operations control-plane policies (flags, service windows, overrides).
- POS closeout and settlement summary alignment.
## Documentation Contract
Any code change in this repository must include docs updates in the same branch.

View File

@ -0,0 +1,38 @@
# Containerization Runbook
## Image Build
```bash
docker build --build-arg NUGET_FEED_USERNAME=<gitea-login> --build-arg NUGET_FEED_TOKEN=<gitea-token> -t agilewebs/kitchen-dal:dev .
```
## Local Run
```bash
docker run --rm -p 8080:8080 --name kitchen-dal agilewebs/kitchen-dal:dev
```
## Health Probe
- Path: `/health`
- Fallback path: `/healthz`
- Port: `8080`
## Runtime Notes
- Exposes internal DAL probe endpoints for kitchen work item reads/writes.
## Health Endpoint Consistency
- Canonical probe: `/health`
- Compatibility probe: `/healthz`
- Container port: `8080`
## Demo Integration
- Participates in: **restaurant** demo compose stack.
- Integration artifact path: `greenfield/demo/restaurant/docker-compose.yml`
## Known Limitations
- Current runtime adapters are still predominantly in-memory for deterministic local/demo behavior.
- Demo PostgreSQL seeds validate integration contracts and smoke determinism, but do not yet imply full persistence implementation parity.

View File

@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Kitchen.DAL\Kitchen.DAL.csproj" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,30 @@
using Kitchen.DAL.Contracts;
using Kitchen.DAL.Repositories;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddHealthChecks();
builder.Services.AddSingleton<IKitchenWorkItemRepository, InMemoryKitchenWorkItemRepository>();
var app = builder.Build();
app.MapGet("/internal/kitchen-dal/work-items/queued", async (
IKitchenWorkItemRepository repository,
CancellationToken ct) =>
{
var items = await repository.ListQueuedAsync(ct);
return Results.Ok(items);
});
app.MapPost("/internal/kitchen-dal/work-items", async (
KitchenWorkItemRecord record,
IKitchenWorkItemRepository repository,
CancellationToken ct) =>
{
await repository.UpsertAsync(record, ct);
return Results.Accepted($"/internal/kitchen-dal/work-items/{record.WorkItemId}", record);
});
app.MapHealthChecks("/health");
app.MapHealthChecks("/healthz");
app.Run();

View File

@ -0,0 +1,23 @@
{
"$schema": "https://json.schemastore.org/launchsettings.json",
"profiles": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "http://localhost:0",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "https://localhost:0;http://localhost:0",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}

View File

@ -0,0 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
}

View File

@ -0,0 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*"
}