-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbackend.config.json
More file actions
102 lines (102 loc) · 2.54 KB
/
Copy pathbackend.config.json
File metadata and controls
102 lines (102 loc) · 2.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
{
"$schema": "./backend.config.schema.json",
"app": {
"name": "backend-template",
"cors": {
"origins": [
"http://localhost:8080",
"your-domain.com"
],
"methods": ["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"]
}
},
"features": {
"auth": { "enabled": true },
"apiKeys": { "enabled": true },
"rateLimit": { "enabled": true },
"system": { "enabled": true },
"webhooks": { "enabled": true },
"billing": { "enabled": true },
"jobs": { "enabled": true },
"cron": { "enabled": true },
"observability": { "enabled": true },
"metering": { "enabled": true },
"notifications": { "enabled": true }
},
"billing": {
"successUrl": "http://localhost:8080/billing/success?session_id={CHECKOUT_SESSION_ID}",
"cancelUrl": "http://localhost:8080/billing/cancel",
"portalReturnUrl": "http://localhost:8080/settings/billing",
"metering": {
"batchSize": 100,
"maxAttempts": 8
}
},
"webhooks": {
"processing": {
"batchSize": 50,
"maxAttempts": 8
}
},
"jobs": {
"schedules": [
{
"name": "hourly-health",
"job": "system.healthSnapshot",
"enabled": true
},
{
"name": "process-webhooks",
"job": "webhooks.processPending",
"enabled": true
},
{
"name": "flush-usage",
"job": "billing.flushUsage",
"enabled": false
}
]
},
"accessControl": {
"rules": [
{ "path": "/api/cron", "endpoint": "*", "scopesAny": ["admin"] },
{ "path": "/api/webhook-events", "endpoint": "*", "scopesAny": ["admin"] },
{ "path": "/api/metrics", "endpoint": "*", "scopesAny": ["admin"] },
{ "path": "/api/notifications", "endpoint": "*", "scopesAny": ["admin"] },
{ "path": "/api/metering", "endpoint": "list", "scopesAny": ["admin"] }
]
},
"observability": {
"logRequests": true,
"logErrors": true,
"otel": {
"enabled": false,
"otlpTracesEndpoint": "http://localhost:4318/v1/traces"
}
},
"errorReporting": {
"provider": "none",
"timeoutMs": 1500,
"sampleRate": 1,
"includeAuthContext": false
},
"providers": {
"auth": "supabase-jwt",
"database": "supabase-postgrest",
"cache": "upstash-redis",
"email": "resend",
"payments": "stripe"
},
"environments": {
"development": {
"app": {
"baseUrl": "http://localhost:7272"
}
},
"production": {
"app": {
"baseUrl": "https://your-api-domain.com"
}
}
}
}