Skip to content

Commit 054580c

Browse files
committed
Add web
1 parent 412d099 commit 054580c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+10866
-12
lines changed

.github/workflows/deploy.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: "pages"
16+
cancel-in-progress: false
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Setup Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: '20'
29+
cache: 'npm'
30+
cache-dependency-path: web/package-lock.json
31+
32+
- name: Install dependencies
33+
run: |
34+
cd web
35+
npm ci
36+
37+
- name: Build website
38+
run: |
39+
cd web
40+
npm run build
41+
env:
42+
NODE_ENV: production
43+
NEXT_PUBLIC_SITE_URL: https://ai-devkit.com
44+
45+
- name: Upload artifact
46+
uses: actions/upload-pages-artifact@v3
47+
with:
48+
path: web/out
49+
50+
deploy:
51+
environment:
52+
name: github-pages
53+
url: ${{ steps.deployment.outputs.page_url }}
54+
runs-on: ubuntu-latest
55+
needs: build
56+
steps:
57+
- name: Deploy to GitHub Pages
58+
id: deployment
59+
uses: actions/deploy-pages@v4
60+

README.md

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -304,11 +304,6 @@ Use the capture-knowledge command to analyze <entry-point>
304304
- **Function**: `/capture-knowledge calculateTotalPrice` - Analyzes a specific function
305305
- **API Endpoint**: `/capture-knowledge POST:/api/users` - Analyzes an API endpoint flow
306306

307-
**Options:**
308-
- `--depth <n>` - Control recursion depth (default: 3)
309-
- `--save` - Save output to `docs/ai/knowledge/`
310-
- `--diagram-only` - Generate only diagrams
311-
312307
**What You Get:**
313308
- 📖 **Detailed Explanation**: Natural language description of how the code works
314309
- 🔍 **Implementation Details**: Key components, logic flow, and design patterns
@@ -344,17 +339,11 @@ For modules/folders, you get:
344339

345340
**Example Workflow:**
346341
```bash
347-
# Understand a payment function
348-
/capture-knowledge processPayment --depth 4
349-
350342
# Document an entire authentication module
351-
/capture-knowledge src/auth/ --save
343+
/capture-knowledge @src/auth/
352344

353345
# Analyze an API endpoint
354346
/capture-knowledge POST:/api/checkout
355-
356-
# Get just the diagrams for a complex function
357-
/capture-knowledge handleOrderProcessing --diagram-only
358347
```
359348

360349
The analysis is saved to `docs/ai/knowledge/` and can be versioned alongside your code.

