Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
204 commits
Select commit Hold shift + click to select a range
ff734dd
Add project brief, README, and analysis documents
phmatray Apr 3, 2026
5cdbb62
fix: correct free tier quota (500) and Pro price (€39) in CLAUDE.md
phmatray Apr 3, 2026
bd3ee0d
fix(docs): convert pricing to EUR, remove phantom trial, fix quota re…
phmatray Apr 3, 2026
e17e667
fix(docs): align /validate auth to optional-but-free across all pages
phmatray Apr 3, 2026
8d5a907
feat(docs): add /auth/register API reference page, update quick-start…
phmatray Apr 3, 2026
481b09d
feat(docs): add /usage API reference page
phmatray Apr 3, 2026
8fa2049
fix(docs): unify error response contract, add docs field to all examples
phmatray Apr 3, 2026
2212597
fix(analysis): align user stories and monetization with DECISIONS.md
phmatray Apr 3, 2026
024b20f
fix(docs): align quota reset language to billing-cycle model across a…
phmatray Apr 3, 2026
02ea195
feat(docs): add /auth/register and /usage to sidebar navigation
phmatray Apr 3, 2026
6afbb7b
feat(docs): redesign site identity, update homepage copy, add diverge…
phmatray Apr 3, 2026
ff44e7b
feat(docs): add competitive positioning page — OG Engine vs Puppeteer
phmatray Apr 3, 2026
1ed857c
feat(docs): rewrite changelog with marketing context and audience tar…
phmatray Apr 3, 2026
7ecb724
feat(docs): add blog with 3 launch articles
phmatray Apr 3, 2026
8009d7b
feat(docs): add framework integration guides for Next.js, Astro, Clou…
phmatray Apr 3, 2026
f463e52
feat(playground): add shared CSS for animations, focus states, hover …
phmatray Apr 3, 2026
ee70d95
feat(docs): add plan persona descriptions to pricing page
phmatray Apr 3, 2026
c11bc76
feat(playground): add collapsible Section component
phmatray Apr 3, 2026
67477e6
feat(playground): add preset cards and randomize button
phmatray Apr 3, 2026
58df6d2
feat(playground): add floating render HUD overlay
phmatray Apr 3, 2026
0d1770d
feat(playground): add fullscreen preview modal
phmatray Apr 3, 2026
7fb3758
feat(playground): add drag-and-drop zone overlay
phmatray Apr 3, 2026
5c8d782
feat(playground): add minimal syntax-highlighted pre block
phmatray Apr 3, 2026
da43dc5
feat(docs): add trust bar, how-it-works, use cases, validate hook, FA…
phmatray Apr 3, 2026
5cb81d3
feat(docs): consolidate sidebar — add framework guides, blog, compare…
phmatray Apr 3, 2026
e3ddc46
feat(playground): add hover/press animations and focus glow to style …
phmatray Apr 3, 2026
5c9917b
feat(playground): add hover/press animations to format selector
phmatray Apr 3, 2026
d0c2fed
feat(playground): add hover/press animations to template selector
phmatray Apr 3, 2026
946349d
feat(playground): add JSON tab and syntax highlighting to code output
phmatray Apr 3, 2026
d60ed2b
feat(playground): major rewrite with presets, sections, HUD, fullscre…
phmatray Apr 3, 2026
847e371
feat(playground): add focus styles and render pulse to PlaygroundMini
phmatray Apr 3, 2026
8c59745
feat(playground): add sections, HUD, focus styles to PlaygroundContex…
phmatray Apr 3, 2026
54d076a
fix(playground): address code review issues
phmatray Apr 3, 2026
91c89a7
feat(seo): add comprehensive SEO foundation — meta tags, structured d…
phmatray Apr 3, 2026
6df3e21
fix(playground): move CSS import to top-level components only
phmatray Apr 3, 2026
2610807
fix(playground): load CSS via Starlight customCss, add favicon
phmatray Apr 3, 2026
cd7876f
feat(seo): add font preconnect, Article schema for blog posts, and lo…
phmatray Apr 3, 2026
e8681b6
chore: initialize API server with Bun, Hono, @napi-rs/canvas
phmatray Apr 3, 2026
1cd4072
feat: add font download script for 8 Google Font families
phmatray Apr 3, 2026
90abbf3
feat(engine): add format and gradient definitions
phmatray Apr 3, 2026
e3777bc
feat(engine): add font registration with @napi-rs/canvas
phmatray Apr 3, 2026
b7ba6a6
feat(engine): add server-side text measurement with @napi-rs/canvas
phmatray Apr 3, 2026
7ae48a8
feat(engine): add server-side Canvas renderer with PNG output
phmatray Apr 3, 2026
b63028f
feat(api): add Zod request validation schemas
phmatray Apr 3, 2026
f60a2ae
feat(api): add GET /health endpoint
phmatray Apr 3, 2026
8990ee0
feat(api): add POST /validate endpoint — free, unlimited text-fit che…
phmatray Apr 3, 2026
7cd499d
feat(api): add POST /render endpoint — returns PNG with metadata headers
phmatray Apr 3, 2026
6d9cba3
feat: wire up Hono server with health, validate, and render routes
phmatray Apr 3, 2026
5abb9ec
chore: add vitest configuration
phmatray Apr 3, 2026
7e19d69
feat: add performance benchmark (target: ~2-5ms per render)
phmatray Apr 3, 2026
71c7747
feat(playground): add optional API mode — calls real server when avai…
phmatray Apr 3, 2026
3860b15
feat(seo): self-host Google Fonts and add BreadcrumbList JSON-LD
phmatray Apr 3, 2026
9079f2a
Add renovate.json
renovate[bot] Apr 3, 2026
7bd3853
feat(marketing): improve landing page conversion — social proof, pric…
phmatray Apr 3, 2026
4e4ed2b
Merge pull request #1 from Atypical-Consulting/renovate/configure
phmatray Apr 3, 2026
1e416eb
docs: add benchmark suite design spec
phmatray Apr 3, 2026
bc24961
docs: add benchmark suite implementation plan
phmatray Apr 3, 2026
06c753c
feat(engine): add optional phase timing to renderCard
phmatray Apr 3, 2026
3e5273b
chore: add puppeteer dev dep, bench:full script, benchmark results dir
phmatray Apr 3, 2026
84fbaee
feat(bench): add scenario definitions, stats helpers, machine info
phmatray Apr 3, 2026
37a38b2
feat(bench): add Puppeteer baseline runner for comparison
phmatray Apr 3, 2026
6b94d96
feat(bench): add OG Engine benchmark runner with phase timing
phmatray Apr 3, 2026
2b1c2dd
feat(bench): add markdown + JSON report generator
phmatray Apr 3, 2026
a87c6c7
docs(bench): add benchmark README with methodology
phmatray Apr 3, 2026
ca04223
docs: rewrite README in English with star-growth optimizations
phmatray Apr 3, 2026
76d4381
feat(bench): add full benchmark orchestrator
phmatray Apr 3, 2026
371a08c
fix: correct GitHub repo URL to Atypical-Consulting/og-engine
phmatray Apr 3, 2026
16eb288
feat(bench): first benchmark report — real measured numbers
phmatray Apr 3, 2026
7171e5d
chore: replace old benchmark with new benchmark suite
phmatray Apr 3, 2026
2ef3464
feat(landing): comprehensive landing page polish — 13 improvements
phmatray Apr 3, 2026
ef567de
docs: update all performance claims with benchmarked numbers
phmatray Apr 3, 2026
d9b4bd0
docs: add 'How We Benchmark' page with reproducible methodology
phmatray Apr 3, 2026
afcb211
docs: update README with benchmarked performance numbers
phmatray Apr 3, 2026
67f8a12
chore: upgrade zod 4, typescript 6, vitest 4 and fix breaking changes
phmatray Apr 3, 2026
37ccd43
feat(landing): redesign hero with split-panel render demo and fix spa…
phmatray Apr 3, 2026
5339e0a
feat: implement full API — phases 1-4, auth, SDK, CI pipeline
phmatray Apr 3, 2026
fd15239
chore(deps): update actions/checkout action to v6
renovate[bot] Apr 3, 2026
887671f
fix: add python3 and build tools to Dockerfile for better-sqlite3
phmatray Apr 3, 2026
0e90007
fix: skip lifecycle scripts in Docker, build better-sqlite3 manually
phmatray Apr 3, 2026
27a000c
fix: use bunx node-gyp to build better-sqlite3 in Docker
phmatray Apr 3, 2026
fbe54fc
fix: add SQLite compat layer — bun:sqlite in prod, better-sqlite3 in …
phmatray Apr 3, 2026
7fa15a9
fix: use $ param prefix for bun:sqlite compatibility
phmatray Apr 3, 2026
062638d
fix: prefix object keys with $ for bun:sqlite named param compat
phmatray Apr 3, 2026
d649c50
fix: download fonts during Docker build instead of COPY
phmatray Apr 3, 2026
7884310
feat: add root endpoint with API overview
phmatray Apr 3, 2026
4879158
feat: serve Astro docs site from the API server
phmatray Apr 3, 2026
01121b3
Merge pull request #7 from Atypical-Consulting/renovate/actions-check…
phmatray Apr 3, 2026
819bf90
chore(deps): update dependency @astrojs/sitemap to v3.7.2
renovate[bot] Apr 3, 2026
da17c70
fix(deps): update dependency @astrojs/starlight to ^0.38.0
renovate[bot] Apr 3, 2026
d44289e
chore(deps): update dependency typescript to v6
renovate[bot] Apr 3, 2026
477fe60
chore(deps): update dependency zod to v4
renovate[bot] Apr 3, 2026
3536f67
ci: deploy to Fly.io on push to dev
phmatray Apr 3, 2026
4937c3b
fix(deps): update astro monorepo
renovate[bot] Apr 3, 2026
06de111
fix: use og-engine.com instead of api.og-engine.com in all docs
phmatray Apr 3, 2026
308ab4a
docs: add Stripe production integration design spec
phmatray Apr 3, 2026
a0ced5c
docs: add Stripe production integration implementation plan
phmatray Apr 3, 2026
b7c8371
chore: add stripe and resend dependencies
phmatray Apr 3, 2026
e1b5f81
feat: add Resend email module with welcome, upgrade, and downgrade em…
phmatray Apr 3, 2026
7edb165
fix: suppress biome arrow-function lint warning in Resend mock
phmatray Apr 3, 2026
61a2687
feat: rewrite webhook handler with Stripe SDK signature verification …
phmatray Apr 3, 2026
a05bd34
feat: send welcome email on free registration via Resend
phmatray Apr 3, 2026
1fb8c55
feat: add GET /billing/portal for Stripe Customer Portal sessions
phmatray Apr 3, 2026
9baf5f4
feat: add admin endpoint for monthly free-tier quota reset
phmatray Apr 3, 2026
331860b
feat: register billing portal and admin routes
phmatray Apr 3, 2026
6b08b5c
ci: add monthly GitHub Action cron for free-tier quota reset
phmatray Apr 3, 2026
ce943d6
docs: document all required secrets in fly.toml
phmatray Apr 3, 2026
55da99b
docs: mark pricing page Stripe Payment Links as placeholders
phmatray Apr 3, 2026
eb9dc7c
feat: align SDK with docs API and publish to GitHub Packages
phmatray Apr 3, 2026
bf50ade
chore(deps): update actions/setup-node action to v6
renovate[bot] Apr 3, 2026
23d166d
chore(deps): update dependency node to v24
renovate[bot] Apr 3, 2026
f2e2374
fix: convert HTML comments to MDX comments in pricing.mdx
phmatray Apr 3, 2026
32fcd69
Merge pull request #10 from Atypical-Consulting/renovate/actions-setu…
phmatray Apr 3, 2026
2daa954
Merge pull request #11 from Atypical-Consulting/renovate/node-24.x
phmatray Apr 3, 2026
d0163d6
Merge remote-tracking branch 'origin/renovate/typescript-6.x' into ch…
phmatray Apr 3, 2026
4f36ee8
Merge remote-tracking branch 'origin/renovate/zod-4.x' into chore/mer…
phmatray Apr 3, 2026
193fd3d
merge: resolve conflict (zod v4 + sitemap 3.7.2)
phmatray Apr 3, 2026
22250e4
Merge remote-tracking branch 'origin/renovate/astrojs-starlight-0.x' …
phmatray Apr 3, 2026
6f56094
merge: resolve conflict (astro v6 + starlight 0.38 + react v5)
phmatray Apr 3, 2026
7d97a3b
fix: regenerate docs/site lockfile and clean up merge artifacts
phmatray Apr 3, 2026
f6c401c
Merge pull request #12 from Atypical-Consulting/chore/merge-all-renov…
phmatray Apr 3, 2026
ccb9624
fix: use Resend free-tier sending domain as default
phmatray Apr 3, 2026
3e2ddbb
feat: add real Stripe Payment Links for Starter and Pro plans
phmatray Apr 3, 2026
23a7dde
debug: log webhook signature errors and received events
phmatray Apr 9, 2026
8814d82
fix: use constructEventAsync for Bun runtime compatibility
phmatray Apr 9, 2026
c70fb92
feat: add checkout success page and fix webhook email fallback
phmatray Apr 9, 2026
0afa6a4
chore: remove debug logging from webhook handler
phmatray Apr 9, 2026
2cfc598
feat: switch pricing page to live Stripe Payment Links
phmatray Apr 9, 2026
a584d3a
feat: improve funnel, CTA visibility, and playground flexibility
phmatray Apr 9, 2026
c521f30
docs: add Spec A — playground polish design
phmatray Apr 9, 2026
65e1171
docs: add Spec A implementation plan
phmatray Apr 9, 2026
7503968
feat(docs): reorder sidebar to surface playground and pricing
phmatray Apr 9, 2026
56efba4
feat(docs): hide TOC on playground page
phmatray Apr 9, 2026
bdf27f3
fix(playground): bring text contrast up to WCAG AA
phmatray Apr 9, 2026
bf886c1
feat(playground): promote Randomize to full-width Surprise me CTA
phmatray Apr 9, 2026
6291588
feat(playground): add R keyboard shortcut for Surprise me
phmatray Apr 9, 2026
6465ab4
feat(playground): inline Auto-fit toggle next to Title size slider
phmatray Apr 9, 2026
c740848
fix(playground): apply contrast token to remaining UI files
phmatray Apr 9, 2026
4df13bb
docs: add Spec B — playground app shell design
phmatray Apr 9, 2026
d64f735
docs: add Spec B implementation plan
phmatray Apr 9, 2026
e6050b7
feat(playground): switch to splash template
phmatray Apr 9, 2026
1eb0aa3
feat(playground): two-column app shell layout
phmatray Apr 9, 2026
b363f8e
refactor(playground): add toolbar variant to RenderHUD
phmatray Apr 9, 2026
5219bc3
feat(playground): add PreviewToolbar component
phmatray Apr 9, 2026
35a3fb9
feat(playground): hoist format pills and HUD into toolbar
phmatray Apr 9, 2026
8358816
feat(playground): sticky Surprise me CTA in controls column
phmatray Apr 9, 2026
c9c2f06
feat(playground): add CodeDrawer component
phmatray Apr 9, 2026
2a085e2
feat(playground): replace inline CodeOutput with CodeDrawer
phmatray Apr 9, 2026
c4ca72c
fix(playground): polish app shell rollout
phmatray Apr 9, 2026
8cc6aa2
docs: add Spec C — unified font system + Google Fonts in playground
phmatray Apr 9, 2026
bc8aeb2
docs: add Spec C implementation plan
phmatray Apr 9, 2026
9332a67
feat(fonts): add canonical font catalog
phmatray Apr 9, 2026
e9710f3
refactor(fonts): make API server fonts.ts a thin wrapper
phmatray Apr 9, 2026
d1b1c02
feat(fonts): add Google Fonts catalog dump and refresh script
phmatray Apr 9, 2026
6d3a363
refactor(playground): make client fonts.ts a thin wrapper
phmatray Apr 9, 2026
9bb0127
feat(fonts): iterate CURATED_FONTS in download-fonts script
phmatray Apr 9, 2026
63871f5
feat(fonts): add 45 curated font binaries
phmatray Apr 9, 2026
36fb17e
feat(playground): add FontCombobox component
phmatray Apr 9, 2026
0ad39ca
feat(playground): replace FontPicker with FontCombobox
phmatray Apr 9, 2026
93fce8f
feat(playground): warn when code uses a preview-only font
phmatray Apr 9, 2026
32a571b
docs(fonts): generate available-fonts page from catalog
phmatray Apr 9, 2026
96b3151
fix(playground): preserve preset fonts and default after catalog reorder
phmatray Apr 9, 2026
70dcd25
fix(playground): add id to hex color input for accessibility
phmatray Apr 9, 2026
8e00544
chore(deps): update astro monorepo
renovate[bot] Apr 9, 2026
9c9de9e
Merge pull request #15 from Atypical-Consulting/feat/playground-overhaul
phmatray Apr 9, 2026
448ffdb
Merge pull request #14 from Atypical-Consulting/renovate/major-astro-…
phmatray Apr 9, 2026
f468e78
chore(deps): update react monorepo to v19.2.5
renovate[bot] Apr 9, 2026
85eb7b4
Merge pull request #16 from Atypical-Consulting/renovate/react-monorepo
phmatray Apr 9, 2026
f57dce1
fix(docker): stage src/engine for docs build
phmatray Apr 9, 2026
8f323bb
fix(docs): correct benchmarks link in BenchmarkCounters
phmatray Apr 9, 2026
6e5d926
fix(api): stop shadowing /templates/gallery docs page
phmatray Apr 9, 2026
7c89938
feat(playground): redesign templates and fix major UX issues
phmatray Apr 9, 2026
afa8adb
docs(specs): add license design spec (FSL-1.1-Apache-2.0 + Apache-2.0)
phmatray Apr 9, 2026
466341b
fix(docs): use real Stripe URLs in home pricing strip
phmatray Apr 9, 2026
2c19301
Merge pull request #17 from Atypical-Consulting/fix/home-pricing-stri…
phmatray Apr 9, 2026
a8138d5
docs(plans): add license implementation plan
phmatray Apr 9, 2026
7aef3e6
chore(license): add FSL-1.1-Apache-2.0 for server, Apache-2.0 for SDK
phmatray Apr 9, 2026
8718744
chore(license): fix sdk copyright fill-in and drop unauthorized section
phmatray Apr 9, 2026
43520b0
feat(playground): live template previews, shortcuts, toasts
phmatray Apr 9, 2026
0bd278a
fix(license): replace LICENSE with canonical FSL-1.1-ALv2 text
phmatray Apr 10, 2026
2fa10a2
feat(schema): add variables field to render schema
phmatray Apr 10, 2026
b41f014
feat(schema): add named images field to render schema
phmatray Apr 10, 2026
8939918
feat(engine): thread variables and named images through render pipeline
phmatray Apr 10, 2026
0f133dc
feat(engine): add HTML meta tag extraction for URL-to-image
phmatray Apr 10, 2026
88d24f4
test: add named image source tests for custom templates
phmatray Apr 10, 2026
fafcf92
feat(sdk): add variables, images, and renderFromUrl support
phmatray Apr 10, 2026
2ee88ed
docs(specs): add template expansion design spec
phmatray Apr 10, 2026
33b8518
docs(plans): add template expansion implementation plan
phmatray Apr 10, 2026
3972337
refactor(engine): split templates into individual files
phmatray Apr 10, 2026
6d108ea
feat(templates): add product-card template
phmatray Apr 10, 2026
b378891
feat(templates): add testimonial template
phmatray Apr 10, 2026
385fec0
feat(templates): add news-article, pricing, profile-card, announcemen…
phmatray Apr 10, 2026
766d49b
docs(api-reference): add variables, images, and render-from-url docum…
phmatray Apr 10, 2026
e676f50
docs(guides): update template gallery and guides for 12 templates
phmatray Apr 10, 2026
042654d
docs: update SDK reference, pricing, quick-start, README, and CLAUDE.…
phmatray Apr 10, 2026
5d775a8
Merge pull request #18 from Atypical-Consulting/feat/flexible-data-model
phmatray Apr 10, 2026
9f541b5
docs(spec): add dashboard, auth & swagger design spec
phmatray Apr 10, 2026
8e077e1
docs(spec): fix 6 issues found during spec review
phmatray Apr 10, 2026
55dde09
docs(plan): add implementation plan for dashboard, auth, and swagger
phmatray Apr 10, 2026
ed7fd94
feat(infra): add staging environment on Fly.io with CI deployment gate
phmatray Apr 16, 2026
95b083d
feat(render): add WebP plan gate and tests for Phase 2
phmatray Apr 16, 2026
7a6e856
feat(cache): add LRU text measurement cache hit rate tracking (ATY-19)
phmatray Apr 16, 2026
ff9aca4
feat(sdk): dual-publish to npm registry and GitHub Packages (ATY-20)
phmatray Apr 16, 2026
191112f
fix(security): block SSRF in POST /render/from-url (ATY-13)
phmatray Apr 16, 2026
ed4ceec
chore(release): populate LICENSE-HISTORY.md dates for v0.1.0
phmatray Apr 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 14 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
node_modules
.git
tests
benchmarks
docs/analysis
docs/superpowers
docs/site/node_modules
docs/site/dist
docs/site/.astro
*.md
!docs/site/**/*.md
!docs/site/**/*.mdx
.dockerignore
Dockerfile
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false

