WJb Store Examples & Demos
Explore SQL Server, PostgreSQL, MySQL, SQLite, and IndexedDB integrations with persistence and workflow state management examples.
Browser Store Providers
SQL Store Providers
🐘 PostgreSQL
Run WJb on PostgreSQL using the official WJb.PostgreSQL store provider.
PostgreSQL gives you durable, transactional persistence for jobs, workflows, execution history, monitoring data, actions and service configuration — while keeping the exact same programming model as every other WJb store.
The WJb Monitor Demo runs identically on PostgreSQL. Only the store registration changes.
Why PostgreSQL?
- Powerful open-source relational database
- Excellent performance and reliability
- Strong transactional guarantees
- Great tooling and ecosystem
- Perfect for both development and production
- Easy to run locally or in the cloud
What Is Stored?
The WJb.PostgreSQL store persists everything the Monitor needs:
- Jobs and their current state
- Workflow transitions
- Full execution history
- Monitoring and progress data
- Action definitions
- Service configuration
How It Works
1. Create the WJb database schema (one-time):
await WJbPostgreSql.InitDbAsync(connectionString);
2. Register the store:
builder.Services.AddSingleton<IStore>(_ =>
new PgStore(() => new(connectionString)));
3. Use the rest of the application exactly as usual.
The connection string is normally taken from appsettings.json:
{
"ConnectionStrings": {
"PostgreSql": "Host=YOUR_HOST;Port=YOUR_PORT;Database=WJbDemo;Username=YOUR_NAME;Password=YOUR_PASS"
}
}
Monitor Demo
This sample shows the complete WJb Monitor Demo running on PostgreSQL with almost zero changes compared to other providers.
You get the same:
- Background jobs & workflows
- Live monitoring dashboard
- Execution history
- Retry handling
- Action & service discovery