Table of Contents

Online Shop (PoC)

The Online Shop is the first proof-of-concept project built on the self-hosted dev platform. It is a full-stack web application using ASP.NET Core Razor Pages, Entity Framework Core, PostgreSQL, and ASP.NET Core Identity. Its primary purpose is to validate that the AI agent pipeline can scaffold and implement a real multi-module application end-to-end.

YouTrack epic: COR-1028 — Poc: Online shop system Repository: shop

Scope

The PoC covers five modules:

Module Summary
Module 1 — Project Scaffolding Bootstrap .NET solution with Postgres and Docker Compose
Module 2 — Database Layer EF Core + PostgreSQL integration and initial schema migrations
Module 3 — Identity and Auth ASP.NET Core Identity with registration, login, and role-based access
Module 4 — Landing Page Public storefront entry point with product listing and navigation
Module 5 — Admin Page Authenticated back-office area with product CRUD restricted to Admin role

Module breakdown

Module 1 — Project Scaffolding (COR-1085)

Goal: A developer can clone the repo, run docker compose up, and have a working ASP.NET Core Web API connected to a local Postgres database with no manual setup steps beyond installing Docker and the .NET SDK.

Deliverables:

  • .NET solution and ASP.NET Core Web project
  • appsettings.json with PostgreSQL connection string; ConnectionStrings__Default environment variable override
  • docker-compose.yml with Postgres service for local development

Acceptance criteria:

  • dotnet build succeeds from the repo root
  • docker compose up starts a Postgres container with no errors
  • Health-check endpoint or startup log confirms DB connection at startup

Module 2 — Database Layer (COR-1086)

Goal: A working EF Core + PostgreSQL setup with a defined AppDbContext and an applied initial migration that creates the baseline database schema.

Deliverables:

  • EF Core + Npgsql.EntityFrameworkCore.PostgreSQL packages
  • AppDbContext with entity registrations
  • Initial migration generated and applied

Acceptance criteria:

  • Project builds
  • AppDbContext is defined with all entity registrations
  • Initial migration applied successfully; database schema reflects migration

Module 3 — Identity and Auth (COR-1090)

Goal: ASP.NET Core Identity backed by EF Core, with working registration and login flows, and role-based route protection including a seeded admin role.

Deliverables:

  • ASP.NET Core Identity configured with EF Core store
  • Scaffolded Register and Login pages/endpoints
  • Admin routes protected with [Authorize(Roles="Admin")]
  • Seeded admin role and admin user

Acceptance criteria:

  • Users can register and log in
  • Admin routes are inaccessible without the Admin role
  • Seed data creates the Admin role and a default admin user on startup

Module 4 — Landing Page (COR-1092)

Goal: A public-facing landing page at / that renders a read-only product listing from the database and provides shared navigation.

Deliverables:

  • Razor Page at / — accessible without authentication
  • Product listing section bound to the database (read-only)
  • Shared navigation header with Login and shop root links

Acceptance criteria:

  • Page reachable at / without authentication
  • Products from the database displayed in listing section
  • Navigation header present with correct links

Module 5 — Admin Page (COR-1101)

Goal: A secured back-office area at /Admin for administrators to manage products (CRUD), restricted to the Admin role.

Deliverables:

  • ASP.NET Core Razor Pages Area Admin under /Admin
  • Full product CRUD (list, create, edit, delete)
  • Area-level role protection for Admin role

Acceptance criteria:

  • All pages within /Admin are restricted to the Admin role
  • Anonymous and non-Admin authenticated requests are redirected appropriately
  • Full product CRUD works within the admin area

Architecture overview

flowchart TB
    %% Online Shop high-level architecture
    subgraph Browser["Browser"]
        Landing[Landing Page /]
        Admin[Admin Area /Admin]
    end

    subgraph App["ASP.NET Core Application"]
        RP[Razor Pages]
        ID[ASP.NET Core Identity]
        DB[AppDbContext\nEntity Framework Core]
    end

    subgraph Data["Data Layer"]
        PG[(PostgreSQL)]
    end

    Landing --> RP
    Admin -->|requires Admin role| RP
    RP --> ID
    RP --> DB
    ID --> DB
    DB --> PG

Frontend / Backend / Designer interaction contracts

The tech-leader planning agent has decomposed each module into per-lane sub-issues. The key cross-lane contracts are:

Contract Backend produces Frontend consumes
Product listing GET /api/productsProductDto[] Landing page product listing section
Authentication POST /Account/Login (Identity form post) Login Razor Page
Admin CRUD Razor Pages form posts at /Admin/Products Admin area CRUD pages

Because this PoC uses Razor Pages (server-rendered), the frontend and backend are co-located in a single project. Cross-lane contracts are expressed through shared view models and route conventions rather than explicit API schemas.