Micro Service For Registering For An Event
Find a file
2026-03-01 18:14:54 +01:00
.vscode Relay all api calls 2026-02-19 10:54:32 +01:00
src Change regex to match backend. 2026-03-01 18:14:54 +01:00
.gitignore quick fix 2026-02-19 22:19:49 +01:00
Caddyfile quick fix 2026-02-24 21:27:24 +01:00
docker-compose.yml Docker Setup 2026-02-19 22:47:52 +01:00
LICENSE Initial commit 2026-01-16 10:55:11 +01:00
MODELS.md basic structure 2026-01-26 21:38:33 +01:00
README.md Relay all api calls 2026-02-19 10:54:32 +01:00

vbytes-lan-registration

Micro Service For Registering For An Event

TECH STACK

FrontEnd

  • React
  • ShadCN

BackEnd

  • .NET API Controllers
  • Dapper

Design

  • GET Is Already Registered -- Local Database
  • GET Is Member -- Auth API
  • POST Register Member For Event -- Main Database

Database

  • Postgres

Configuration

Sensitive values are never stored in source control. Configure them via user secrets (development) or environment variables (production).

Key-only examples are available here:

  • src/Registration/Registration.API/appsettings.example.json
  • src/Auth/AuthAPI/appsettings.example.json
  • src/Web/lan-frontend/.env.example

Frontend (Next.js)

Run from src/Web/lan-frontend:

cp .env.example .env.local

Set the backend API base URL in .env.local:

REGISTRATION_API_URL=http://localhost:5063

Registration.API

Run from src/Registration/Registration.API:

dotnet user-secrets set "VbytesRelay:ApiKey" "<your-api-key>"
dotnet user-secrets set "VbytesRelay:ClientCertificatePfxPath" "<absolute-path-to>.pfx"
dotnet user-secrets set "VbytesRelay:ParticipantRegisterPath" "/api/participant"
dotnet user-secrets set "Security:SsnPepper" "<your-pepper-value>"
Key Description
VbytesRelay:ApiKey API key for the Vbytes relay service
VbytesRelay:ClientCertificatePfxPath Absolute path to the client certificate .pfx file
VbytesRelay:ParticipantRegisterPath Path for the participant registration endpoint on the relay (e.g. /api/participant)
Security:SsnPepper Pepper value used when hashing SSNs

For non-development environments, ensure these environment variables are set:

ConnectionStrings__DefaultConnection=<postgres-connection-string>
Security__SsnPepper=<pepper-value>
VbytesRelay__BaseUrl=https://api.lan.vbytes.se
VbytesRelay__ParticipantRegisterPath=/api/participant
VbytesRelay__VolunteerRegisterPath=/api/volunteer
VbytesRelay__ApiKeyHeaderName=X-Api-Key
VbytesRelay__ApiKey=<relay-api-key>
VbytesRelay__ClientCertificatePfxPath=<absolute-path-to>.pfx
AuthApi__BaseUrl=<auth-api-base-url>
AuthApi__ValidatePath=/validate

Note: ASP.NET Core's configuration priority is appsettings.jsonappsettings.Development.jsonuser secretsenvironment variables. Environment variables always win, so any value set in launchSettings.json will override user secrets. Secret values (ApiKey, cert paths, relay paths) are intentionally absent from launchSettings.json to ensure user secrets are respected.

AuthAPI

Run from src/Auth/AuthAPI:

dotnet user-secrets set "EnvironmentVariables:ApiUrl" "<member-api-url>"
dotnet user-secrets set "EnvironmentVariables:ApiKey" "<member-api-key>"
dotnet user-secrets set "EnvironmentVariables:AssociationNumber" "<association-number>"
Key Description
EnvironmentVariables:ApiUrl Base URL of the member validation API
EnvironmentVariables:ApiKey API key for the member validation API
EnvironmentVariables:AssociationNumber Association number used for member lookups

For non-development environments, ensure these environment variables are set:

EnvironmentVariables__ApiUrl=<member-api-url>
EnvironmentVariables__ApiKey=<member-api-key>
EnvironmentVariables__AssociationNumber=<association-number>

For frontend production configuration, set:

REGISTRATION_API_URL=<registration-api-base-url>