Skip to content

Commit 9708f89

Browse files
committed
Let's create an AI library...
0 parents  commit 9708f89

99 files changed

Lines changed: 13680 additions & 0 deletions

File tree

Some content is hidden

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

.assetsignore

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Workers Assets, .gitignore-style exclusions. Anything matched here is
2+
# NOT uploaded with `wrangler deploy` and is invisible to the [assets]
3+
# binding the Worker reads from. This is the same root the static SPA
4+
# is served from, so we shave development-only paths out of the bundle.
5+
6+
# Worker source + node_modules (workerd binary is 100+ MiB, well above
7+
# the 25 MiB per-asset limit) and Wrangler's local-dev scratch dir.
8+
worker/
9+
.wrangler/
10+
11+
# Repo metadata + Git history.
12+
.git/
13+
.gitignore
14+
.editorconfig
15+
16+
# Local planning / brainstorming / docs scratch, not served.
17+
.plans/
18+
.brainstorming/
19+
.backups/
20+
._docs/
21+
22+
# macOS finder cruft + assorted noise.
23+
.DS_Store
24+
**/.DS_Store
25+
*.log
26+
27+
# Top-level docs that aren't part of the SPA. (Keep prompts/, skills/,
28+
# agents/ uploaded since the local transport fetches them.)
29+
Makefile
30+
.assetsignore

.github/workflows/deploy.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Cloudflare Worker deploy workflow for the published Aitelier mirror.
2+
#
3+
# The mirror is a pre-built snapshot. The Worker reads its asset list from
4+
# _bundle.br (already shipped), so no manifest build step is needed here.
5+
#
6+
# Gating via repo Actions variable DEPLOY_MODE:
7+
# unset or 'pages' -> skipped (pages.yml runs instead)
8+
# 'worker' -> this workflow runs, wrangler deploys on every push
9+
#
10+
# Required repo secrets when DEPLOY_MODE='worker':
11+
# CLOUDFLARE_API_TOKEN scoped Workers Scripts: Edit + (R2 + KV: Edit for first run)
12+
# CLOUDFLARE_ACCOUNT_ID account that owns the Worker
13+
14+
name: Deploy Worker
15+
16+
on:
17+
push:
18+
branches: [main]
19+
workflow_dispatch:
20+
21+
permissions:
22+
contents: read
23+
24+
jobs:
25+
deploy:
26+
name: Deploy
27+
runs-on: ubuntu-latest
28+
if: vars.DEPLOY_MODE == 'worker'
29+
steps:
30+
- uses: actions/checkout@v6
31+
32+
- name: Setup Bun
33+
uses: oven-sh/setup-bun@v2
34+
with:
35+
bun-version: latest
36+
37+
- name: Install worker dependencies
38+
run: bun install --frozen-lockfile
39+
working-directory: worker
40+
41+
- name: Deploy Worker (uploads ../ via Workers Assets)
42+
run: bunx wrangler deploy
43+
working-directory: worker
44+
env:
45+
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
46+
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}

