| .vscode | ||
| src | ||
| .gitignore | ||
| Caddyfile | ||
| docker-compose.yml | ||
| LICENSE | ||
| MODELS.md | ||
| README.md | ||
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.jsonsrc/Auth/AuthAPI/appsettings.example.jsonsrc/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.json→appsettings.Development.json→ user secrets → environment variables. Environment variables always win, so any value set inlaunchSettings.jsonwill override user secrets. Secret values (ApiKey, cert paths, relay paths) are intentionally absent fromlaunchSettings.jsonto 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>