Add database only docker compose file
The Biergarten App
Overview
The Biergarten App is evolving from a standalone full‑stack Next.js application into a multi‑project monorepo with a dedicated .NET backend and a SQL‑first approach. Backend data access is being refactored to use stored procedures. The Next.js site remains the frontend and will consume the .NET API.
Status note (Jan 26, 2026): Migration is in progress; some parts are still being moved from the website into the .NET layers.
Current Status
- Refactor is not complete; expect mixed responsibilities and evolving APIs.
- The Next.js app in Website currently runs standalone, retaining its serverless API routes, Prisma, and Neon Postgres stack as documented in Website/README.old.md.
- The .NET API and SQL‑first repository are under active development; endpoint parity with the legacy Next.js backend is in progress.
- Planned outcome: the Website will call the .NET API and deprecate its internal backend once parity is reached.
Repository Structure
- API
- API.Core: ASP.NET Core Web API with controllers and OpenAPI/Swagger enabled.
- Database
- Database.Core: SQL schema and logic deployment via DbUp (scripts embedded in the assembly). SQL‑first with stored procedures.
- Database.Seed: Seeders for initial data (users, locations) driven by
DB_CONNECTION_STRING.
- Repository
- Repository.Core: Data access layer using stored procedures. Includes
DefaultSqlConnectionFactorythat readsDB_CONNECTION_STRINGorConnectionStrings:Default. - Repository.Tests: Tests for repository functionality.
- Repository.Core: Data access layer using stored procedures. Includes
- Service
- Service.Core: Business/service layer consumed by the API.
- Website: Next.js frontend. Historically included serverless API routes, Prisma, and Neon Postgres; now focuses on UI and calls the .NET backend.
- docker-compose.yml: Local SQL Server service for development.
- LICENSE.md: Project license.
Tech Highlights
- Backend: ASP.NET Core Web API, SQL Server, stored procedures, DbUp for migrations and deployments.
- Data Access: Repository pattern over stored procedures (
Repository.Core). - Services: Encapsulated business logic (
Service.Core). - Frontend: Next.js with TailwindCSS, Headless UI, DaisyUI, Mapbox, Cloudinary integrations. See Website/README.old.md for prior app details and envs.
Local Development
Prerequisites
- .NET SDK 10+ (or compatible with the solution)
- Node.js 18+
- Docker Desktop (for local SQL Server)
1) Start SQL Server
Create a .env in the repo root with at least:
SA_PASSWORD=YourStrong!Passw0rd
Start the container:
docker compose up -d sqlserver
2) Configure database connection
Most projects read DB_CONNECTION_STRING. On macOS/zsh:
export DB_CONNECTION_STRING="Server=localhost,1433;Database=biergarten;User Id=sa;Password=$SA_PASSWORD;TrustServerCertificate=True;"
Alternatively, add ConnectionStrings:Default in API/API.Core/appsettings.json.
3) Apply schema and stored procedures
Run DbUp to provision the database (scripts embedded in Database.Core):
dotnet run --project Database/Database.Core
4) Seed initial data
dotnet run --project Database/Database.Seed
5) Run the API
dotnet run --project API/API.Core
Swagger/OpenAPI UI is available when running (e.g., https://localhost:5001/swagger or the port shown on startup). The project also maps an OpenAPI document via MapOpenApi().
6) Run the Website (frontend)
cd Website
npm install
npm run dev
For environment variables (Cloudinary, Mapbox, Prisma/Neon, etc.), see Website/README.old.md.
Note: At present, the Website runs standalone and uses its existing serverless backend (Next.js API routes + Prisma/Neon). Integration to the .NET API is planned and will replace those routes once feature parity is achieved.
Roadmap
- Complete migration of backend logic from Next.js to .NET.
- Expand stored procedure coverage for CRUD and domain operations.
- Introduce microservices for image upload and mapping; evaluate auth as a separate service.
- Harden CI/CD, testing, and observability across API, repository, and services.
License
See LICENSE.md.