[Dockerfile]
indent_style = tab
174 changes: 174 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
name: CI

on:
push:
branches: [main, dev]
tags: ["v*"]
pull_request:
branches: [main, dev]

jobs:
check:
name: Lint, Type-check & Test
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v6

- uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Install dependencies
run: bun install --frozen-lockfile

- name: Download fonts
run: bun run fonts:download

- name: Lint
run: bun run lint

- name: Type-check
run: bun run type-check

- name: Test
run: bun run test
env:
AUTH_ENABLED: "false"

publish-sdk-github:
name: Publish SDK to GitHub Packages
runs-on: ubuntu-latest
needs: check
if: github.ref == 'refs/heads/dev' && github.event_name == 'push'
permissions:
contents: read
packages: write
defaults:
run:
working-directory: sdk

steps:
- uses: actions/checkout@v6

- uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- uses: actions/setup-node@v6
with:
node-version: 24
registry-url: https://npm.pkg.github.com
scope: '@atypical-consulting'

- name: Install dependencies
run: bun install

- name: Build SDK
run: bun run build

- name: Check if version is already published
id: version-check
run: |
PACKAGE_NAME=$(node -p "require('./package.json').name")
PACKAGE_VERSION=$(node -p "require('./package.json').version")
if npm view "${PACKAGE_NAME}@${PACKAGE_VERSION}" version --registry https://npm.pkg.github.com 2>/dev/null; then
echo "published=true" >> "$GITHUB_OUTPUT"
echo "Version ${PACKAGE_VERSION} already published — skipping"
else
echo "published=false" >> "$GITHUB_OUTPUT"
echo "Version ${PACKAGE_VERSION} not yet published — will publish"
fi
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Publish to GitHub Packages
if: steps.version-check.outputs.published == 'false'
run: npm publish --registry https://npm.pkg.github.com
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

