-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathquickstart.html
More file actions
455 lines (434 loc) · 23.9 KB
/
quickstart.html
File metadata and controls
455 lines (434 loc) · 23.9 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
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Flagent Quick Start Guide - Get started in 5 minutes">
<title data-i18n="quickstart.title">Flagent Quick Start Guide</title>
<link rel="stylesheet" href="styles.css">
<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=Inter:wght@300;400;500;600;700;800&display=swap" rel="stylesheet">
</head>
<body>
<!-- Navigation -->
<nav class="navbar">
<div class="container">
<div class="nav-content">
<div class="logo">
<a href="gh_pages/index.html" style="text-decoration: none;"><span class="logo-text">Flagent</span></a>
</div>
<div class="nav-links">
<a href="gh_pages/index.html" data-i18n="nav.home">Home</a>
<a href="quickstart.html" data-i18n="nav.quickstart">Quick Start</a>
<a href="sdk.html" data-i18n="nav.sdk">SDKs</a>
<a href="api-docs.html" data-i18n="nav.api">API</a>
<a href="docs.html" data-i18n="nav.docs">Docs</a>
<a href="blog/index.html">Blog</a>
<div class="lang-switcher">
<button class="lang-btn active" data-lang="en">EN</button>
<button class="lang-btn" data-lang="ru">RU</button>
</div>
<a href="https://github.com/MaxLuxs/Flagent" class="nav-github" target="_blank" rel="noopener">
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor">
<path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/>
</svg>
GitHub
</a>
</div>
</div>
</div>
</nav>
<!-- Header -->
<section class="page-header">
<div class="container">
<h1 class="page-title" data-i18n="quickstart.header.title">Quick Start Guide</h1>
<p class="page-subtitle" data-i18n="quickstart.header.subtitle">
Get Flagent running in 5 minutes and start using feature flags in your app
</p>
</div>
</section>
<!-- Option 1: Docker -->
<section class="content-section">
<div class="container">
<div class="quickstart-option">
<div class="option-header">
<span class="option-number">1</span>
<h2 data-i18n="docker.title">Option 1: Docker (Recommended)</h2>
</div>
<p class="option-description" data-i18n="docker.desc">
Самый быстрый способ запустить Flagent - использовать Docker образ.
Не требует установки зависимостей или настройки базы данных.
</p>
<div class="step">
<h3 data-i18n="docker.step1.title">Step 1: Pull Docker Image</h3>
<div class="code-block">
<pre><code>docker pull ghcr.io/maxluxs/flagent</code></pre>
<button class="copy-btn" onclick="copyCode(this)">Copy</button>
</div>
</div>
<div class="step">
<h3 data-i18n="docker.step2.title">Step 2: Run Container</h3>
<p data-i18n="docker.step2.desc">
Образ по умолчанию использует SQLite (файл в контейнере). Для входа в UI нужны admin-учётные данные и JWT secret. Минимальный запуск:
</p>
<div class="code-block">
<pre><code>docker run -d -p 18000:18000 \
-e FLAGENT_ADMIN_EMAIL=admin@local \
-e FLAGENT_ADMIN_PASSWORD=admin \
-e FLAGENT_JWT_AUTH_SECRET=change-me-min-32-chars-for-dev-only \
-v flagent-data:/data \
ghcr.io/maxluxs/flagent</code></pre>
<button class="copy-btn" onclick="copyCode(this)">Copy</button>
</div>
<p class="step-note" data-i18n="docker.step2.note">
<code>-v flagent-data:/data</code> — данные SQLite сохраняются между перезапусками. Без тома данные теряются при остановке контейнера.
</p>
</div>
<div class="step">
<h3 data-i18n="docker.step3.title">Step 3: Open Flagent UI</h3>
<p data-i18n="docker.step3.desc">
Откройте браузер и перейдите на:
</p>
<div class="code-block">
<pre><code>http://localhost:18000</code></pre>
<button class="copy-btn" onclick="copyCode(this)">Copy</button>
</div>
</div>
<div class="step">
<h3 data-i18n="docker.step4.title">Step 4: Default Credentials</h3>
<p data-i18n="docker.step4.desc">
Если аутентификация включена, используйте:
</p>
<div class="credentials-box">
<div class="credential-item">
<strong data-i18n="docker.step4.username">Email:</strong>
<code>admin@local</code>
</div>
<div class="credential-item">
<strong data-i18n="docker.step4.password">Password:</strong>
<code>admin</code>
</div>
</div>
</div>
<div class="step">
<h3 data-i18n="docker.step5.title">Step 5: Verify Installation</h3>
<p data-i18n="docker.step5.desc">
Проверьте, что сервер работает:
</p>
<div class="code-block">
<pre><code>curl http://localhost:18000/api/v1/health</code></pre>
<button class="copy-btn" onclick="copyCode(this)">Copy</button>
</div>
<p class="step-note" data-i18n="docker.step5.note">
Должен вернуться JSON с информацией о состоянии сервера.
</p>
</div>
</div>
</div>
</section>
<!-- Option 2: Docker Compose -->
<section class="content-section bg-alt">
<div class="container">
<div class="quickstart-option">
<div class="option-header">
<span class="option-number">2</span>
<h2 data-i18n="compose.title">Option 2: Docker Compose</h2>
</div>
<p class="option-description" data-i18n="compose.desc">
Для полной настройки с PostgreSQL используйте Docker Compose.
Это обеспечивает персистентность данных и готовность к production.
</p>
<div class="step">
<h3 data-i18n="compose.step1.title">Step 1: Clone Repository</h3>
<div class="code-block">
<pre><code>git clone https://github.com/MaxLuxs/Flagent.git
cd Flagent</code></pre>
<button class="copy-btn" onclick="copyCode(this)">Copy</button>
</div>
</div>
<div class="step">
<h3 data-i18n="compose.step2.title">Step 2: Start Services</h3>
<div class="code-block">
<pre><code>docker compose up -d</code></pre>
<button class="copy-btn" onclick="copyCode(this)">Copy</button>
</div>
<p class="step-note" data-i18n="compose.step2.note">
Это запустит Flagent и PostgreSQL в отдельных контейнерах.
</p>
</div>
<div class="step">
<h3 data-i18n="compose.step3.title">Step 3: Access Services</h3>
<div class="access-links">
<div class="access-item">
<strong data-i18n="compose.step3.ui">Flagent UI:</strong>
<a href="http://localhost:18000" target="_blank" rel="noopener">http://localhost:18000</a>
</div>
<div class="access-item">
<strong data-i18n="compose.step3.api">API:</strong>
<a href="http://localhost:18000/api/v1" target="_blank" rel="noopener">http://localhost:18000/api/v1</a>
</div>
<div class="access-item">
<strong data-i18n="compose.step3.swagger">Swagger UI:</strong>
<a href="http://localhost:18000/docs" target="_blank" rel="noopener">http://localhost:18000/docs</a>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Option 3: From Source -->
<section class="content-section">
<div class="container">
<div class="quickstart-option">
<div class="option-header">
<span class="option-number">3</span>
<h2 data-i18n="source.title">Option 3: From Source</h2>
</div>
<p class="option-description" data-i18n="source.desc">
Соберите и запустите Flagent из исходного кода для разработки и кастомизации.
</p>
<div class="step">
<h3 data-i18n="source.step1.title">Step 1: Prerequisites</h3>
<div class="requirements-list">
<div class="requirement-item">
<strong>JDK 21+</strong>
<span data-i18n="source.step1.jdk">Для компиляции и запуска Kotlin кода</span>
</div>
<div class="requirement-item">
<strong>Gradle 9.0</strong>
<span data-i18n="source.step1.gradle">Система сборки проекта</span>
</div>
<div class="requirement-item">
<strong>Database</strong>
<span data-i18n="source.step1.db">PostgreSQL, MySQL или SQLite</span>
</div>
</div>
</div>
<div class="step">
<h3 data-i18n="source.step2.title">Step 2: Clone Repository</h3>
<div class="code-block">
<pre><code>git clone https://github.com/MaxLuxs/Flagent.git
cd Flagent</code></pre>
<button class="copy-btn" onclick="copyCode(this)">Copy</button>
</div>
</div>
<div class="step">
<h3 data-i18n="source.step3.title">Step 3: Build Project</h3>
<div class="code-block">
<pre><code>./gradlew build</code></pre>
<button class="copy-btn" onclick="copyCode(this)">Copy</button>
</div>
<p class="step-note" data-i18n="source.step3.note">
Это соберет все модули и запустит тесты.
</p>
</div>
<div class="step">
<h3 data-i18n="source.step4.title">Step 4: Configure Environment</h3>
<p data-i18n="source.step4.desc">
Обязательно задайте базу данных и учётные данные админа (без них вход в UI даст «Admin credentials not configured»):
</p>
<div class="config-options">
<div class="config-option">
<h4 data-i18n="source.step4.sqlite">SQLite (для теста)</h4>
<div class="code-block">
<pre><code>export FLAGENT_DB_DBDRIVER=sqlite3
export FLAGENT_DB_DBCONNECTIONSTR=flagent.sqlite
export FLAGENT_ADMIN_EMAIL=admin@local
export FLAGENT_ADMIN_PASSWORD=admin
export FLAGENT_JWT_AUTH_SECRET=dev-secret-min-32-characters-long
export PORT=18000</code></pre>
<button class="copy-btn" onclick="copyCode(this)">Copy</button>
</div>
</div>
<div class="config-option">
<h4 data-i18n="source.step4.postgres">PostgreSQL</h4>
<div class="code-block">
<pre><code>export FLAGENT_DB_DBDRIVER=postgres
export FLAGENT_DB_DBCONNECTIONSTR=jdbc:postgresql://localhost:5432/flagent?user=postgres&password=postgres
export FLAGENT_ADMIN_EMAIL=admin@local
export FLAGENT_ADMIN_PASSWORD=admin
export FLAGENT_JWT_AUTH_SECRET=dev-secret-min-32-characters-long
export PORT=18000</code></pre>
<button class="copy-btn" onclick="copyCode(this)">Copy</button>
</div>
</div>
<div class="config-option">
<h4 data-i18n="source.step4.mysql">MySQL</h4>
<div class="code-block">
<pre><code>export FLAGENT_DB_DBDRIVER=mysql
export FLAGENT_DB_DBCONNECTIONSTR=jdbc:mysql://localhost:3306/flagent?user=root&password=root
export FLAGENT_ADMIN_EMAIL=admin@local
export FLAGENT_ADMIN_PASSWORD=admin
export FLAGENT_JWT_AUTH_SECRET=dev-secret-min-32-characters-long
export PORT=18000</code></pre>
<button class="copy-btn" onclick="copyCode(this)">Copy</button>
</div>
</div>
</div>
<p class="step-note">Подробнее: <a href="docs.html#/guides/configuration.md">Configuration</a>.</p>
</div>
<div class="step">
<h3 data-i18n="source.step5.title">Step 5: Run Backend</h3>
<div class="code-block">
<pre><code>./gradlew :backend:run</code></pre>
<button class="copy-btn" onclick="copyCode(this)">Copy</button>
</div>
<p class="step-note" data-i18n="source.step5.note">
Сервер запустится на http://localhost:18000
</p>
</div>
</div>
</div>
</section>
<!-- Next Steps -->
<section class="content-section bg-alt">
<div class="container">
<div class="content-box">
<h2 data-i18n="next.title">Next Steps</h2>
<p data-i18n="next.desc">
После успешного запуска Flagent вы можете:
</p>
<div class="next-steps">
<div class="next-step">
<h4>1. <span data-i18n="next.step1">Create Your First Flag</span></h4>
<p data-i18n="next.step1.desc">
Используйте UI или API для создания первого feature flag
</p>
<a href="http://localhost:18000" target="_blank" rel="noopener" class="btn-secondary" data-i18n="next.step1.link">
Open UI
</a>
</div>
<div class="next-step">
<h4>2. <span data-i18n="next.step2">Try Evaluation API</span></h4>
<p data-i18n="next.step2.desc">
Протестируйте evaluation API через curl или Swagger UI
</p>
<div class="code-block">
<pre><code>curl --request POST \
--url http://localhost:18000/api/v1/evaluation \
--header 'content-type: application/json' \
--data '{
"entityID": "user-123",
"entityType": "user",
"entityContext": {
"state": "NY",
"tier": "premium"
},
"flagID": 1,
"enableDebug": true
}'</code></pre>
<button class="copy-btn" onclick="copyCode(this)">Copy</button>
</div>
</div>
<div class="next-step">
<h4>3. <span data-i18n="next.step3">Connect SDK</span></h4>
<p data-i18n="next.step3.desc">
Интегрируйте Flagent SDK в ваше приложение
</p>
<a href="sdk.html" class="btn-secondary" data-i18n="next.step3.link">
View SDKs
</a>
</div>
<div class="next-step">
<h4>4. <span data-i18n="next.step4">Explore Documentation</span></h4>
<p data-i18n="next.step4.desc">
Изучите полную документацию для продвинутых возможностей
</p>
<a href="docs.html" class="btn-secondary" data-i18n="next.step4.link">
View Docs
</a>
</div>
</div>
</div>
</div>
</section>
<!-- Troubleshooting -->
<section class="content-section">
<div class="container">
<div class="content-box">
<h2 data-i18n="troubleshooting.title">Troubleshooting</h2>
<div class="troubleshooting-list">
<div class="trouble-item">
<h4 data-i18n="troubleshooting.port.title">Port Already in Use</h4>
<p data-i18n="troubleshooting.port.desc">
Если порт 18000 уже занят, измените его через переменную окружения:
</p>
<div class="code-block">
<pre><code>export PORT=18001
docker run -it -p 18001:18001 -e PORT=18001 ghcr.io/maxluxs/flagent</code></pre>
<button class="copy-btn" onclick="copyCode(this)">Copy</button>
</div>
</div>
<div class="trouble-item">
<h4 data-i18n="troubleshooting.db.title">Database Connection Issues</h4>
<p data-i18n="troubleshooting.db.desc">
Убедитесь, что строка подключения к БД правильная и база данных доступна.
Проверьте логи контейнера для деталей.
</p>
</div>
<div class="trouble-item">
<h4 data-i18n="troubleshooting.auth.title">Authentication Issues</h4>
<p data-i18n="troubleshooting.auth.desc">
Если включена аутентификация, используйте правильные credentials.
По умолчанию: admin@local / admin. Проверьте настройки через переменные окружения.
</p>
</div>
</div>
<p style="margin-top: 1rem;">
<a href="https://github.com/MaxLuxs/Flagent/blob/main/docs/guides/getting-started.md#troubleshooting-first-run" target="_blank" rel="noopener">Full troubleshooting guide (First Run)</a>
</p>
</div>
</div>
</section>
<!-- Footer -->
<footer class="footer">
<div class="container">
<div class="footer-content">
<div class="footer-section">
<h4 class="footer-title">Flagent</h4>
<p class="footer-description" data-i18n="footer.description">
Open source feature flagging, A/B testing, and dynamic configuration microservice в Kotlin/Ktor.
</p>
</div>
<div class="footer-section">
<h4 class="footer-title" data-i18n="footer.product">Продукт</h4>
<ul class="footer-links">
<li><a href="docs.html" data-i18n="footer.docs">Документация</a></li>
<li><a href="gh_pages/index.html" data-i18n="footer.home">Главная</a></li>
<li><a href="quickstart.html" data-i18n="footer.quickstart">Quick Start</a></li>
<li><a href="sdk.html" data-i18n="footer.sdk">SDKs</a></li>
<li><a href="docs.html#/guides/deployment.md" data-i18n="footer.deployment">Развертывание</a></li>
</ul>
</div>
<div class="footer-section">
<h4 class="footer-title" data-i18n="footer.resources">Ресурсы</h4>
<ul class="footer-links">
<li><a href="https://github.com/MaxLuxs/Flagent" target="_blank" rel="noopener">GitHub</a></li>
<li><a href="https://github.com/MaxLuxs/Flagent/issues" target="_blank" rel="noopener" data-i18n="footer.issues">Issues</a></li>
<li><a href="api/openapi.yaml" data-i18n="footer.openapi">OpenAPI Spec</a></li>
<li><a href="api-docs.html" data-i18n="footer.swagger">API Reference (Swagger)</a></li>
</ul>
</div>
</div>
<div class="footer-bottom">
<p>© 2026 Flagent. <span data-i18n="footer.license">Open source под Apache 2.0</span></p>
</div>
</div>
</footer>
<script src="script.js"></script>
<script>
// Copy code functionality
function copyCode(btn) {
const codeBlock = btn.previousElementSibling;
const code = codeBlock.textContent;
navigator.clipboard.writeText(code).then(() => {
btn.textContent = 'Copied!';
setTimeout(() => {
btn.textContent = 'Copy';
}, 2000);
});
}
</script>
</body>
</html>