web/.gitignore

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.*
7+
.yarn/*
8+
!.yarn/patches
9+
!.yarn/plugins
10+
!.yarn/releases
11+
!.yarn/versions
12+
13+
# testing
14+
/coverage
15+
16+
# next.js
17+
/.next/
18+
/out/
19+
20+
# production
21+
/build
22+
23+
# misc
24+
.DS_Store
25+
*.pem
26+
27+
# debug
28+
npm-debug.log*
29+
yarn-debug.log*
30+
yarn-error.log*
31+
.pnpm-debug.log*
32+
33+
# env files (can opt-in for committing if needed)
34+
.env*
35+
36+
# vercel
37+
.vercel
38+
39+
# typescript
40+
*.tsbuildinfo
41+
next-env.d.ts

web/.nojekyll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# This file tells GitHub Pages not to process the site with Jekyll
2+

web/CNAME

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ai-devkit.com

web/README.md

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# AI DevKit Website
2+
3+
This is the source code for the AI DevKit static website built with Next.js.
4+
5+
## Development
6+
7+
```bash
8+
npm install
9+
npm run dev
10+
```
11+
12+
Open [http://localhost:3000](http://localhost:3000) to view the site.
13+
14+
## Building
15+
16+
```bash
17+
npm run build
18+
```
19+
20+
This generates static files in the `out/` directory.
21+
22+
## Deployment
23+
24+
The site is automatically deployed to GitHub Pages when changes are pushed to the `main` branch.
25+
26+
### Manual Deployment Setup
27+
28+
1. Go to your repository settings on GitHub
29+
2. Navigate to **Settings > Pages**
30+
3. Under **Source**, select **GitHub Actions**
31+
4. The workflow will run automatically on push to main
32+
33+
## Project Structure
34+
35+
```
36+
web/
37+
├── app/ # Next.js app directory
38+
│ ├── docs/ # Documentation pages
39+
│ ├── roadmap/ # Roadmap page
40+
│ ├── vision/ # Vision page
41+
│ ├── layout.tsx # Root layout
42+
│ └── page.tsx # Landing page
43+
├── components/ # Reusable components
44+
├── content/ # Markdown content
45+
│ ├── docs/ # Documentation files
46+
│ ├── pages/ # Static pages
47+
│ └── roadmap/ # Roadmap items
48+
├── lib/ # Utilities and helpers
49+
│ └── content/ # Content loading utilities
50+
└── public/ # Static assets
51+
```
52+
53+
## Content Management
54+
55+
All content is managed via Markdown files with frontmatter:
56+
57+
- Documentation: `content/docs/*.md`
58+
- Pages (vision, etc): `content/pages/*.md`
59+
- Roadmap items: `content/roadmap/*.md`
60+
61+
### Adding New Documentation
62+
63+
Create a new file in `content/docs/`:
64+
65+
```markdown
66+
---
67+
title: Your Doc Title
68+
description: Brief description
69+
slug: your-doc-slug
70+
order: 1
71+
---
72+
73+
# Your content here...
74+
```
75+
76+
### Adding Roadmap Items
77+
78+
Create a new file in `content/roadmap/`:
79+
80+
```markdown
81+
---
82+
title: Feature Name
83+
status: planned | in-progress | completed | on-hold
84+
timeframe: Q1 2026
85+
priority: high | medium | low
86+
order: 1
87+
---
88+
89+
Feature description...
90+
```
91+
92+
## SEO
93+
94+
The site includes:
95+
96+
- Comprehensive metadata
97+
- Sitemap at `/sitemap.xml`
98+
- Robots.txt at `/robots.txt`
99+
- Open Graph tags for social sharing
100+
- Semantic HTML and ARIA labels

web/app/docs/[slug]/page.tsx

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
import { notFound } from "next/navigation";
2+
import Link from "next/link";
3+
import { getDocPage, getAllDocPages } from "@/lib/content/loader";
4+
import MarkdownContent from "@/components/MarkdownContent";
5+
import type { Metadata } from "next";
6+
7+
interface DocPageProps {
8+
params: Promise<{ slug: string }>;
9+
}
10+
11+
export async function generateStaticParams() {
12+
const docs = getAllDocPages();
13+
return docs.map((doc) => ({
14+
slug: doc.metadata.slug,
15+
}));
16+
}
17+
18+
export async function generateMetadata({
19+
params,
20+
}: DocPageProps): Promise<Metadata> {
21+
const { slug } = await params;
22+
const doc = getDocPage(slug);
23+
24+
if (!doc) {
25+
return {
26+
title: "Page Not Found",
27+
};
28+
}
29+
30+
return {
31+
title: `${doc.metadata.title} | AI DevKit Documentation`,
32+
description: doc.metadata.description,
33+
};
34+
}
35+
36+
export default async function DocPage({ params }: DocPageProps) {
37+
const { slug } = await params;
38+
const doc = getDocPage(slug);
39+
40+
if (!doc) {
41+
notFound();
42+
}
43+
44+
const allDocs = getAllDocPages();
45+
const currentIndex = allDocs.findIndex((d) => d.metadata.slug === slug);
46+
const prevDoc = currentIndex > 0 ? allDocs[currentIndex - 1] : null;
47+
const nextDoc =
48+
currentIndex < allDocs.length - 1 ? allDocs[currentIndex + 1] : null;
49+
50+
return (
51+
<div className="bg-white py-16">
52+
<article className="mx-auto max-w-4xl px-4 sm:px-6 lg:px-8">
53+
<nav className="mb-8 text-sm text-gray-600">
54+
<Link href="/docs" className="hover:text-black transition-colors">
55+
Documentation
56+
</Link>
57+
<span className="mx-2">/</span>
58+
<span className="text-black">{doc.metadata.title}</span>
59+
</nav>
60+
61+
<h1 className="text-4xl md:text-5xl font-bold mb-4">
62+
{doc.metadata.title}
63+
</h1>
64+
65+
{doc.metadata.description && (
66+
<p className="text-xl text-gray-600 mb-12">
67+
{doc.metadata.description}
68+
</p>
69+
)}
70+
71+
<MarkdownContent content={doc.content} />
72+
</article>
73+
<nav className="mt-16 pt-8 border-t border-gray-200 mx-auto max-w-4xl px-4 sm:px-6 lg:px-8">
74+
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
75+
{prevDoc ? (
76+
<Link
77+
href={`/docs/${prevDoc.metadata.slug}`}
78+
className="p-4 border border-gray-200 rounded-lg hover:border-black transition-colors no-underline group"
79+
>
80+
<div className="text-sm text-gray-600 mb-1">Previous</div>
81+
<div className="font-bold group-hover:opacity-70 transition-opacity">
82+
{prevDoc.metadata.title}
83+
</div>
84+
</Link>
85+
) : (
86+
<div />
87+
)}
88+
{nextDoc && (
89+
<Link
90+
href={`/docs/${nextDoc.metadata.slug}`}
91+
className="p-4 border border-gray-200 rounded-lg hover:border-black transition-colors no-underline text-right group"
92+
>
93+
<div className="text-sm text-gray-600 mb-1">Next</div>
94+
<div className="font-bold group-hover:opacity-70 transition-opacity">
95+
{nextDoc.metadata.title}
96+
</div>
97+
</Link>
98+
)}
99+
</div>
100+
</nav>
101+
</div>
102+
);
103+
}

0 commit comments

Comments
 (0)