Publix Mobile Chat Repository Overview
This document summarizes the layout of the s0pmobai-publix-mobile-chat-api repository so that contributors can quickly locate services, pipelines, configurations, and shared assets. The repo hosts both the conversational services stack and the accompanying admin UI.
Key Technologies
- Backend: .NET 8, ASP.NET Core Web API, Azure Functions isolated worker, xUnit tests
- Frontend: Next.js 15 (App Router), React 19, Tailwind CSS 4 preview, Jest/Testing Library
- CI/CD: Azure DevOps pipelines referencing the
S0AIDXXX-AI Deliverytemplate catalog - Observability: Application Insights (pre-wired for the Function App)
Top-Level Layout
ROOT
├─ README.md
├─ build/ # Azure DevOps pipeline definitions
├─ deploy/ # Infrastructure pipeline stubs
├─ docs/ # Repository documentation (this file lives here)
└─ src/
├─ services/ # .NET service solution and unit tests
└─ ui/ # Next.js admin console
Repository Root
README.md- generic scaffold description with links to Publix engineering guidance..gitignore,.git/- standard Git metadata.- Hidden OS artifacts (for example
.DS_Store) should be ignored.
Pipelines and Automation (build/, deploy/)
build/
azure-pipelines.pr-ai-agent.yml- Runs the AI PR Agent template with required Azure OpenAI service credentials.
azure-pipelines.webapi.pr-validation.yml- Uses the shared
dotnet-buildtemplate to restore, build, test, and run SonarQube analysis for the .NET solution. - Inputs include
buildPath: **/*.slnand test glob**/*.UnitTests.csproj; artifacts are not published in this PR validation flavor.
- Uses the shared
azure-pipelines.webapi.build-and-canary.yml- Placeholder pipeline that currently echoes "hello world"; intended to extend for build-and-canary deployments of the Web API.
azure-pipelines.ui.pr-validation.yml- Invokes the shared
node-buildtemplate targetingsrc/ui/s0pmobai-admin-site. - Runs lint, build, Jest unit tests, and SonarQube with coverage ingestion from
coverage/lcov.info.
- Invokes the shared
deploy/
azure-pipelines.infra.tf-ut.yml- Empty stub reserved for future infrastructure-as-code Terraform unit testing.
Backend Services (src/services/Publix.S0PMOBAI)
Publix.S0PMOBAI/
├─ Publix.S0PMOBAI.sln # Solution composing service projects and test projects
├─ src/
│ ├─ Publix.S0PMOBAI.Domain/ # Domain model library (net8.0)
│ ├─ Publix.S0PMOBAI.Application/ # Application services layer, references Domain
│ ├─ Publix.S0PMOBAI.Infrastructure/ # Infrastructure adapters, references Application & Domain
│ ├─ Publix.S0PMOBAI.WebAPI/ # ASP.NET Core Web API host
│ └─ Publix.S0PMOBAI.FunctionApp/ # Azure Functions isolated worker
└─ tests/
├─ Publix.S0PMOBAI.Domain.UnitTests/
├─ Publix.S0PMOBAI.Application.UnitTests/
├─ Publix.S0PMOBAI.Infrastructure.UnitTests/
├─ Publix.S0PMOBAI.FunctionApp.UnitTests/
└─ Publix.S0PMOBAI.WebAPI.UnitTests/ (skeleton)
Project Highlights
- Domain (
Publix.S0PMOBAI.Domain)- Target:
net8.0. - Currently empty aside from project scaffolding; intended to host core entities and value objects.
- Target:
- Application (
Publix.S0PMOBAI.Application)- Target:
net8.0; references Domain. - Placeholder for business logic, mediators, and use cases.
- Target:
- Infrastructure (
Publix.S0PMOBAI.Infrastructure)- Target:
net8.0; references Application and Domain. - Future home for persistence, integrations, and cross-cutting adapters.
- Target:
- Web API (
Publix.S0PMOBAI.WebAPI)- ASP.NET Core minimal hosting pattern with Swagger enabled in development.
Program.csconfigures controllers, Swagger, HTTPS redirection, and authorization middleware.- Default
WeatherForecastControllerandWeatherForecastDTO remain as placeholders. - Configuration:
appsettings.Development.jsontunes logging for local runs.
- Function App (
Publix.S0PMOBAI.FunctionApp)- Azure Functions isolated worker (
Microsoft.Azure.Functions.Worker2.0.0) with Application Insights telemetry enabled. Program.cswires up builder, exposes a test-friendlyIFunctionsApplicationRunner, and configures Application Insights.host.jsonenables sampling and Live Metrics filters.
- Azure Functions isolated worker (
Shared Testing Layout (tests/)
- Each layer has a corresponding xUnit project targeting
net8.0withMicrosoft.NET.Test.Sdk,coverlet.collector, andxunit.runner.visualstudiopre-configured. Publix.S0PMOBAI.FunctionApp.UnitTestsreferences the Function App to facilitate isolated worker testing.- Test classes are placeholders (
UnitTest1.cs) and should be replaced with meaningful test suites as features are developed.
Frontend Admin Site (src/ui/s0pmobai-admin-site)
-
Tech Stack
- Next.js 15 App Router, React 19, TypeScript 5, Tailwind CSS 4 (via
@tailwindcss/postcss), Recharts. - Testing via Jest 29,
@testing-library/react, and@testing-library/jest-dom.
- Next.js 15 App Router, React 19, TypeScript 5, Tailwind CSS 4 (via
-
Key Directories
app/layout.tsx- Defines the root HTML shell, font loading (Geist), theme initialization script, and rendersNavBar+ThemeProvider.page.tsx- Dashboard landing page that rendersDashboardOverviewwith mock data.globals.css- Global styles (Tailwind + custom variables).
shared/providers/ThemeProvider.tsx- React context for light/dark theme toggling, synced with local storage anddata-themeattribute.ui/- Reusable UI widgets (ThemeToggle,Calendar).lib/classNames.ts- Utility for conditional class composition.
widgets/- Feature-specific bundles with colocated
modelanduisubfolders (e.g.,dashboard,navigation). dashboard/includesDashboardOverviewcomponent, sample data generator, and type definitions.navigation/contains theNavBarcomponent and supporting link models.
- Feature-specific bundles with colocated
tests/unit/placeholder for Jest-based unit tests (currently empty).
public/- Static assets (e.g.,
publix.svgreferenced by the nav bar).
- Static assets (e.g.,
coverage/- Output from the latest Jest run (lcov, summary, HTML report).
-
Configuration Files
package.json- Scripts fordev,build,start,lint,test, andtest:watch.next.config.ts,eslint.config.mjs,jest.config.ts,jest.setup.ts,postcss.config.mjs,tsconfig.json- Standard Next.js/Tailwind/Jest configuration.next-env.d.ts- Next.js TypeScript definitions (auto-generated).
Documentation (docs/)
- This folder is the home for internal documentation that can be surfaced in the team wiki.
repository-structure.md(current document) should be updated as the solution evolves.
Getting Started Pointers
- Restore & Build backend locally
dotnet restore src/services/Publix.S0PMOBAI/Publix.S0PMOBAI.slndotnet build src/services/Publix.S0PMOBAI/Publix.S0PMOBAI.sln
- Run backend tests
dotnet test src/services/Publix.S0PMOBAI/Publix.S0PMOBAI.sln
- Start the Web API
dotnet run --project src/services/Publix.S0PMOBAI/src/Publix.S0PMOBAI.WebAPI
- Start the Function App
func start(requires Azure Functions Core Tools v4) after publishing ordotnetrun via the isolated worker.
- Run the admin UI
npm install(once) insidesrc/ui/s0pmobai-admin-sitenpm run devfor local development