Skip to content

Commit f6f499f

Browse files
committed
docs: add VitePress documentation site
- Add VitePress configuration and documentation structure - Include installation, usage, and configuration guides - Add architecture documentation for streaming and tRPC - Add API documentation structure - Configure Vercel deployment - Add GitHub Actions release workflow - Add test coverage script - Add Biome configuration for code formatting - Add .vercel to gitignore
1 parent 79a4fe1 commit f6f499f

File tree

21 files changed

+5482
-1
lines changed

21 files changed

+5482
-1
lines changed

.github/workflows/release.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
concurrency: ${{ github.workflow }}-${{ github.ref }}
9+
10+
jobs:
11+
release:
12+
name: Release
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout Repo
16+
uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: 22
24+
registry-url: 'https://registry.npmjs.org'
25+
26+
- name: Install Dependencies
27+
run: bun install
28+
29+
- name: Build
30+
run: bun run build
31+
32+
- name: Create Release Pull Request or Publish to npm
33+
id: changesets
34+
uses: changesets/action@v1
35+
with:
36+
publish: bun run release
37+
version: bun run version-packages
38+
commit: "chore(release): version packages"
39+
title: "chore(release): version packages"
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
43+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
44+
45+
- name: Create Git Tag
46+
if: steps.changesets.outputs.published == 'true'
47+
run: |
48+
VERSION=$(node -p "require('./package.json').version")
49+
git tag v${VERSION}
50+
git push origin v${VERSION}
51+
env:
52+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ event-stream-debug.log
77

88
# Internal development docs (not for public)
99
.internal/
10+
.vercel

biome.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"files": {
99
"maxSize": 5242880,
1010
"includes": ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx", "**/*.json"],
11+
"ignore": ["node_modules/", "dist/", "coverage/"],
1112
"ignoreUnknown": true
1213
},
1314
"formatter": {
@@ -18,10 +19,19 @@
1819
"lineEnding": "lf",
1920
"lineWidth": 100
2021
},
22+
"organizeImports": {
23+
"enabled": true
24+
},
2125
"linter": {
2226
"enabled": true,
2327
"rules": {
24-
"recommended": true
28+
"recommended": true,
29+
"complexity": {
30+
"noForEach": "off"
31+
},
32+
"suspicious": {
33+
"noExplicitAny": "off"
34+
}
2535
}
2636
},
2737
"javascript": {

docs/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
.vitepress/dist
3+
.vitepress/cache
4+
.temp
5+
*.log

docs/.vitepress/config.mts

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
import { defineConfig } from 'vitepress'
2+
3+
// https://vitepress.dev/reference/site-config
4+
export default defineConfig({
5+
title: "Code - AI Code Assistant",
6+
description: "AI code assistant built for speed. 30x faster with zero-overhead tRPC, real-time streaming, and multi-client synchronization.",
7+
base: '/',
8+
lang: 'en-US',
9+
10+
head: [
11+
['link', { rel: 'icon', type: 'image/svg+xml', href: '/logo.svg' }],
12+
['meta', { name: 'theme-color', content: '#5f67ee' }],
13+
['meta', { property: 'og:type', content: 'website' }],
14+
['meta', { property: 'og:locale', content: 'en' }],
15+
['meta', { property: 'og:title', content: 'Code - AI Code Assistant' }],
16+
['meta', { property: 'og:site_name', content: 'Code' }],
17+
['meta', { property: 'og:url', content: 'https://code.sylphx.com' }],
18+
],
19+
20+
themeConfig: {
21+
// https://vitepress.dev/reference/default-theme-config
22+
logo: '/logo.svg',
23+
24+
nav: [
25+
{ text: 'Home', link: '/' },
26+
{ text: 'Guide', link: '/guide/' },
27+
{ text: 'Architecture', link: '/architecture/' },
28+
{ text: 'API', link: '/api/' },
29+
{ text: 'Development', link: '/development/' }
30+
],
31+
32+
sidebar: {
33+
'/guide/': [
34+
{
35+
text: 'Introduction',
36+
items: [
37+
{ text: 'Getting Started', link: '/guide/' },
38+
{ text: 'Installation', link: '/guide/installation' },
39+
{ text: 'Usage', link: '/guide/usage' },
40+
{ text: 'Configuration', link: '/guide/configuration' }
41+
]
42+
}
43+
],
44+
'/architecture/': [
45+
{
46+
text: 'Architecture',
47+
items: [
48+
{ text: 'Overview', link: '/architecture/' },
49+
{ text: 'tRPC Communication', link: '/architecture/trpc' },
50+
{ text: 'Event Streaming', link: '/architecture/streaming' }
51+
]
52+
}
53+
],
54+
'/api/': [
55+
{
56+
text: 'API Reference',
57+
items: [
58+
{ text: 'Overview', link: '/api/' }
59+
]
60+
}
61+
],
62+
'/development/': [
63+
{
64+
text: 'Development',
65+
items: [
66+
{ text: 'Contributing', link: '/development/' }
67+
]
68+
}
69+
]
70+
},
71+
72+
socialLinks: [
73+
{ icon: 'github', link: 'https://github.com/SylphxAI/code' }
74+
],
75+
76+
footer: {
77+
message: 'Released under the MIT License.',
78+
copyright: 'Copyright © 2024-present Sylphx'
79+
},
80+
81+
search: {
82+
provider: 'local'
83+
},
84+
85+
editLink: {
86+
pattern: 'https://github.com/SylphxAI/code/edit/main/docs/:path',
87+
text: 'Edit this page on GitHub'
88+
},
89+
90+
lastUpdated: {
91+
text: 'Updated at',
92+
formatOptions: {
93+
dateStyle: 'full',
94+
timeStyle: 'medium'
95+
}
96+
}
97+
}
98+
})

0 commit comments

Comments
 (0)