Skip to content

Commit b5bbb62

Browse files
committed
feat: initial commit, stackdeck v0.1.0
0 parents  commit b5bbb62

62 files changed

Lines changed: 8727 additions & 0 deletions

Some content is hidden

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

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false

.github/workflows/ci.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [main]
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
check:
14+
name: Test (Node ${{ matrix.node }})
15+
runs-on: ubuntu-latest
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
node: [20, 22]
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
24+
- name: Setup pnpm
25+
uses: pnpm/action-setup@v4
26+
with:
27+
version: 10
28+
29+
- name: Setup Node ${{ matrix.node }}
30+
uses: actions/setup-node@v4
31+
with:
32+
node-version: ${{ matrix.node }}
33+
cache: pnpm
34+
35+
- name: Install dependencies
36+
run: pnpm install --frozen-lockfile
37+
38+
- name: Typecheck
39+
run: pnpm typecheck
40+
41+
- name: Format check
42+
run: pnpm format:check
43+
44+
- name: Lint
45+
run: pnpm lint
46+
47+
- name: Dead code check
48+
run: pnpm knip
49+
50+
- name: Test
51+
run: pnpm test
52+
53+
- name: Build
54+
run: pnpm build
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Deploy Preview (Vercel)
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
7+
concurrency:
8+
group: preview-${{ github.ref }}
9+
cancel-in-progress: true
10+
11+
jobs:
12+
deploy:
13+
name: Vercel preview
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
17+
pull-requests: write
18+
env:
19+
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
20+
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Setup pnpm
26+
uses: pnpm/action-setup@v4
27+
with:
28+
version: 10
29+
30+
- name: Setup Node 22
31+
uses: actions/setup-node@v4
32+
with:
33+
node-version: 22
34+
cache: pnpm
35+
36+
- name: Install Vercel CLI
37+
run: pnpm add -g vercel@latest
38+
39+
- name: Pull Vercel environment
40+
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
41+
42+
- name: Build
43+
run: vercel build --token=${{ secrets.VERCEL_TOKEN }}
44+
45+
- name: Deploy preview
46+
id: deploy
47+
run: |
48+
url=$(vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }})
49+
echo "url=$url" >> "$GITHUB_OUTPUT"
50+
51+
- name: Comment preview URL on PR
52+
uses: actions/github-script@v7
53+
with:
54+
script: |
55+
const url = '${{ steps.deploy.outputs.url }}';
56+
const body = `🚀 **Preview deployed:** ${url}`;
57+
const { data: comments } = await github.rest.issues.listComments({
58+
owner: context.repo.owner,
59+
repo: context.repo.repo,
60+
issue_number: context.issue.number,
61+
});
62+
const existing = comments.find(c => c.user.type === 'Bot' && c.body.startsWith('🚀 **Preview deployed:**'));
63+
if (existing) {
64+
await github.rest.issues.updateComment({
65+
owner: context.repo.owner,
66+
repo: context.repo.repo,
67+
comment_id: existing.id,
68+
body,
69+
});
70+
} else {
71+
await github.rest.issues.createComment({
72+
owner: context.repo.owner,
73+
repo: context.repo.repo,
74+
issue_number: context.issue.number,
75+
body,
76+
});
77+
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Deploy Production (Vercel)
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
concurrency:
8+
group: production
9+
cancel-in-progress: false
10+
11+
jobs:
12+
deploy:
13+
name: Vercel production
14+
runs-on: ubuntu-latest
15+
env:
16+
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
17+
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
22+
- name: Setup pnpm
23+
uses: pnpm/action-setup@v4
24+
with:
25+
version: 10
26+
27+
- name: Setup Node 22
28+
uses: actions/setup-node@v4
29+
with:
30+
node-version: 22
31+
cache: pnpm
32+
33+
- name: Install Vercel CLI
34+
run: pnpm add -g vercel@latest
35+
36+
- name: Pull Vercel environment
37+
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
38+
39+
- name: Build
40+
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
41+
42+
- name: Deploy production
43+
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}

.gitignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
node_modules
2+
.next
3+
out
4+
.DS_Store
5+
.env
6+
.env.*
7+
*.tsbuildinfo
8+
next-env.d.ts
9+
coverage
10+
.idea
11+
.vscode
12+
*.log
13+
.turbo
14+
.temp
15+
.vercel

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
22

.prettierignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
node_modules
2+
.next
3+
out
4+
coverage
5+
pnpm-lock.yaml
6+
*.min.js
7+
*.min.css
8+
next-env.d.ts
9+
.turbo

.prettierrc.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"$schema": "https://json.schemastore.org/prettierrc",
3+
"printWidth": 100,
4+
"tabWidth": 2,
5+
"useTabs": false,
6+
"semi": true,
7+
"singleQuote": true,
8+
"quoteProps": "as-needed",
9+
"jsxSingleQuote": false,
10+
"trailingComma": "all",
11+
"bracketSpacing": true,
12+
"bracketSameLine": false,
13+
"arrowParens": "always",
14+
"endOfLine": "lf",
15+
"embeddedLanguageFormatting": "off",
16+
"overrides": [
17+
{
18+
"files": "*.md",
19+
"options": {
20+
"proseWrap": "preserve"
21+
}
22+
}
23+
]
24+
}

.vercelignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.github
2+
docs
3+
tests
4+
coverage
5+
*.md
6+
!README.md
7+
.editorconfig
8+
.nvmrc
9+
eslint.config.mjs
10+
vitest.config.ts

CHANGELOG.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Changelog
2+
3+
All notable changes to stackdeck are documented in this file.
4+
5+
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6+
7+
## [Unreleased]
8+
9+
## [0.1.0] - 2026-05-06
10+
11+
Initial public release.
12+
13+
### Added
14+
15+
- Versioned IR (`v2.0`) with Zod-validated schemas: Deck, Slide, 9 atomic Blocks, Style, Palette, ThemeRef.
16+
- Markdown parser supporting frontmatter, `::slide` separators, 10 pattern directives, void directives, and nested containers.
17+
- Deck-level planner with cover-at-slide-0, mid-deck cover demotion, and uncommon-layout deduplication rules.
18+
- Theme system composed from Style x Density x Palette x Mode. CSS-variable injection for instant theme switching with no React reconciliation.
19+
- 9 atomic block React components, one file each, all token-driven.
20+
- 8 layouts: flow, hero, cover, section, split, columns, grid, fullBleed.
21+
- Modern Style + 4 curated Palettes (Electric, Sunset, Forest, Mono).
22+
- Live editor at `/` with markdown source and rendered preview, plus theme toolbar.
23+
- PDF export via `window.print()` and a 16:9 `@page` print stylesheet.
24+
- Deterministic test suite: 40 tests across schema, parser, planner, and theme resolver.
25+
- ESLint flat config, TypeScript strict mode, Vitest with v8 coverage.
26+
- GitHub Actions CI: typecheck, lint, test, build on Node 20 and 22.
27+
- Vercel deploy workflows: preview on PR, production on `main`.
28+
29+
[Unreleased]: https://github.com/OWNER/stackdeck/compare/v0.1.0...HEAD
30+
[0.1.0]: https://github.com/OWNER/stackdeck/releases/tag/v0.1.0

0 commit comments

Comments
 (0)