publish-sdk-npm:
name: Publish SDK to npm registry
runs-on: ubuntu-latest
needs: check
if: startsWith(github.ref, 'refs/tags/v') && github.event_name == 'push'
permissions:
contents: read
defaults:
run:
working-directory: sdk

steps:
- uses: actions/checkout@v6

- uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- uses: actions/setup-node@v6
with:
node-version: 24
registry-url: https://registry.npmjs.org
scope: '@atypical-consulting'

- name: Install dependencies
run: bun install

- name: Build SDK
run: bun run build

- name: Check if version is already published
id: version-check
run: |
PACKAGE_NAME=$(node -p "require('./package.json').name")
PACKAGE_VERSION=$(node -p "require('./package.json').version")
if npm view "${PACKAGE_NAME}@${PACKAGE_VERSION}" version 2>/dev/null; then
echo "published=true" >> "$GITHUB_OUTPUT"
echo "Version ${PACKAGE_VERSION} already published — skipping"
else
echo "published=false" >> "$GITHUB_OUTPUT"
echo "Version ${PACKAGE_VERSION} not yet published — will publish"
fi
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Publish to npm
if: steps.version-check.outputs.published == 'false'
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

deploy-staging:
name: Deploy to Fly.io (Staging)
runs-on: ubuntu-latest
needs: check
if: github.ref == 'refs/heads/dev' && github.event_name == 'push'
environment: staging

