Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/JReyna217/AutoLog/llms.txt

Use this file to discover all available pages before exploring further.

AutoLog uses .NET’s layered configuration system. In development, you store secrets locally with the .NET Secret Manager so they never touch source control. In production, you pass the same values as environment variables using the double-underscore (__) convention, which .NET automatically maps to nested appsettings.json keys — for example, JwtSettings:Secret becomes JwtSettings__Secret. The Angular frontend receives its single runtime value (API_URL) through a shell entrypoint script that rewrites a placeholder inside the compiled JavaScript bundle before Nginx starts.

Environment Variables Reference

AppSettings KeyEnvironment VariableDescriptionRequired
ConnectionStrings:DefaultConnectionConnectionStrings__DefaultConnectionPostgreSQL connection string✅ Yes
JwtSettings:SecretJwtSettings__SecretSigning key for JWTs (minimum 32 characters)✅ Yes
JwtSettings:IssuerJwtSettings__IssuerJWT issuer claim (default: AutoLog.API)No
JwtSettings:AudienceJwtSettings__AudienceJWT audience claim (default: AutoLog.AngularClient)No
JwtSettings:ExpiryMinutesJwtSettings__ExpiryMinutesAccess token lifetime in minutes (default: 15)No
JwtSettings:RefreshExpiryDaysJwtSettings__RefreshExpiryDaysRefresh token lifetime in days (default: 7)No
Cors:AllowedOrigins:0Cors__AllowedOrigins__0Frontend URL allowed by CORS✅ Yes
API_URL (frontend)API_URLBase URL of the backend API consumed by Angular✅ Yes

Local Development Setup

Use the .NET Secret Manager to configure secrets on your development machine. These values are stored outside the project directory and are never committed to Git.
cd backend/src/AutoLog.API

# Initialize the secret store for this project (only needed once)
dotnet user-secrets init

# Set your local PostgreSQL connection string
dotnet user-secrets set "ConnectionStrings:DefaultConnection" \
  "Host=localhost;Port=5432;Database=AutoLogDb;Username=YOUR_USER;Password=YOUR_PASS"

# Set your local JWT signing secret
dotnet user-secrets set "JwtSettings:Secret" "YOUR_LOCAL_VERY_LONG_SECRET_KEY_FOR_DEV"
The JwtSettings:Secret value must be at least 32 characters long. AutoLog uses HMAC-SHA256 to sign tokens, and shorter keys will cause the API to throw an ArgumentOutOfRangeException at startup. Use a randomly generated string of 32 or more characters in both development and production.

appsettings.json

The file below is the committed baseline configuration. All empty or default values are meant to be overridden at runtime — never populate Secret or DefaultConnection directly in this file.
{
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft.AspNetCore": "Warning"
    }
  },
  "AllowedHosts": "*",
  "ConnectionStrings": {
    "DefaultConnection": ""
  },
  "JwtSettings": {
    "Secret": "",
    "Issuer": "AutoLog.API",
    "Audience": "AutoLog.AngularClient",
    "ExpiryMinutes": 15,
    "RefreshExpiryDays": 7
  },
  "Cors": {
    "AllowedOrigins": [ "http://localhost:4200" ]
  }
}
When running containers manually, pass each variable with a -e flag in your docker run command, as shown in the Docker deployment guide. Each flag injects exactly one key-value pair into the container’s environment, keeping secrets out of the image and out of version control.

Build docs developers (and LLMs) love