.github/workflows/pages.yml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# GitHub Pages workflow for the published Aitelier mirror.
2+
#
3+
# The mirror is a pre-built snapshot (CSS already compiled upstream). This
4+
# workflow regenerates _bundle.br against the current content so external
5+
# visitors always see a bundle matching the deployed HEAD, then stages a
6+
# clean copy of the repo and uploads it as the Pages artifact.
7+
#
8+
# Triggers:
9+
# - push to main: deploys.
10+
# - workflow_dispatch: manual one-off run from the Actions tab.
11+
12+
name: Pages
13+
14+
on:
15+
push:
16+
branches: [main]
17+
workflow_dispatch:
18+
19+
permissions:
20+
contents: read
21+
pages: write
22+
id-token: write
23+
24+
concurrency:
25+
group: pages
26+
cancel-in-progress: false
27+
28+
jobs:
29+
build:
30+
name: Build site artifact
31+
runs-on: ubuntu-latest
32+
# Default deploy mode is Pages. Set repo Actions variable DEPLOY_MODE=worker
33+
# to skip Pages and let deploy.yml redeploy the Worker instead.
34+
if: vars.DEPLOY_MODE == '' || vars.DEPLOY_MODE == 'pages'
35+
steps:
36+
- uses: actions/checkout@v6
37+
38+
- name: Setup Bun
39+
uses: oven-sh/setup-bun@v2
40+
with:
41+
bun-version: latest
42+
43+
- name: Regenerate _manifest.json + _bundle.br against current content
44+
run: |
45+
if [[ -f scripts/build-manifest.ts ]]; then
46+
bun run scripts/build-manifest.ts
47+
fi
48+
if [[ -f scripts/build-bundle.ts ]]; then
49+
bun run scripts/build-bundle.ts
50+
fi
51+
52+
- name: Stage clean site root
53+
run: |
54+
set -euo pipefail
55+
mkdir -p _site
56+
rsync -a --delete \
57+
--exclude '.git/' \
58+
--exclude '.github/' \
59+
--exclude '.assetsignore' \
60+
--exclude '.gitignore' \
61+
--exclude 'worker/' \
62+
--exclude 'package.json' \
63+
--exclude 'bun.lock' \
64+
--exclude 'scripts/' \
65+
--exclude 'node_modules/' \
66+
--exclude 'TODO.md' \
67+
--exclude '*.log' \
68+
--exclude '.DS_Store' \
69+
--exclude '**/.DS_Store' \
70+
./ _site/
71+
72+
- name: Verify entrypoint
73+
run: test -f _site/index.html
74+
75+
- name: Configure Pages
76+
uses: actions/configure-pages@v5
77+
78+
- name: Upload artifact
79+
uses: actions/upload-pages-artifact@v3
80+
with:
81+
path: _site
82+
83+
deploy:
84+
name: Deploy to Pages
85+
needs: build
86+
runs-on: ubuntu-latest
87+
if: vars.DEPLOY_MODE == '' || vars.DEPLOY_MODE == 'pages'
88+
environment:
89+
name: github-pages
90+
url: ${{ steps.deployment.outputs.page_url }}
91+
steps:
92+
- name: Deploy
93+
id: deployment
94+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# =============================================================
2+
# Atelier .gitignore
3+
# Stack: static HTML/JS SPA + Cloudflare Worker (TypeScript)
4+
# Dev: python3 -m http.server + wrangler dev
5+
# Host: macOS primary
6+
# =============================================================
7+
8+
# ---------- Project scratch (local-only, never committed) ----
9+
.brainstorming/
10+
.backups/
11+
.plans/
12+
._docs/
13+
14+
# ---------- macOS noise ----------
15+
.DS_Store
16+
**/.DS_Store
17+
._*
18+
.AppleDouble
19+
.LSOverride
20+
Icon
21+
.Spotlight-V100
22+
.Trashes
23+
.fseventsd
24+
.DocumentRevisions-V100
25+
.TemporaryItems
26+
.VolumeIcon.icns
27+
.com.apple.timemachine.donotpresent
28+
29+
# ---------- Node / npm (worker/ has its own, but cover anywhere) ----------
30+
node_modules/
31+
.npm/
32+
.yarn/
33+
.pnp.*
34+
npm-debug.log*
35+
yarn-debug.log*
36+
yarn-error.log*
37+
pnpm-debug.log*
38+
.eslintcache
39+
40+
# ---------- TypeScript build artefacts ----------
41+
dist/
42+
build/
43+
*.tsbuildinfo
44+
45+
# ---------- Cloudflare Workers / Wrangler ----------
46+
.wrangler/
47+
.dev.vars
48+
.dev.vars.*
49+
wrangler.toml.bak
50+
51+
# ---------- Logs + crash dumps ----------
52+
*.log
53+
logs/
54+
*.pid
55+
*.seed
56+
*.pid.lock
57+
58+
# ---------- Python (dev server may leave bytecode) ----------
59+
__pycache__/
60+
*.pyc
61+
*.pyo
62+
63+
# ---------- Editor / IDE ----------
64+
.vscode/
65+
!.vscode/settings.json
66+
!.vscode/extensions.json
67+
!.vscode/tasks.json
68+
.idea/
69+
*.iml
70+
*.swp
71+
*.swo
72+
*~
73+
.netrwhist
74+
.history/
75+
*.sublime-workspace
76+
*.sublime-project
77+
78+
# ---------- Local env ----------
79+
.env
80+
.env.*
81+
!.env.example
82+
.envrc
83+
84+
# ---------- Coverage / test output ----------
85+
coverage/
86+
.nyc_output/
87+
*.lcov
88+
89+
# ---------- OS / archive cruft ----------
90+
Thumbs.db
91+
ehthumbs.db
92+
Desktop.ini
93+
$RECYCLE.BIN/
94+
*.cab
95+
*.msi
96+
*.msix
97+
*.msm
98+
*.msp
99+
*.lnk
100+
# Claude Code worktree cache
101+
.claude/

.nojekyll

Whitespace-only changes.

Makefile

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/make -f
2+
3+
.ONESHELL:
4+
.SHELL := /usr/bin/bash
5+
6+
PORT ?= 8000
7+
BUN ?= bunx
8+
9+
help: ## Show available commands
10+
@echo "Usage: make [command]\n"
11+
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' Makefile | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
12+
13+
css: ## Build tailwind CSS once
14+
@$(BUN) @tailwindcss/cli -i src/styles/input.css -o src/styles/library.css --minify
15+
16+
css-watch: ## Watch tailwind CSS
17+
@$(BUN) @tailwindcss/cli -i src/styles/input.css -o src/styles/library.css --watch
18+
19+
dev: css ## Start development server
20+
@echo "Serving on http://localhost:$(PORT)"
21+
@python3 -m http.server $(PORT)
22+
23+
stop: ## Stop development server
24+
@lsof -ti tcp:$(PORT) | xargs -r kill -9 || true
25+
26+
open: ## Open development server in browser
27+
@open http://localhost:$(PORT)

0 commit comments

Comments
 (0)