Repository navigation
Expand file tree
/
Copy pathdocs.html
More file actions
312 lines (276 loc) · 9.64 KB
/
Copy pathdocs.html
File metadata and controls
312 lines (276 loc) · 9.64 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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
<!DOCTYPE html>
<html lang="en" class="dark">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Documentation — ColtaneDB & Colt Language Manual</title>
<meta name="description" content="Official documentation and language reference for Colt (.colt) and ColtaneDB multi-model execution engine.">
<meta name="theme-color" content="#08090c">
<!-- Favicons -->
<link rel="icon" type="image/x-icon" href="/favicon.ico">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/svg+xml" href="/coltanedb-logo.svg">
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
<link rel="manifest" href="/site.webmanifest">
<!-- Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap" rel="stylesheet">
<style>
:root {
--bg: #08090c;
--surface: #0e1117;
--card-bg: rgba(18, 22, 31, 0.75);
--border: rgba(255, 255, 255, 0.08);
--border-glow: rgba(56, 189, 248, 0.3);
--text: #f1f5f9;
--text-muted: #94a3b8;
--text-dim: #64748b;
--accent: #38bdf8;
--accent-soft: rgba(56, 189, 248, 0.12);
--emerald: #34d399;
--code-bg: #07090e;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
background-color: var(--bg);
color: var(--text);
font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
min-height: 100vh;
display: flex;
flex-direction: column;
background-image:
radial-gradient(circle at 50% 0%, rgba(56, 189, 248, 0.08), transparent 50%),
radial-gradient(circle at 100% 100%, rgba(52, 211, 153, 0.05), transparent 40%);
background-attachment: fixed;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: #7dd3fc; text-decoration: underline; }
/* Top Nav */
.top-nav {
position: sticky;
top: 0;
z-index: 100;
backdrop-filter: blur(16px);
background: rgba(8, 9, 12, 0.85);
border-bottom: 1px solid var(--border);
padding: 0.75rem 1.5rem;
display: flex;
align-items: center;
justify-content: space-between;
}
.brand {
display: flex;
align-items: center;
gap: 0.75rem;
color: var(--text);
text-decoration: none;
}
.brand strong {
font-family: 'Space Grotesk', sans-serif;
font-size: 18px;
font-weight: 700;
}
.btn {
display: inline-flex;
align-items: center;
gap: 0.45rem;
padding: 0.45rem 0.85rem;
border-radius: 8px;
font-size: 13px;
font-weight: 600;
cursor: pointer;
border: 1px solid var(--border);
background: rgba(255, 255, 255, 0.05);
color: var(--text);
text-decoration: none;
}
.btn:hover { background: rgba(255, 255, 255, 0.1); text-decoration: none; }
.btn-primary {
background: linear-gradient(135deg, #0284c7, #0ea5e9);
border-color: #38bdf8;
color: #fff;
}
/* Docs Layout */
.docs-container {
max-width: 1200px;
margin: 0 auto;
width: 100%;
flex: 1;
display: grid;
grid-template-columns: 240px 1fr;
gap: 2rem;
padding: 2.5rem 1.5rem;
}
@media (max-width: 800px) {
.docs-container { grid-template-columns: 1fr; }
.docs-sidebar { display: none; }
}
.docs-sidebar {
position: sticky;
top: 5rem;
height: fit-content;
display: flex;
flex-direction: column;
gap: 0.4rem;
}
.sidebar-link {
padding: 0.45rem 0.75rem;
border-radius: 6px;
font-size: 13.5px;
color: var(--text-muted);
text-decoration: none;
transition: all 0.15s ease;
}
.sidebar-link:hover {
background: rgba(255, 255, 255, 0.04);
color: var(--text);
text-decoration: none;
}
.docs-content {
display: flex;
flex-direction: column;
gap: 2.5rem;
}
.doc-section {
background: var(--card-bg);
border: 1px solid var(--border);
border-radius: 12px;
padding: 2rem;
}
h1 {
font-family: 'Space Grotesk', sans-serif;
font-size: 32px;
margin-bottom: 0.75rem;
}
h2 {
font-family: 'Space Grotesk', sans-serif;
font-size: 22px;
margin-bottom: 1rem;
color: #fff;
}
p {
color: var(--text-muted);
font-size: 14.5px;
line-height: 1.7;
margin-bottom: 1rem;
}
pre {
background: var(--code-bg);
border: 1px solid var(--border);
border-radius: 8px;
padding: 1rem;
font-family: 'JetBrains Mono', monospace;
font-size: 13px;
color: #93c5fd;
overflow: auto;
margin: 1rem 0;
}
/* Footer */
footer {
border-top: 1px solid var(--border);
padding: 1.5rem;
text-align: center;
font-size: 13px;
color: var(--text-dim);
}
</style>
</head>
<body>
<!-- Top Nav -->
<header class="top-nav">
<a href="/" class="brand" aria-label="ColtaneDB Homepage">
<svg style="width:26px; height:26px;" viewBox="0 0 100 100" fill="none">
<polygon points="50,15 82,33 50,51 18,33" fill="#38bdf8"/>
<polygon points="18,33 50,51 50,85 18,67" fill="#131c2e" stroke="#38bdf8" stroke-width="2"/>
<polygon points="50,51 82,33 82,67 50,85" fill="#0d1420" stroke="#3ecf8e" stroke-width="2"/>
</svg>
<strong>ColtaneDB</strong>
</a>
<div style="display:flex; align-items:center; gap:0.75rem;">
<a href="/app" class="btn btn-primary">⚡ Launch Console</a>
<a href="/login" class="btn">Sign In</a>
</div>
</header>
<!-- Docs Container -->
<div class="docs-container">
<aside class="docs-sidebar">
<div style="font-size:11px; font-weight:700; color:var(--text-dim); text-transform:uppercase; margin-bottom:0.4rem;">Manual</div>
<a href="#overview" class="sidebar-link">1. Language Overview</a>
<a href="#schemas" class="sidebar-link">2. Schema Definition</a>
<a href="#mutations" class="sidebar-link">3. Mutations (PUT / DELETE)</a>
<a href="#queries" class="sidebar-link">4. Querying (FIND)</a>
<a href="#backends" class="sidebar-link">5. Storage Backends</a>
<a href="#python" class="sidebar-link">6. Python SDK</a>
</aside>
<main class="docs-content">
<header>
<span style="font-size:11px; font-weight:700; color:var(--accent); text-transform:uppercase; letter-spacing:0.05em;">Reference Manual</span>
<h1>Colt Language & Architecture Specification</h1>
<p>Colt is a strictly-typed, unified data language for defining, querying, and mutating records across relational, key-value, document, and vector databases under provable multi-tenant isolation.</p>
</header>
<section class="doc-section" id="overview">
<h2>1. Language Overview</h2>
<p>Source files use the <code>.colt</code> extension. Colt expressions are compiled into parameterized Abstract Syntax Trees (ASTs) and optimized execution plans by the Colt compiler.</p>
<pre>
// Declare strict schema and query records
DEFINE COLLECTION users STRICT @backend(neon) {
id: text @key,
email: text @unique,
tier: text @default("free")
}
FIND users SELECT id, email WHERE tier == "pro"
</pre>
</section>
<section class="doc-section" id="schemas">
<h2>2. Schema Definition</h2>
<p>Colt schemas support atomic primitive types: <code>text</code>, <code>int</code>, <code>float</code>, <code>boolean</code>, <code>timestamp</code>, and <code>vector</code>.</p>
<pre>
DEFINE COLLECTION books STRICT @backend(supabase) {
id: text @key,
title: text,
author: text,
rating: float @default(4.0),
embedding: vector(1536)
}
</pre>
</section>
<section class="doc-section" id="mutations">
<h2>3. Mutations (PUT / DELETE)</h2>
<p>Records are inserted or updated using the <code>PUT</code> statement with key targeting:</p>
<pre>
PUT books:item_101 {
title: "Database Internals",
author: "Alex Petrov",
rating: 4.8
}
</pre>
</section>
<section class="doc-section" id="queries">
<h2>4. Querying (FIND)</h2>
<p>Query operations support projections, filters, sorting, and pagination:</p>
<pre>
FIND books SELECT id, title, rating
WHERE rating >= 4.5
ORDER BY rating DESC
LIMIT 20
</pre>
</section>
<section class="doc-section" id="backends">
<h2>5. Storage Backends & Routing</h2>
<p>ColtaneDB directs queries to specialized backing engines according to the <code>@backend(...)</code> directive:</p>
<ul style="margin-left:1.5rem; color:var(--text-muted); font-size:14px; line-height:1.7;">
<li><code>@backend(redis)</code>: Sub-millisecond key-value caching tier on Upstash Redis.</li>
<li><code>@backend(neon)</code> & <code>@backend(supabase)</code>: ACID transactional relational storage.</li>
<li><code>@backend(firestore)</code>: Document collection storage on Google Cloud Firebase.</li>
<li><code>@backend(turso)</code>: Edge-distributed SQLite via libSQL.</li>
</ul>
</section>
</main>
</div>
<!-- Footer -->
<footer>
<div>© 2026 ColtaneDB. Created by <strong>Ayush Bhattacharya</strong>. <a href="/privacy" style="margin-left:0.5rem;">Privacy Policy</a></div>
</footer>
</body>
</html>