chore: remove src/pages/docs.astro

swadhinbiswas committed 8 months ago
e66e1a2
1 parent e426a17
commit e66e1a2
1 file changed
+0 -966
Showing 1 changed file+0-964
▼src/pages/docs.astro
+0-964
1
-import BaseLayout from "@/layouts/BaseLayout.astro";
2
-
3
-const sections = [
4
- { id: "installation", label: "Installation" },
5
- { id: "configuration", label: "Configuration" },
6
- { id: "getting-started", label: "Getting Started" },
7
- { id: "repositories", label: "Repositories" },
8
- { id: "pull-requests", label: "Pull Requests" },
9
- { id: "issues", label: "Issues" },
10
- { id: "actions", label: "CI/CD Actions" },
11
- { id: "cli", label: "CLI Tool" },
12
- { id: "api", label: "API Reference" },
13
-];
14
-
15
-<BaseLayout title="Documentation - OpenCodeHub">
16
- <div class="container py-8">
17
- <div class="flex flex-col lg:flex-row gap-8">
18
- <!-- Sidebar Navigation -->
19
- <aside class="lg:w-64 shrink-0">
20
- <div class="sticky top-20">
21
- <div class="relative">
22
- <div
23
- class="absolute -inset-[1px] bg-gradient-to-b from-cyan-500/20 via-transparent to-purple-500/20 rounded-xl opacity-50"
24
- >
25
- </div>
26
- <nav
27
- class="relative rounded-xl border border-white/10 bg-[#0d1117]/80 backdrop-blur-sm p-4 space-y-1"
28
- >
29
- <p
30
- class="text-xs font-semibold text-gray-500 uppercase tracking-wider mb-3"
31
- >
32
- Documentation
33
- </p>
34
- {
35
- sections.map((section) => (
36
- <a
37
- href={`#${section.id}`}
38
- class="block px-3 py-2 text-sm rounded-lg text-gray-400 hover:text-white hover:bg-white/5 transition-colors"
39
- >
40
- {section.label}
41
- </a>
42
- ))
43
- }
44
- </nav>
45
- </div>
46
- </div>
47
- </aside>
48
-
49
- <!-- Main Content -->
50
- <main class="flex-1 min-w-0 space-y-16">
51
- <!-- Header -->
52
- <div>
53
- <h1 class="text-4xl font-bold text-white flex items-center gap-4">
54
- <div
55
- class="p-3 rounded-xl bg-gradient-to-br from-cyan-500/20 to-purple-500/20 border border-cyan-500/30"
56
- >
57
- <svg
58
- class="h-8 w-8 text-cyan-400"
59
- fill="none"
60
- stroke="currentColor"
61
- viewBox="0 0 24 24"
62
- >
63
- <path
64
- stroke-linecap="round"
65
- stroke-linejoin="round"
66
- stroke-width="2"
67
- d="M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253"
68
- ></path>
69
- </svg>
70
- </div>
71
- Documentation
72
- </h1>
73
- <p class="text-gray-400 mt-4 text-lg">
74
- Learn how to install, configure, and use OpenCodeHub.
75
- </p>
76
- </div>
77
-
78
- <!-- Installation -->
79
- <section id="installation" class="scroll-mt-20">
80
- <div class="relative">
81
- <div
82
- class="absolute -inset-[1px] bg-gradient-to-r from-green-500/20 via-transparent to-emerald-500/20 rounded-xl opacity-50"
83
- >
84
- </div>
85
- <div
86
- class="relative rounded-xl border border-white/10 bg-[#0d1117]/80 backdrop-blur-sm p-8"
87
- >
88
- <h2
89
- class="text-2xl font-bold text-white mb-6 flex items-center gap-3"
90
- >
91
- <span class="p-2 rounded-lg bg-green-500/10 text-green-400">
92
- <svg
93
- class="h-5 w-5"
94
- fill="none"
95
- stroke="currentColor"
96
- viewBox="0 0 24 24"
97
- >
98
- <path
99
- stroke-linecap="round"
100
- stroke-linejoin="round"
101
- stroke-width="2"
102
- d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"
103
- ></path>
104
- </svg>
105
- </span>
106
- Installation
107
- </h2>
108
-
109
- <div class="space-y-8 text-gray-300">
110
- <!-- Docker -->
111
- <div>
112
- <h3
113
- class="text-lg font-semibold text-white mb-3 flex items-center gap-2"
114
- >
115
- <span
116
- class="w-6 h-6 rounded-full bg-blue-500 flex items-center justify-center text-xs font-bold"
117
- >1</span
118
- >
119
- Using Docker (Recommended)
120
- </h3>
121
- <pre
122
- class="bg-black/50 rounded-lg p-4 overflow-x-auto text-sm"><code class="text-gray-300"># Clone the repository
123
-git clone https://github.com/swadhinbiswas/OpencodeHub.git
124
-cd opencodehub
125
-
126
-# Copy environment file
127
-cp .env.example .env
128
-
129
-# Start the services
130
-docker-compose up -d</code></pre>
131
- <p class="mt-3 text-sm text-gray-500">
132
- Access at <code
133
- class="px-2 py-0.5 rounded bg-white/10 text-cyan-400"
134
- >http://localhost:4321</code>
135
- </p>
136
- </div>
137
-
138
- <!-- Manual -->
139
- <div>
140
- <h3
141
- class="text-lg font-semibold text-white mb-3 flex items-center gap-2"
142
- >
143
- <span
144
- class="w-6 h-6 rounded-full bg-purple-500 flex items-center justify-center text-xs font-bold"
145
- >2</span
146
- >
147
- Manual Installation
148
- </h3>
149
- <div
150
- class="mb-4 p-4 rounded-lg bg-yellow-500/10 border border-yellow-500/30"
151
- >
152
- <p class="text-yellow-400 text-sm">
153
- <strong>Prerequisites:</strong> Node.js 20+, Git
154
- </p>
155
- </div>
156
- <pre
157
- class="bg-black/50 rounded-lg p-4 overflow-x-auto text-sm"><code class="text-gray-300"># Clone and install
158
-git clone https://github.com/swadhinbiswas/OpencodeHub.git
159
-cd opencodehub
160
-npm install
161
-
162
-# Setup environment
163
-cp .env.example .env
164
-
165
-# Run database migrations
166
-npm run db:migrate
167
-
168
-# Development mode
169
-npm run dev
170
-
171
-# OR Production build
172
-npm run build
173
-npm start</code></pre>
174
- </div>
175
- </div>
176
- </div>
177
- </div>
178
- </section>
179
-
180
- <!-- Configuration -->
181
- <section id="configuration" class="scroll-mt-20">
182
- <div class="relative">
183
- <div
184
- class="absolute -inset-[1px] bg-gradient-to-r from-yellow-500/20 via-transparent to-orange-500/20 rounded-xl opacity-50"
185
- >
186
- </div>
187
- <div
188
- class="relative rounded-xl border border-white/10 bg-[#0d1117]/80 backdrop-blur-sm p-8"
189
- >
190
- <h2
191
- class="text-2xl font-bold text-white mb-6 flex items-center gap-3"
192
- >
193
- <span class="p-2 rounded-lg bg-yellow-500/10 text-yellow-400">
194
- <svg
195
- class="h-5 w-5"
196
- fill="none"
197
- stroke="currentColor"
198
- viewBox="0 0 24 24"
199
- >
200
- <path
201
- stroke-linecap="round"
202
- stroke-linejoin="round"
203
- stroke-width="2"
204
- d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"
205
- ></path>
206
- <path
207
- stroke-linecap="round"
208
- stroke-linejoin="round"
209
- stroke-width="2"
210
- d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"></path>
211
- </svg>
212
- </span>
213
- Configuration
214
- </h2>
215
-
216
- <div class="space-y-6 text-gray-300">
217
- <p>
218
- Edit <code class="px-2 py-0.5 rounded bg-white/10">.env</code> file
219
- to configure your instance:
220
- </p>
221
-
222
- <div class="space-y-4">
223
- <div class="p-4 rounded-lg bg-black/30 border border-white/5">
224
- <h4 class="font-semibold text-white mb-2">Server</h4>
225
- <pre
226
- class="text-xs overflow-x-auto"><code>HOST=0.0.0.0
227
-PORT=3000
228
-SITE_URL=http://localhost:3000
229
-APP_NAME=OpenCodeHub</code></pre>
230
- </div>
231
-
232
- <div class="p-4 rounded-lg bg-black/30 border border-white/5">
233
- <h4 class="font-semibold text-white mb-2">Database</h4>
234
- <pre
235
- class="text-xs overflow-x-auto"><code># SQLite (default, simplest)
236
-DATABASE_DRIVER=sqlite
237
-DATABASE_URL=./data/opencodehub.db
238
-
239
-# PostgreSQL
240
-DATABASE_DRIVER=postgres
241
-DATABASE_URL=postgresql://user:password@localhost:5432/opencodehub
242
-
243
-# MySQL
244
-DATABASE_DRIVER=mysql
245
-DATABASE_URL=mysql://user:password@localhost:3306/opencodehub</code></pre>
246
- </div>
247
-
248
- <div class="p-4 rounded-lg bg-black/30 border border-white/5">
249
- <h4 class="font-semibold text-white mb-2">
250
- Authentication
251
- </h4>
252
- <pre
253
- class="text-xs overflow-x-auto"><code>JWT_SECRET=your-super-secret-key-change-in-production
254
-JWT_EXPIRES_IN=7d
255
-SESSION_SECRET=another-secret-key</code></pre>
256
- </div>
257
-
258
- <div class="p-4 rounded-lg bg-black/30 border border-white/5">
259
- <h4 class="font-semibold text-white mb-2">Git & Storage</h4>
260
- <pre
261
- class="text-xs overflow-x-auto"><code>GIT_REPOS_PATH=./data/repositories
262
-GIT_SSH_PORT=2222
263
-STORAGE_DRIVER=local
264
-STORAGE_PATH=./data/storage</code></pre>
265
- </div>
266
-
267
- <div class="p-4 rounded-lg bg-black/30 border border-white/5">
268
- <h4 class="font-semibold text-white mb-2">CI/CD Runners</h4>
269
- <pre
270
- class="text-xs overflow-x-auto"><code>RUNNER_ENABLED=true
271
-RUNNER_DOCKER_SOCKET=/var/run/docker.sock
272
-RUNNER_CONCURRENT_JOBS=2
273
-RUNNER_TIMEOUT=3600</code></pre>
274
- </div>
275
-
276
- <div class="p-4 rounded-lg bg-black/30 border border-white/5">
277
- <h4 class="font-semibold text-white mb-2">Features</h4>
278
- <pre
279
- class="text-xs overflow-x-auto"><code>ENABLE_REGISTRATION=true
280
-ENABLE_WIKI=true
281
-ENABLE_ISSUES=true
282
-ENABLE_ACTIONS=true</code></pre>
283
- </div>
284
- </div>
285
- </div>
286
- </div>
287
- </div>
288
- </section>
289
-
290
- <!-- Getting Started -->
291
- <section id="getting-started" class="scroll-mt-20">
292
- <div class="relative">
293
- <div
294
- class="absolute -inset-[1px] bg-gradient-to-r from-cyan-500/20 via-transparent to-blue-500/20 rounded-xl opacity-50"
295
- >
296
- </div>
297
- <div
298
- class="relative rounded-xl border border-white/10 bg-[#0d1117]/80 backdrop-blur-sm p-8"
299
- >
300
- <h2
301
- class="text-2xl font-bold text-white mb-6 flex items-center gap-3"
302
- >
303
- <span class="p-2 rounded-lg bg-cyan-500/10 text-cyan-400">
304
- <svg
305
- class="h-5 w-5"
306
- fill="none"
307
- stroke="currentColor"
308
- viewBox="0 0 24 24"
309
- >
310
- <path
311
- stroke-linecap="round"
312
- stroke-linejoin="round"
313
- stroke-width="2"
314
- d="M13 10V3L4 14h7v7l9-11h-7z"></path>
315
- </svg>
316
- </span>
317
- Getting Started
318
- </h2>
319
-
320
- <div class="space-y-6 text-gray-300">
321
- <div>
322
- <h3 class="text-lg font-semibold text-white mb-2">
323
- 1. Create an Account
324
- </h3>
325
- <p>
326
- Go to <code
327
- class="px-2 py-0.5 rounded bg-white/10 text-cyan-400"
328
- >/register</code
329
- > and sign up with email and password.
330
- </p>
331
- </div>
332
-
333
- <div>
334
- <h3 class="text-lg font-semibold text-white mb-2">
335
- 2. Configure Git
336
- </h3>
337
- <pre
338
- class="bg-black/50 rounded-lg p-4 overflow-x-auto text-sm"><code>git config --global user.name "Your Name"
339
-git config --global user.email "[email protected]"</code></pre>
340
- </div>
341
-
342
- <div>
343
- <h3 class="text-lg font-semibold text-white mb-2">
344
- 3. Clone a Repository
345
- </h3>
346
- <pre
347
- class="bg-black/50 rounded-lg p-4 overflow-x-auto text-sm"><code>git clone http://localhost:4321/username/repo.git</code></pre>
348
- </div>
349
-
350
- <div>
351
- <h3 class="text-lg font-semibold text-white mb-2">
352
- 4. Push Your Code
353
- </h3>
354
- <pre
355
- class="bg-black/50 rounded-lg p-4 overflow-x-auto text-sm"><code>git add .
356
-git commit -m "Your commit message"
357
-git push origin main</code></pre>
358
- </div>
359
- </div>
360
- </div>
361
- </div>
362
- </section>
363
-
364
- <!-- Repositories -->
365
- <section id="repositories" class="scroll-mt-20">
366
- <div class="relative">
367
- <div
368
- class="absolute -inset-[1px] bg-gradient-to-r from-purple-500/20 via-transparent to-pink-500/20 rounded-xl opacity-50"
369
- >
370
- </div>
371
- <div
372
- class="relative rounded-xl border border-white/10 bg-[#0d1117]/80 backdrop-blur-sm p-8"
373
- >
374
- <h2
375
- class="text-2xl font-bold text-white mb-6 flex items-center gap-3"
376
- >
377
- <span class="p-2 rounded-lg bg-purple-500/10 text-purple-400">
378
- <svg
379
- class="h-5 w-5"
380
- fill="none"
381
- stroke="currentColor"
382
- viewBox="0 0 24 24"
383
- >
384
- <path
385
- stroke-linecap="round"
386
- stroke-linejoin="round"
387
- stroke-width="2"
388
- d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"
389
- ></path>
390
- </svg>
391
- </span>
392
- Repositories
393
- </h2>
394
-
395
- <div class="grid md:grid-cols-2 gap-4 text-gray-300">
396
- <div class="p-4 rounded-lg bg-black/30 border border-white/5">
397
- <h4 class="font-semibold text-white mb-2">Create</h4>
398
- <p class="text-sm">
399
- Click <strong>+</strong> → New Repository or visit <code
400
- class="text-xs px-1 rounded bg-white/10">/new</code>
401
- </p>
402
- </div>
403
- <div class="p-4 rounded-lg bg-black/30 border border-white/5">
404
- <h4 class="font-semibold text-white mb-2">Fork</h4>
405
- <p class="text-sm">
406
- Click Fork button on any public repository to create your
407
- copy.
408
- </p>
409
- </div>
410
- <div class="p-4 rounded-lg bg-black/30 border border-white/5">
411
- <h4 class="font-semibold text-white mb-2">Star</h4>
412
- <p class="text-sm">
413
- Star repositories to bookmark and show appreciation.
414
- </p>
415
- </div>
416
- <div class="p-4 rounded-lg bg-black/30 border border-white/5">
417
- <h4 class="font-semibold text-white mb-2">Settings</h4>
418
- <p class="text-sm">
419
- Configure collaborators, webhooks, deploy keys at <code
420
- class="text-xs px-1 rounded bg-white/10">/settings</code>
421
- </p>
422
- </div>
423
- </div>
424
- </div>
425
- </div>
426
- </section>
427
-
428
- <!-- Pull Requests -->
429
- <section id="pull-requests" class="scroll-mt-20">
430
- <div class="relative">
431
- <div
432
- class="absolute -inset-[1px] bg-gradient-to-r from-green-500/20 via-transparent to-teal-500/20 rounded-xl opacity-50"
433
- >
434
- </div>
435
- <div
436
- class="relative rounded-xl border border-white/10 bg-[#0d1117]/80 backdrop-blur-sm p-8"
437
- >
438
- <h2
439
- class="text-2xl font-bold text-white mb-6 flex items-center gap-3"
440
- >
441
- <span class="p-2 rounded-lg bg-green-500/10 text-green-400">
442
- <svg
443
- class="h-5 w-5"
444
- fill="none"
445
- stroke="currentColor"
446
- viewBox="0 0 24 24"
447
- >
448
- <path
449
- stroke-linecap="round"
450
- stroke-linejoin="round"
451
- stroke-width="2"
452
- d="M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4"
453
- ></path>
454
- </svg>
455
- </span>
456
- Pull Requests
457
- </h2>
458
-
459
- <div class="space-y-4 text-gray-300">
460
- <ol class="list-decimal list-inside space-y-2">
461
- <li>
462
- Create branch: <code
463
- class="px-2 py-0.5 rounded bg-white/10 text-sm"
464
- >git checkout -b feature-branch</code>
465
- </li>
466
- <li>Make changes and commit</li>
467
- <li>
468
- Push: <code class="px-2 py-0.5 rounded bg-white/10 text-sm"
469
- >git push origin feature-branch</code>
470
- </li>
471
- <li>
472
- Go to <code
473
- class="px-2 py-0.5 rounded bg-white/10 text-cyan-400"
474
- >/owner/repo/pulls/new</code>
475
- </li>
476
- <li>Select branches, add title/description, submit</li>
477
- <li>Review, approve, and merge</li>
478
- </ol>
479
- </div>
480
- </div>
481
- </div>
482
- </section>
483
-
484
- <!-- Issues -->
485
- <section id="issues" class="scroll-mt-20">
486
- <div class="relative">
487
- <div
488
- class="absolute -inset-[1px] bg-gradient-to-r from-red-500/20 via-transparent to-orange-500/20 rounded-xl opacity-50"
489
- >
490
- </div>
491
- <div
492
- class="relative rounded-xl border border-white/10 bg-[#0d1117]/80 backdrop-blur-sm p-8"
493
- >
494
- <h2
495
- class="text-2xl font-bold text-white mb-6 flex items-center gap-3"
496
- >
497
- <span class="p-2 rounded-lg bg-red-500/10 text-red-400">
498
- <svg
499
- class="h-5 w-5"
500
- fill="none"
501
- stroke="currentColor"
502
- viewBox="0 0 24 24"
503
- >
504
- <path
505
- stroke-linecap="round"
506
- stroke-linejoin="round"
507
- stroke-width="2"
508
- d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
509
- ></path>
510
- </svg>
511
- </span>
512
- Issues
513
- </h2>
514
-
515
- <div class="space-y-4 text-gray-300">
516
- <p>
517
- Track bugs and feature requests at <code
518
- class="px-2 py-0.5 rounded bg-white/10 text-cyan-400"
519
- >/owner/repo/issues</code>
520
- </p>
521
- <ul class="list-disc list-inside space-y-1">
522
- <li>Create issues with markdown description</li>
523
- <li>Assign labels (bug, enhancement, help wanted)</li>
524
- <li>Set milestones for releases</li>
525
- <li>Assign to team members</li>
526
- <li>Link to pull requests</li>
527
- </ul>
528
- </div>
529
- </div>
530
- </div>
531
- </section>
532
-
533
- <!-- Actions -->
534
- <section id="actions" class="scroll-mt-20">
535
- <div class="relative">
536
- <div
537
- class="absolute -inset-[1px] bg-gradient-to-r from-orange-500/20 via-transparent to-amber-500/20 rounded-xl opacity-50"
538
- >
539
- </div>
540
- <div
541
- class="relative rounded-xl border border-white/10 bg-[#0d1117]/80 backdrop-blur-sm p-8"
542
- >
543
- <h2
544
- class="text-2xl font-bold text-white mb-6 flex items-center gap-3"
545
- >
546
- <span class="p-2 rounded-lg bg-orange-500/10 text-orange-400">
547
- <svg
548
- class="h-5 w-5"
549
- fill="none"
550
- stroke="currentColor"
551
- viewBox="0 0 24 24"
552
- >
553
- <path
554
- stroke-linecap="round"
555
- stroke-linejoin="round"
556
- stroke-width="2"
557
- d="M13 10V3L4 14h7v7l9-11h-7z"></path>
558
- </svg>
559
- </span>
560
- CI/CD Actions
561
- </h2>
562
-
563
- <div class="space-y-6 text-gray-300">
564
- <p>
565
- GitHub Actions compatible CI/CD. Create <code
566
- class="px-2 py-0.5 rounded bg-white/10"
567
- >.github/workflows/ci.yml</code
568
- >:
569
- </p>
570
- <pre
571
- class="bg-black/50 rounded-lg p-4 overflow-x-auto text-sm"><code>name: CI
572
-on: [push, pull_request]
573
-jobs:
574
- build:
575
- runs-on: ubuntu-latest
576
- steps:
577
- - uses: actions/checkout@v4
578
- - run: npm install
579
- - run: npm test</code></pre>
580
- <p class="text-sm">
581
- View runs at <code
582
- class="px-2 py-0.5 rounded bg-white/10 text-cyan-400"
583
- >/actions</code
584
- > or <code
585
- class="px-2 py-0.5 rounded bg-white/10 text-cyan-400"
586
- >/owner/repo/actions</code>
587
- </p>
588
- </div>
589
- </div>
590
- </div>
591
- </section>
592
-
593
- <!-- CLI Tool -->
594
- <section id="cli" class="scroll-mt-20">
595
- <div class="relative">
596
- <div
597
- class="absolute -inset-[1px] bg-gradient-to-r from-pink-500/20 via-transparent to-purple-500/20 rounded-xl opacity-50"
598
- >
599
- </div>
600
- <div
601
- class="relative rounded-xl border border-white/10 bg-[#0d1117]/80 backdrop-blur-sm p-8"
602
- >
603
- <h2
604
- class="text-2xl font-bold text-white mb-6 flex items-center gap-3"
605
- >
606
- <span class="p-2 rounded-lg bg-pink-500/10 text-pink-400">
607
- <svg
608
- class="h-5 w-5"
609
- fill="none"
610
- stroke="currentColor"
611
- viewBox="0 0 24 24"
612
- >
613
- <path
614
- stroke-linecap="round"
615
- stroke-linejoin="round"
616
- stroke-width="2"
617
- d="M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"
618
- ></path>
619
- </svg>
620
- </span>
621
- och CLI Tool
622
- </h2>
623
-
624
- <div class="space-y-6 text-gray-300">
625
- <div>
626
- <h3 class="text-lg font-semibold text-white mb-3">
627
- Installation
628
- </h3>
629
- <pre
630
- class="bg-black/50 rounded-lg p-4 overflow-x-auto text-sm"><code># From the project folder
631
-cd cli
632
-npm install
633
-npm link</code></pre>
634
- </div>
635
-
636
- <div>
637
- <h3 class="text-lg font-semibold text-white mb-3">
638
- Commands
639
- </h3>
640
- <div class="space-y-3">
641
- <div
642
- class="p-3 rounded-lg bg-black/30 border border-white/5"
643
- >
644
- <code class="text-cyan-400">och auth login</code>
645
- <p class="text-sm mt-1">Login to OpenCodeHub server</p>
646
- </div>
647
- <div
648
- class="p-3 rounded-lg bg-black/30 border border-white/5"
649
- >
650
- <code class="text-cyan-400">och auth logout</code>
651
- <p class="text-sm mt-1">Logout from current session</p>
652
- </div>
653
- <div
654
- class="p-3 rounded-lg bg-black/30 border border-white/5"
655
- >
656
- <code class="text-cyan-400">och auth status</code>
657
- <p class="text-sm mt-1">Check authentication status</p>
658
- </div>
659
- <div
660
- class="p-3 rounded-lg bg-black/30 border border-white/5"
661
- >
662
- <code class="text-cyan-400"
663
- >och init --url &lt;server-url&gt;</code
664
- >
665
- <p class="text-sm mt-1">
666
- Initialize repository for OpenCodeHub
667
- </p>
668
- </div>
669
- <div
670
- class="p-3 rounded-lg bg-black/30 border border-white/5"
671
- >
672
- <code class="text-cyan-400">och sync</code>
673
- <p class="text-sm mt-1">Sync with remote server</p>
674
- </div>
675
- <div
676
- class="p-3 rounded-lg bg-black/30 border border-white/5"
677
- >
678
- <code class="text-cyan-400">och status</code>
679
- <p class="text-sm mt-1">Show current stack status</p>
680
- </div>
681
- <div
682
- class="p-3 rounded-lg bg-black/30 border border-white/5"
683
- >
684
- <code class="text-cyan-400">och stack</code>
685
- <p class="text-sm mt-1">Manage stacked pull requests</p>
686
- </div>
687
- </div>
688
- </div>
689
-
690
- <div>
691
- <h3 class="text-lg font-semibold text-white mb-3">
692
- Example Workflow
693
- </h3>
694
- <pre
695
- class="bg-black/50 rounded-lg p-4 overflow-x-auto text-sm"><code># Login to your server
696
-och auth login --url http://localhost:4321
697
-
698
-# Initialize a repo
699
-cd your-project
700
-och init
701
-
702
-# Check status
703
-och status
704
-
705
-# Work with stacked PRs
706
-och stack create feature-1
707
-och stack submit</code></pre>
708
- </div>
709
- </div>
710
- </div>
711
- </div>
712
- </section>
713
-
714
- <!-- API Reference -->
715
- <section id="api" class="scroll-mt-20">
716
- <div class="relative">
717
- <div
718
- class="absolute -inset-[1px] bg-gradient-to-r from-blue-500/20 via-transparent to-indigo-500/20 rounded-xl opacity-50"
719
- >
720
- </div>
721
- <div
722
- class="relative rounded-xl border border-white/10 bg-[#0d1117]/80 backdrop-blur-sm p-8"
723
- >
724
- <h2
725
- class="text-2xl font-bold text-white mb-6 flex items-center gap-3"
726
- >
727
- <span class="p-2 rounded-lg bg-blue-500/10 text-blue-400">
728
- <svg
729
- class="h-5 w-5"
730
- fill="none"
731
- stroke="currentColor"
732
- viewBox="0 0 24 24"
733
- >
734
- <path
735
- stroke-linecap="round"
736
- stroke-linejoin="round"
737
- stroke-width="2"
738
- d="M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4"></path>
739
- </svg>
740
- </span>
741
- API Reference
742
- </h2>
743
-
744
- <p class="text-gray-400 mb-6">
745
- All endpoints return JSON. Use <code
746
- class="px-2 py-0.5 rounded bg-white/10"
747
- >Content-Type: application/json</code
748
- >.
749
- </p>
750
-
751
- <div class="space-y-6">
752
- <!-- Auth APIs -->
753
- <div>
754
- <h3 class="text-lg font-semibold text-white mb-3">
755
- Authentication
756
- </h3>
757
- <div class="space-y-2">
758
- <div
759
- class="flex items-center gap-2 p-2 rounded bg-black/30"
760
- >
761
- <span
762
- class="px-2 py-0.5 rounded text-xs font-bold bg-green-500/20 text-green-400"
763
- >POST</span
764
- >
765
- <code class="text-white text-sm">/api/auth/login</code>
766
- <span class="text-gray-500 text-sm ml-auto"
767
- >Login with email/password</span
768
- >
769
- </div>
770
- <div
771
- class="flex items-center gap-2 p-2 rounded bg-black/30"
772
- >
773
- <span
774
- class="px-2 py-0.5 rounded text-xs font-bold bg-green-500/20 text-green-400"
775
- >POST</span
776
- >
777
- <code class="text-white text-sm">/api/auth/register</code>
778
- <span class="text-gray-500 text-sm ml-auto"
779
- >Create new account</span
780
- >
781
- </div>
782
- <div
783
- class="flex items-center gap-2 p-2 rounded bg-black/30"
784
- >
785
- <span
786
- class="px-2 py-0.5 rounded text-xs font-bold bg-blue-500/20 text-blue-400"
787
- >GET</span
788
- >
789
- <code class="text-white text-sm">/api/auth/me</code>
790
- <span class="text-gray-500 text-sm ml-auto"
791
- >Get current user</span
792
- >
793
- </div>
794
- <div
795
- class="flex items-center gap-2 p-2 rounded bg-black/30"
796
- >
797
- <span
798
- class="px-2 py-0.5 rounded text-xs font-bold bg-yellow-500/20 text-yellow-400"
799
- >PATCH</span
800
- >
801
- <code class="text-white text-sm">/api/auth/me</code>
802
- <span class="text-gray-500 text-sm ml-auto"
803
- >Update profile</span
804
- >
805
- </div>
806
- </div>
807
- </div>
808
-
809
- <!-- Repo APIs -->
810
- <div>
811
- <h3 class="text-lg font-semibold text-white mb-3">
812
- Repositories
813
- </h3>
814
- <div class="space-y-2">
815
- <div
816
- class="flex items-center gap-2 p-2 rounded bg-black/30"
817
- >
818
- <span
819
- class="px-2 py-0.5 rounded text-xs font-bold bg-blue-500/20 text-blue-400"
820
- >GET</span
821
- >
822
- <code class="text-white text-sm"
823
- >/api/repos/:owner/:repo</code
824
- >
825
- <span class="text-gray-500 text-sm ml-auto"
826
- >Get repository</span
827
- >
828
- </div>
829
- <div
830
- class="flex items-center gap-2 p-2 rounded bg-black/30"
831
- >
832
- <span
833
- class="px-2 py-0.5 rounded text-xs font-bold bg-green-500/20 text-green-400"
834
- >POST</span
835
- >
836
- <code class="text-white text-sm"
837
- >/api/repos/:owner/:repo/fork</code
838
- >
839
- <span class="text-gray-500 text-sm ml-auto"
840
- >Fork repository</span
841
- >
842
- </div>
843
- <div
844
- class="flex items-center gap-2 p-2 rounded bg-black/30"
845
- >
846
- <span
847
- class="px-2 py-0.5 rounded text-xs font-bold bg-green-500/20 text-green-400"
848
- >POST</span
849
- >
850
- <code class="text-white text-sm"
851
- >/api/repos/:owner/:repo/star</code
852
- >
853
- <span class="text-gray-500 text-sm ml-auto"
854
- >Star/unstar repo</span
855
- >
856
- </div>
857
- <div
858
- class="flex items-center gap-2 p-2 rounded bg-black/30"
859
- >
860
- <span
861
- class="px-2 py-0.5 rounded text-xs font-bold bg-red-500/20 text-red-400"
862
- >DELETE</span
863
- >
864
- <code class="text-white text-sm"
865
- >/api/repos/:owner/:repo</code
866
- >
867
- <span class="text-gray-500 text-sm ml-auto"
868
- >Delete repository</span
869
- >
870
- </div>
871
- </div>
872
- </div>
873
-
874
- <!-- Issues APIs -->
875
- <div>
876
- <h3 class="text-lg font-semibold text-white mb-3">Issues</h3>
877
- <div class="space-y-2">
878
- <div
879
- class="flex items-center gap-2 p-2 rounded bg-black/30"
880
- >
881
- <span
882
- class="px-2 py-0.5 rounded text-xs font-bold bg-blue-500/20 text-blue-400"
883
- >GET</span
884
- >
885
- <code class="text-white text-sm"
886
- >/api/repos/:owner/:repo/issues</code
887
- >
888
- <span class="text-gray-500 text-sm ml-auto"
889
- >List issues</span
890
- >
891
- </div>
892
- <div
893
- class="flex items-center gap-2 p-2 rounded bg-black/30"
894
- >
895
- <span
896
- class="px-2 py-0.5 rounded text-xs font-bold bg-green-500/20 text-green-400"
897
- >POST</span
898
- >
899
- <code class="text-white text-sm"
900
- >/api/repos/:owner/:repo/issues</code
901
- >
902
- <span class="text-gray-500 text-sm ml-auto"
903
- >Create issue</span
904
- >
905
- </div>
906
- </div>
907
- </div>
908
-
909
- <!-- PR APIs -->
910
- <div>
911
- <h3 class="text-lg font-semibold text-white mb-3">
912
- Pull Requests
913
- </h3>
914
- <div class="space-y-2">
915
- <div
916
- class="flex items-center gap-2 p-2 rounded bg-black/30"
917
- >
918
- <span
919
- class="px-2 py-0.5 rounded text-xs font-bold bg-blue-500/20 text-blue-400"
920
- >GET</span
921
- >
922
- <code class="text-white text-sm"
923
- >/api/repos/:owner/:repo/pulls</code
924
- >
925
- <span class="text-gray-500 text-sm ml-auto">List PRs</span
926
- >
927
- </div>
928
- <div
929
- class="flex items-center gap-2 p-2 rounded bg-black/30"
930
- >
931
- <span
932
- class="px-2 py-0.5 rounded text-xs font-bold bg-green-500/20 text-green-400"
933
- >POST</span
934
- >
935
- <code class="text-white text-sm"
936
- >/api/repos/:owner/:repo/pulls</code
937
- >
938
- <span class="text-gray-500 text-sm ml-auto"
939
- >Create PR</span
940
- >
941
- </div>
942
- <div
943
- class="flex items-center gap-2 p-2 rounded bg-black/30"
944
- >
945
- <span
946
- class="px-2 py-0.5 rounded text-xs font-bold bg-green-500/20 text-green-400"
947
- >POST</span
948
- >
949
- <code class="text-white text-sm"
950
- >/api/repos/:owner/:repo/pulls/:number/merge</code
951
- >
952
- <span class="text-gray-500 text-sm ml-auto">Merge PR</span
953
- >
954
- </div>
955
- </div>
956
- </div>
957
- </div>
958
- </div>
959
- </div>
960
- </section>
961
- </main>
962
- </div>
963
- </div>
964
-</BaseLayout>
965
0