Aaron Po de1e9ac02b Migrate Auth/Brewery/Location repositories to pure Dapper; rename Timer to RowVersion (#237)
* Integrate Spectre.Console into seed application, use async data loading

* Replace stored-procedure repositories with Dapper-based repositories

Removes the USP_* stored procedures for Auth, Location, and Brewery
data access in favour of services built with Dapper.

Adds a new Features.Locations slice and optimistic concurrency support
for the Brewery slice.

* Add new documentation for Dapper migration/database schema

* Update FluentAssertions to most recent open source ver

* Update XML doc comment in backend projects

* Modify brewery location dto to include denormalized data

* - Updated column names from 'Timer' to 'RowVersion' in schema.sql for
- Introduced new BeerPost entity and updated BreweryPost and BreweryPostLocation entities to use 'RowVersion' for concurrency.
- Modified UserAccount, UserCredential, UserVerification, City, StateProvince, and Country entities to use 'RowVersion' instead of 'Timer'.
- Updated tests and command handlers to reflect changes in concurrency token from 'Timer' to 'RowVersion'.
- Adjusted BreweryDto and BreweryDtoMapper to include 'RowVersion' and updated mapping logic accordingly.
- Ensured all repository methods and interfaces are aligned with the new concurrency handling approach.

* updates

* Add BeerStyle entity and related properties; refactor BreweryDto to remove BeerPosts

* Fix Api.Specs test failures: stale Timer column refs and missing test.user fixture

* Remove repository tests, usages of registration dto used in repo

* archive old stored procs/functions

* update stale docs

* Add instructions for generating cryptographically secure base64 secrets on macOS/Linux and Windows
2026-08-24 01:09:47 -04:00
2026-08-24 01:09:47 -04:00
2026-05-12 01:05:07 -04:00

The Biergarten App

The Biergarten App is a full-stack directory and discovery platform for breweries. It provides:

  • JWT-based user authentication, with email confirmation and refresh-token reissue
  • A searchable database of brewery locations
  • An offline data-generation pipeline that uses large language models (LLMs) via Llama.cpp and Wikipedia to synthesize realistic seed data

The repository is organized into:

  • A .NET backend (Web API + database migrations/seed) under web/backend/
  • A server-rendered React website (React Router + Vite) under web/frontend/
  • A C++20 data-generation CLI under tooling/pipeline/

Specialized documentation (setup, architecture, docker, testing, diagrams, and pipeline notes) lives under docs/.

Documentation

Website + backend (active stack):

Data generation pipeline (C++):

Diagrams

Current status

Active areas in the repository:

  • .NET 10 backend (vertical-slice architecture with MediatR) + SQL Server
  • React 19 website (React Router 7 + Vite)
  • Shared Biergarten theme system + Storybook coverage
  • Auth flows and account/email integration (local Mailpit in dev compose)
  • Data generation pipeline with C++ and Llama.cpp

Archived/reference areas:

  • archive/next-js-web-app/ contains an older Next.js frontend retained for reference

Tech stack

  • Backend: .NET 10, ASP.NET Core, SQL Server 2022, DbUp
  • Frontend: React 19, React Router 7, Vite 7, Tailwind CSS 4, DaisyUI 5
  • UI Documentation: Storybook 10, Vitest browser mode, Playwright
  • Testing: xUnit, Reqnroll (BDD), FluentAssertions, Moq
  • Infrastructure: Docker, Docker Compose
  • Security: Argon2id password hashing, JSON Web Tokens (JWT) for access/refresh/confirmation
  • Data Pipeline: C++20, CMake, Boost, libcurl, SQLite, llama.cpp

Requirements

  • .NET SDK 10 or later
  • Node.js 18 or later
  • Docker Desktop, or an equivalent Docker Engine setup

See Getting Started for the full prerequisite list, including the pipeline's C++ toolchain.

Quick start

For full setup details, use Getting Started. This section is the shortest path to a working dev environment.

Backend (Docker)

git clone https://github.com/aaronpo97/the-biergarten-app
cd the-biergarten-app

cp web/.env.example web/.env.dev
docker compose --env-file web/.env.dev -f web/docker-compose.dev.yaml up --build -d

Backend access:

Frontend (Node)

cd web/frontend
npm install
API_BASE_URL=http://localhost:8080 SESSION_SECRET=dev-secret-change-me npm run dev

Optional frontend tools:

cd web/frontend
npm run storybook
npm run test:storybook
npm run test:storybook:playwright

Repository structure

web/
  backend/          .NET API: API.Core (host), Features.* (vertical slices),
                     Shared.*, Domain.*, Infrastructure.*, Database.* projects
  frontend/         React Router website + Storybook + Playwright/Vitest

tooling/
  pipeline/         C++20 seed-data generation CLI (CMake)

docs/
  architecture.md   High-level architecture overview
  website/          Backend/frontend setup, docker, testing, diagrams
  pipeline/         Pipeline docs, ethics notes, PlantUML diagrams

archive/
  next-js-web-app/  Older Next.js frontend (reference only)

Testing

Create a test environment file, then run the backend test stack with Docker:

cp web/.env.example web/.env.test
docker compose --env-file web/.env.test -f web/docker-compose.test.yaml up --abort-on-container-exit

See Testing for the full command list.

Configuration

Common active variables:

  • Backend/Docker: DB_SERVER, DB_NAME, DB_USER, DB_PASSWORD, ACCESS_TOKEN_SECRET, REFRESH_TOKEN_SECRET, CONFIRMATION_TOKEN_SECRET, WEBSITE_BASE_URL
  • Frontend runtime: API_BASE_URL, SESSION_SECRET, NODE_ENV

See Environment Variables for details.

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Run the checks in Testing (backend tests, npm run lint, npm run typecheck)
  5. Push to the branch (git push origin feature/amazing-feature)
  6. Open a Pull Request

Support

Report bugs and request features via GitHub Issues.

License

GPL-3.0. See LICENSE.md.

Languages
C# 40.3%
C++ 31.8%
TypeScript 18%
HTML 1.7%
Gherkin 1.7%
Other 6.5%