steps:
- uses: actions/checkout@v6

- uses: superfly/flyctl-actions/setup-flyctl@master

- name: Deploy to staging
run: flyctl deploy --remote-only --config fly.staging.toml
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN_STAGING }}

deploy-production:
name: Deploy to Fly.io (Production)
runs-on: ubuntu-latest
needs: check
if: startsWith(github.ref, 'refs/tags/v') && github.event_name == 'push'
environment: production

steps:
- uses: actions/checkout@v6

- uses: superfly/flyctl-actions/setup-flyctl@master

- name: Deploy to production
run: flyctl deploy --remote-only --config fly.toml
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
29 changes: 29 additions & 0 deletions .github/workflows/reset-free-quotas.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Reset Free Tier Quotas

on:
schedule:
# 1st of each month at 00:05 UTC
- cron: '5 0 1 * *'
workflow_dispatch: # Allow manual trigger for testing

jobs:
reset:
runs-on: ubuntu-latest
steps:
- name: Reset free-tier quotas
run: |
response=$(curl -s -w "\n%{http_code}" -X POST \
https://og-engine.com/admin/reset-free-quotas \
-H "Authorization: Bearer ${{ secrets.ADMIN_CRON_SECRET }}" \
-H "Content-Type: application/json")

http_code=$(echo "$response" | tail -1)
body=$(echo "$response" | head -n -1)

echo "Status: $http_code"
echo "Response: $body"

if [ "$http_code" != "200" ]; then
echo "::error::Reset failed with status $http_code"
exit 1
fi
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ node_modules/

# Build output
dist/
docs-dist/

# Astro
.astro/
Expand All @@ -20,3 +21,11 @@ Thumbs.db
.vscode/
*.swp
*.swo

# Benchmark raw data (large JSON files)
benchmarks/results/*.json

# SQLite database
data/*.db
data/*.db-wal
data/*.db-shm
Loading