A SaaS backend starter with user management, billing, and project management. Demonstrates event-driven provisioning, plan-based limits, and database-per-service architecture.
Explore and test endpoints in the Local Dashboard when running locally. When deployed to Encore Cloud, use the Service Catalog to call endpoints and view traces to see how requests flow between services.
No secrets or manual configuration needed. The Postgres databases are provisioned automatically when you run encore run. Each service gets its own database.
When a user is created, the billing service automatically provisions a free subscription via Pub/Sub. The project service enforces plan-based limits (free: 3, pro: 25, enterprise: unlimited).
Billing and project endpoints require authentication. This example includes a placeholder auth handler that reads the user ID from the ?auth_user= query parameter. In a real app, you would replace this with a proper auth implementation (e.g. JWT validation, session cookies, or an auth provider like Clerk or Auth0).
user.create
Create a new user. Triggers automatic free plan provisioning.
curl -X POST https://api.innovwayz.io/users \
-H "Content-Type: application/json" \
-d '{"email": "alice@example.com", "name": "Alice"}'
user.get
Get a user by ID.
curl https://api.innovwayz.io/users/<user_id>
user.list
List all users.
curl https://api.innovwayz.io/users
billing.get
Get billing info for the authenticated user. Auto-created after user signup.
curl "https://api.innovwayz.io/billing?auth_user=<user_id>"
billing.upgrade
Upgrade the authenticated user's plan. Options: free, pro, enterprise.
curl -X POST "https://api.innovwayz.io/billing/upgrade?auth_user=<user_id>" \
-H "Content-Type: application/json" \
-d '{"plan": "pro"}'
project.create
Create a project. Enforces plan-based limits (free: 3, pro: 25, enterprise: unlimited). Requires authentication.
curl -X POST "https://api.innovwayz.io/projects?auth_user=<user_id>" \
-H "Content-Type: application/json" \
-d '{"name": "My Project", "description": "A great project"}'
project.get
Get a project by ID.
curl https://api.innovwayz.io/projects/<project_id>
project.list
List projects. Optionally filter by owner.
curl https://api.innovwayz.io/projects
curl "https://api.innovwayz.io/projects?owner_id=<user_id>"