The LiftLog backend is written in C# on the latest .NET. The backend is responsible for storing and serving user feeds (which are end-to-end encrypted) and serving the AI planner. It requires a PostgreSQL database.
Install the latest .NET SDK for your platform:
macOS:
brew install dotnetWindows: Download and install from dotnet.microsoft.com/download
Linux (Ubuntu/Debian):
wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh
chmod +x ./dotnet-install.sh
./dotnet-install.sh --channel 9.0For other Linux distributions, see the official installation guide.
Optionally, to run a local PostgreSQL instance, use the provided Docker Compose file (requires Docker installed).
Before running the backend, you need to create a configuration file at LiftLog.Api/appsettings.Development.json.
Here is an example configuration that works with the Docker Compose setup:
{
"ConnectionStrings": {
"UserDataContext": "Host=localhost;Port=5400;Database=liftlog;Username=postgres;Password=password",
"RateLimitContext": "Host=localhost;Port=5400;Database=liftlog;Username=postgres;Password=password"
},
"AnthropicApiKey": "sk-test-key",
"WebAuthApiKey": "test-web-auth-key-12345",
// Optional
"RevenueCatApiKey": "test-key",
"RevenueCatProjectId": "test-project",
"RevenueCatProEntitlementId": "pro"
}Note: The RevenueCatApiKey can be omitted if a WebAuthApiKey is provided. It is used only for validating in-app purchases for the AI planner.
Start the PostgreSQL database and run the backend:
cd ./backend/LiftLog.Api
docker compose up -d
dotnet runThe backend should now be running at http://localhost:5264!
When running the app in development mode (as specified in the root README), it will automatically connect to your local backend instance.