-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwrangler.toml
More file actions
176 lines (146 loc) · 4.1 KB
/
wrangler.toml
File metadata and controls
176 lines (146 loc) · 4.1 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
# 🚀 Cloudflare Wrangler Configuration for Solo-Spark
# Deploy to brainsait.io with full Cloudflare ecosystem
name = "solo-spark"
main = "src/index.ts"
compatibility_date = "2024-08-01"
# Custom domain configuration
routes = [
{ pattern = "brainsait.io/*", custom_domain = true },
{ pattern = "www.brainsait.io/*", custom_domain = true },
{ pattern = "api.brainsait.io/*", custom_domain = true }
]
# Environment configuration
[env.staging]
name = "solo-spark-staging"
routes = [
{ pattern = "staging.brainsait.io/*", custom_domain = true }
]
[env.production]
name = "solo-spark-production"
routes = [
{ pattern = "brainsait.io/*", custom_domain = true },
{ pattern = "www.brainsait.io/*", custom_domain = true }
]
# ===== KV NAMESPACES =====
# User data, sessions, and cache storage
[[kv_namespaces]]
binding = "USER_DATA"
id = "your_user_data_kv_namespace_id"
preview_id = "your_user_data_kv_preview_id"
[[kv_namespaces]]
binding = "SESSIONS"
id = "your_sessions_kv_namespace_id"
preview_id = "your_sessions_kv_preview_id"
[[kv_namespaces]]
binding = "CACHE"
id = "your_cache_kv_namespace_id"
preview_id = "your_cache_kv_preview_id"
[[kv_namespaces]]
binding = "ANALYTICS"
id = "your_analytics_kv_namespace_id"
preview_id = "your_analytics_kv_preview_id"
# ===== R2 BUCKETS =====
# File storage for PDFs, prototypes, and user uploads
[[r2_buckets]]
binding = "USER_FILES"
bucket_name = "solo-spark-user-files"
preview_bucket_name = "solo-spark-user-files-preview"
[[r2_buckets]]
binding = "PROTOTYPES"
bucket_name = "solo-spark-prototypes"
preview_bucket_name = "solo-spark-prototypes-preview"
[[r2_buckets]]
binding = "EXPORTS"
bucket_name = "solo-spark-exports"
preview_bucket_name = "solo-spark-exports-preview"
[[r2_buckets]]
binding = "BACKUPS"
bucket_name = "solo-spark-backups"
preview_bucket_name = "solo-spark-backups-preview"
# ===== DURABLE OBJECTS =====
# Real-time collaboration and state management
[[durable_objects.bindings]]
name = "COLLABORATION"
class_name = "CollaborationDurableObject"
script_name = "solo-spark"
[[durable_objects.bindings]]
name = "USER_SESSIONS"
class_name = "UserSessionDurableObject"
script_name = "solo-spark"
# ===== D1 DATABASE =====
# SQL database for structured data
[[d1_databases]]
binding = "DB"
database_name = "solo-spark-db"
database_id = "your_d1_database_id"
# ===== ANALYTICS ENGINE =====
# Custom analytics and metrics
[[analytics_engine_datasets]]
binding = "ANALYTICS_ENGINE"
dataset = "solo_spark_analytics"
# ===== AI BINDINGS =====
# Cloudflare AI for additional AI capabilities
[ai]
binding = "AI"
# ===== QUEUES =====
# Background job processing
[[queues.consumers]]
queue = "ai-processing-queue"
max_batch_size = 10
max_batch_timeout = 30
[[queues.consumers]]
queue = "email-queue"
max_batch_size = 100
max_batch_timeout = 60
[[queues.consumers]]
queue = "analytics-queue"
max_batch_size = 50
max_batch_timeout = 30
# ===== BINDINGS =====
[[queues.producers]]
binding = "AI_QUEUE"
queue = "ai-processing-queue"
[[queues.producers]]
binding = "EMAIL_QUEUE"
queue = "email-queue"
[[queues.producers]]
binding = "ANALYTICS_QUEUE"
queue = "analytics-queue"
# ===== VARIABLES =====
# Environment-specific configuration
[vars]
ENVIRONMENT = "production"
DOMAIN = "brainsait.io"
API_BASE_URL = "https://api.brainsait.io"
CDN_URL = "https://cdn.brainsait.io"
SUPPORT_EMAIL = "support@brainsait.io"
# Feature flags
ENABLE_PAYMENTS = "true"
ENABLE_GITHUB_INTEGRATION = "true"
ENABLE_ARABIC = "true"
ENABLE_ANALYTICS = "true"
ENABLE_AI_ENHANCEMENTS = "true"
# Saudi market configuration
DEFAULT_CURRENCY = "SAR"
DEFAULT_LOCALE = "ar-SA"
PAYMENT_METHODS = "stripe,stc_pay,mada"
# ===== STAGING ENVIRONMENT OVERRIDES =====
[env.staging.vars]
ENVIRONMENT = "staging"
DOMAIN = "staging.brainsait.io"
API_BASE_URL = "https://api-staging.brainsait.io"
ENABLE_ANALYTICS = "false"
# ===== COMPATIBILITY FLAGS =====
compatibility_flags = ["nodejs_compat"]
# ===== BUILD CONFIGURATION =====
[build]
command = "npm run build"
cwd = "."
watch_dir = "src"
# ===== MINIFLARE CONFIGURATION =====
# Local development settings
[miniflare]
kv_persist = true
cache_persist = true
d1_persist = true
r2_persist = true