Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
149 commits
Select commit Hold shift + click to select a range
8203d01
chore: update package-lock.json for consistent builds
Jan 9, 2026
fb416b1
feat: 4D tesseract hero with blue/cyan/orange color scheme
Jan 23, 2026
6dfc610
perf: heavy glow tesseract + lazy-load below-fold components
Jan 23, 2026
7e0795f
perf(tesseract): single-pass glow with offscreen compositing
Jan 23, 2026
a48c20b
feat: Voronoi golden-ratio hero with motes and mist fade
Jan 23, 2026
2f0c393
feat: add Masterclass page with progressive disclosure pricing
Jan 23, 2026
7fbf275
perf: optimize media assets - convert to WebP, 95%+ size reduction
Jan 23, 2026
5458058
fix: restore essential media files and generate video thumbnails
Jan 23, 2026
0c2aaa1
fix: pricing sync, bio updates, ESLint fixes, and sitemap corrections
Jan 23, 2026
3bb251c
perf: image optimization and animation performance improvements
Jan 24, 2026
8311b97
fix(ux): link homepage CTA directly to masterclass content
Jan 24, 2026
989a09d
Update profile and pricing for accuracy and market alignment
Jan 24, 2026
a58f710
feat: add dual-path CTAs and dedicated testimonials page
Jan 24, 2026
09358b0
feat: complete homepage rework with PM content structure
Jan 24, 2026
b9be980
fix: enable mouse pointer events for WASM background interaction
Jan 24, 2026
496b408
feat: enlarge mesh hero 150% with velocity-based physics
Jan 24, 2026
c86c36b
feat: slow momentum decay + updated hero copy
Jan 24, 2026
7fb7768
feat: add JJ bio photo
Jan 24, 2026
05e4add
feat: calmer Voronoi animation physics
Jan 24, 2026
0142eac
feat: updated hero headline with golden glow
Jan 24, 2026
a1ad566
feat: use team page photo for JJ bio sections
Jan 24, 2026
20d4a22
fix: resolve dead links and broken CTAs
Jan 24, 2026
5ab8102
chore: cleanup development artifacts and rewrite README
Jan 24, 2026
79cddfa
chore: remove abandoned subsystems and runtime artifacts
Jan 24, 2026
4d7c0ed
feat: integrate Fairfield community platform at /community path
Jan 24, 2026
b706592
fix: GitHub Pages SPA routing for /community deep routes
Jan 24, 2026
db20ce5
fix: SvelteKit SPA routing with goto() for GitHub Pages deep routes
Jan 24, 2026
eaabcdc
fix: improve navigation visibility on mobile and desktop
Jan 24, 2026
ed743d8
deploy: update community app with improved navigation
Jan 24, 2026
af65cc6
fix: add error resilience for Nostr connection failures
Jan 24, 2026
2970783
fix: use production relay URL as default in environment config
Jan 24, 2026
095daa1
fix: add null checks for $page.url during SvelteKit hydration
Jan 24, 2026
09bce00
deploy: rebuild with null safety fixes for hydration crash
Jan 24, 2026
7df51e1
refactor: major cleanup and security hardening
claude Jan 25, 2026
1d1bd72
docs: rewrite community-forum README with comprehensive project docum…
claude Jan 25, 2026
b8cce36
docs: complete documentation overhaul with world-class README
claude Jan 25, 2026
c97905b
ci: fix deployment workflows and remove wasteful validation
claude Jan 25, 2026
de462c2
push a blank test file for deployment
claude Jan 26, 2026
6676b6e
fix: make header menu always visible on desktop and mobile
claude Jan 26, 2026
40f9511
chore: remove Previous Work from navigation menu
claude Jan 26, 2026
ad7a5f2
fix(a11y): improve mobile accessibility with WCAG 2.2 compliance
claude Jan 26, 2026
7623d2d
trim back landing page a bit
claude Jan 26, 2026
5f359ec
reduce participants
claude Jan 26, 2026
33c76e9
Change wording a bit
claude Jan 26, 2026
968ba6b
numbers ajustment
claude Jan 26, 2026
f109985
group pricing
claude Jan 26, 2026
4c6a626
Install claude-flow v3 + agentic-qe and optimize CLAUDE.md for projec…
claude Feb 13, 2026
72361a0
Overhaul UX flow: flatten conversion funnel, remove pricing, add reta…
claude Feb 13, 2026
a845507
Align community forum design with main DreamLab site
claude Feb 13, 2026
3a7cca1
Update community-forum package-lock.json after dependency install
claude Feb 13, 2026
b575ff1
Add VisionFlow agent bridge for 3-tier AI agents via Nostr DM
claude Feb 13, 2026
e6d7659
Add Talk to AI chat FAB with toggle for AI responses
claude Feb 13, 2026
ee64a9a
Add tier upgrade selector to AI chat toggle
claude Feb 13, 2026
ce5268f
Merge pull request #1 from DreamLab-AI/claude/install-claude-flow-age…
jjohare Feb 14, 2026
40082ad
testimonials
claude Feb 20, 2026
df228d9
Merge ce5268f3: Recover visionflow-bridge and Nostr agent features
claude Feb 20, 2026
e65a2f8
feat(auth): passkey-first WebAuthn PRF auth with JSS pod provisioning
claude Feb 21, 2026
55ee52f
docs(CLAUDE.md): document passkey-first WebAuthn PRF auth architecture
claude Feb 21, 2026
8f5a9fe
fix(auth-api): Cloud SQL socket SSL + pgcrypto extension for deployment
claude Feb 21, 2026
7c5f612
chore: add VITE_AUTH_API_URL to .env.example
claude Feb 21, 2026
8680eeb
ci: trigger workflow run to verify VITE_AUTH_API_URL secret
claude Feb 21, 2026
771db3e
fix(auth-api): registration flow and RP_ORIGIN env var
claude Feb 21, 2026
4b2c272
Fix critical auth security issues from QE fleet review
claude Feb 21, 2026
650a5d3
refactor: consolidate testimonials from 3 sources into single YAML so…
claude Feb 21, 2026
4ce008b
Fix 5 security/correctness issues + JSS /idp/register/ 404
claude Feb 21, 2026
ba28af7
Fix H-4, M-1 through M-5 security issues in auth-api
claude Feb 21, 2026
4cce23e
Fix JSS OOM risk and CI lockfile fallback
claude Feb 21, 2026
0e91000
Migrate JSS to CSS 7.x /.account/ API and fix pod manager config
claude Feb 21, 2026
86d3a45
Fix JSS: dynamic pod manager, memory locker, and pod template field
claude Feb 21, 2026
8fddcea
Fix 5 QE-reviewed issues: admin auth bypass, NIP-01 tag OR, render th…
claude Feb 21, 2026
8944c6b
Remove unused TorusKnot.tsx component
claude Feb 21, 2026
050ccd2
Fix 5 QE issues: secp256k1 modulo bias, ECDH thread freeze, SW WebSoc…
claude Feb 21, 2026
00336ba
Add local key auth method and strip Nostr terminology from onboarding
claude Feb 22, 2026
1191481
describe the auth flow
claude Feb 22, 2026
c72349e
Cloudflare migration, NIP-98 consolidation, RuVector setup, and JSS h…
claude Feb 28, 2026
8791f03
Merge pull request #2 from DreamLab-AI/feat/cloudflare-migration-nip9…
jjohare Feb 28, 2026
34aaee6
Fix NIP-98 client import path for SvelteKit build
claude Feb 28, 2026
c881ef7
Rewrite docs corpus: 37 files updated, 9 new, 13 stale removed
claude Feb 28, 2026
93b8c16
Deploy 3 Cloudflare Workers with security hardening
claude Mar 1, 2026
135970f
Fix Workers deploy: pin wrangler v3 + explicit env vars
claude Mar 1, 2026
56002a9
Harden Workers security + update 35 docs to deployed status
claude Mar 1, 2026
349b817
Update admin pubkey to npub15he28rzyce2t...sgr03mf
claude Mar 1, 2026
44aa6d7
Revert admin pubkey to 11ed6422... (npub1z8kkgg...)
claude Mar 1, 2026
e808f44
Add Cloudflare Workers Nostr relay, replace all GCP relay references
claude Mar 1, 2026
68fd835
Remove stale GCP workflows, disable auto-push on remaining GCP services
claude Mar 1, 2026
adf2204
Fix relay CORS: dynamic multi-origin support for all deployment domains
claude Mar 1, 2026
fa83e58
Fix auth store: expose privateKey in reactive state for relay connect…
claude Mar 1, 2026
ae2a17d
Fix 8 UX issues from community forum audit
claude Mar 1, 2026
c0bcece
Comprehensive UX overhaul: landing, auth, admin, channels, mobile res…
claude Mar 1, 2026
83f84c9
Fix cohort access model: zone filtering + member forum creation
claude Mar 1, 2026
cd3d6d1
Harden security, fix accessibility, and improve UX from holistic audit
claude Mar 1, 2026
9564dd1
Fix 5 structural root causes: NDK init, channel fetch, admin stats, c…
claude Mar 1, 2026
67574ad
Add NIP-07 extension signer support to relay manager
claude Mar 1, 2026
30ade88
Remove stale files, archive historical documents
claude Mar 1, 2026
6e28b3d
Harden .gitignore, remove cached dev config
claude Mar 1, 2026
9c9ce88
Rewrite README, update documentation index
claude Mar 1, 2026
a1db366
Strip legacy 3-section model, fix 12 CRITICAL + 21 HIGH technical deb…
claude Mar 2, 2026
32d4800
Remove remaining public-lobby and community-rooms ghost section IDs
claude Mar 2, 2026
bb4996e
Fix client-side navigation not loading data, wire up Create Forum
claude Mar 2, 2026
8e3ec6f
Fix 5 security and performance issues from external audit
claude Mar 2, 2026
b3f791c
Fix 5 protocol violations and logic bugs from external audit
claude Mar 2, 2026
c917265
Fix 9 more audit findings: NIP-98 bypass, IP spoofing, DM freeze, cal…
claude Mar 2, 2026
8a8efc9
Zero-GCP migration: all services on Cloudflare Workers, delete 6 GCP …
claude Mar 2, 2026
0d17551
Fix 7 validated bugs: passkey lockout, subscription leak, DM nuke, me…
claude Mar 2, 2026
5731789
Update 37 docs files: remove GCP references, reflect Cloudflare Worke…
claude Mar 2, 2026
bb94ece
Fix deploy: regenerate lockfile, guard workflows to fork only
claude Mar 2, 2026
21782c3
Fix Firefox WebSocket: add retry logic + wait for hydration
claude Mar 2, 2026
c68205d
Remove PWA install/offline banners (deprecated)
claude Mar 2, 2026
db75fb5
Fix CalendarSheet crash: guard undefined upcomingEvents/filteredEvents
claude Mar 2, 2026
bd54ac9
Fix relay connect: wait for WebSocket open event instead of polling s…
claude Mar 2, 2026
7feb124
Fix relay connect: don't disconnect old WebSocket before new one opens
claude Mar 2, 2026
a648621
Fix admin: subscribe to userStore in layout to trigger whitelist check
claude Mar 2, 2026
38592d2
Fix relay connect: add connection lock + poll-based status check
claude Mar 2, 2026
3865459
Fix channel chat infinite loading: add timeouts + relay reconnect
claude Mar 2, 2026
666c57f
Fix profile publish: use relay manager with retry + longer timeout
claude Mar 2, 2026
8eb8800
Fix NIP-07 signing, remove dead hnswlib-wasm, achieve 81% test coverage
claude Mar 2, 2026
524ec24
Fix channels/messages vanishing on back-navigation
claude Mar 2, 2026
b975339
Fix double nickname, NIP-98 auth failure, and admin approval UX
claude Mar 2, 2026
719acfe
Simplify admin approval: just assign approved cohort, no granular picker
claude Mar 2, 2026
ed30bf0
Fix passkey registration: resolve client-server protocol mismatch
claude Mar 6, 2026
e6838ac
Fix NIP-98 payload hash: build event directly instead of nostr-tools …
claude Mar 6, 2026
11d2586
Fix relay reconnect on publish + passkey login error for missing cred…
claude Mar 6, 2026
93c81da
Fix relay race condition, Android topbar, Workers cold starts, LIKE i…
claude Mar 6, 2026
1ab2459
Fix event ID verification bypass, WebAuthn assertion bypass, health i…
claude Mar 6, 2026
dd43108
new landing
claude Mar 6, 2026
7f3a4fb
Hardening sprint: fix 2 CRITICAL, 10 HIGH, 6 MEDIUM audit findings (A…
claude Mar 7, 2026
cd64063
Add client-side ONNX semantic embeddings, wire search ingest pipeline
claude Mar 7, 2026
8afc44a
Overhaul documentation: mermaid diagrams, deprecate GCP refs, fix 12 …
claude Mar 7, 2026
458edf5
Fix admin detection: add a617d210 to ADMIN_PUBKEYS, check D1 admin co…
claude Mar 7, 2026
b899a6d
PRD: Full Rust port of community forum (Leptos + nostr-sdk + worker c…
claude Mar 8, 2026
cde56aa
Replace docs with Rust port documentation set (28 files)
claude Mar 8, 2026
4c2ec6d
Tranche 0: Rust workspace + nostr-core implementation (62 tests passing)
claude Mar 8, 2026
a1cd5ca
Tranche 0 complete: benchmarks + WASM bridge
claude Mar 8, 2026
8661a31
Tranche 1: Hybrid validation — WASM crypto integration + benchmarks
claude Mar 8, 2026
732056c
Tranche 2 infrastructure: nostr-core API hardening + mixed deploy pip…
claude Mar 8, 2026
2b1d310
Tranche 2 complete: link-preview + pod-api Workers ported to Rust
claude Mar 8, 2026
934ee36
T3.1: auth-worker ported to Rust + relay-worker crate scaffold
claude Mar 8, 2026
1674bb1
Tranche 3 complete: relay-worker + sign_event API tightening
claude Mar 8, 2026
331ae52
Tranche 4 Slices A+B: Leptos auth shell + channel browsing
claude Mar 8, 2026
ec9cd2e
Tranche 4 Slices D+E: DM pages, admin panel, Trunk scaffold
claude Mar 8, 2026
2d2c95f
Tranche 5: Premium UX/UI polish — design system, icons, mobile nav, c…
claude Mar 8, 2026
7940337
Hardening: fix 4 foundation issues — memory leak, key leak, heap allo…
claude Mar 8, 2026
ca452d2
Tranche 6: Constellation particle canvas + ambient CSS
claude Mar 8, 2026
ac6d95e
Deploy: switch gh-pages to Rust/WASM forum, fix API URL config
claude Mar 8, 2026
5ec0aad
Merge rust-version: deploy Rust/WASM Leptos forum to production
claude Mar 8, 2026
61c74e8
Fix Trunk build: rel="css" not rel="stylesheet" for data-trunk links
claude Mar 8, 2026
f630646
Fix Trunk workspace: add data-cargo-package for workspace member reso…
claude Mar 8, 2026
70bc551
Slice D: NIP-59 Gift Wrap DMs + fix Trunk workspace build
claude Mar 8, 2026
fedcf23
Dual-SPA deploy, QE audit, docs rewrite, crypto upgrades
claude Mar 8, 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
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ VITE_SUPABASE_URL=https://your-project-id.supabase.co
# This key has Row Level Security (RLS) enabled
VITE_SUPABASE_ANON_KEY=your-anon-key-here

# Auth API (WebAuthn + NIP-98 server on Cloudflare Workers)
VITE_AUTH_API_URL=https://dreamlab-auth-api.solitary-paper-764d.workers.dev

# SECURITY NOTES:
# - Never commit .env files with real credentials to git
# - The ANON key is designed to be public but should still use RLS policies
Expand Down
44 changes: 44 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Quality Engineering Standards (Agentic QE)

## AQE MCP Server

This project uses Agentic QE for AI-powered quality engineering. The AQE MCP server provides tools for test generation, coverage analysis, quality assessment, and learning.

## Setup

Always call `fleet_init` before using other AQE tools to initialize the QE fleet.

## Available Tools

### Test Generation
- `test_generate_enhanced` — AI-powered test generation with pattern recognition and anti-pattern detection
- Supports unit, integration, and e2e test types

### Coverage Analysis
- `coverage_analyze_sublinear` — O(log n) coverage gap detection with ML-powered analysis
- Target: 80% statement coverage minimum, focus on risk-weighted coverage

### Quality Assessment
- `quality_assess` — Quality gate evaluation with configurable thresholds
- Run before marking tasks complete

### Security Scanning
- `security_scan_comprehensive` — SAST/DAST vulnerability scanning
- Run after changes to auth, security, or middleware code

### Defect Prediction
- `defect_predict` — AI analysis of code complexity and change history

### Learning & Memory
- `memory_store` — Store patterns and learnings for future reference
- `memory_query` — Query past patterns before starting work
- Always store successful patterns after task completion

## Best Practices

1. **Test Pyramid**: 70% unit, 20% integration, 10% e2e
2. **AAA Pattern**: Arrange-Act-Assert for clear test structure
3. **One assertion per test**: Test one behavior at a time
4. **Descriptive names**: `should_returnValue_when_condition`
5. **Mock at boundaries**: Only mock external dependencies
6. **Edge cases first**: Test boundary conditions, not just happy paths
197 changes: 124 additions & 73 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,106 +1,149 @@
name: Deploy to GitHub Pages

# Builds the React main site + Rust/WASM Leptos forum client and deploys
# both to GitHub Pages (dreamlab-ai.com).
#
# Layout:
# / → React marketing site
# /community/ → Leptos forum (Rust WASM)
#
# Rollback: revert the merge commit or reset main to `pre-rust-deploy` tag.

on:
push:
branches:
- main
workflow_dispatch:

env:
CARGO_TERM_COLOR: always
# Production API URLs — baked into WASM via option_env!() at compile time
VITE_RELAY_URL: 'wss://dreamlab-nostr-relay.solitary-paper-764d.workers.dev'
VITE_AUTH_API_URL: 'https://dreamlab-auth-api.solitary-paper-764d.workers.dev'
VITE_POD_API_URL: 'https://dreamlab-pod-api.solitary-paper-764d.workers.dev'
VITE_SEARCH_API_URL: 'https://dreamlab-search-api.solitary-paper-764d.workers.dev'
VITE_LINK_PREVIEW_API_URL: 'https://dreamlab-link-preview.solitary-paper-764d.workers.dev'
# Forum base path for leptos_router (sub-directory deployment)
FORUM_BASE: '/community'

jobs:
build-and-deploy:
if: github.repository == 'DreamLab-AI/dreamlab-ai-website'
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Check out the code
uses: actions/checkout@v3
# persist-credentials defaults to true, so we can drop the override.
uses: actions/checkout@v4

- name: Use Node
uses: actions/setup-node@v3
# ── React main site ────────────────────────────────────────────────
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
node-version: '20'
cache: 'npm'

- name: Install dependencies
run: npm install

- name: Create .env file
run: |
echo "VITE_SUPABASE_URL=${{ secrets.VITE_SUPABASE_URL }}" > .env
echo "VITE_SUPABASE_ANON_KEY=${{ secrets.VITE_SUPABASE_ANON_KEY }}" >> .env
- name: Install Node dependencies
run: npm ci

- name: Prepare team data
run: |
mkdir -p public/data/team
if [ -d "src/data/team" ]; then
cp -rv src/data/team/* public/data/team/
echo "Copied team data from src to public"
ls -la public/data/team/
fi

- name: Build
- name: Build React main site
run: npm run build

- name: Create .nojekyll file
run: touch dist/.nojekyll
# ── Rust/WASM forum client ─────────────────────────────────────────
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown

- name: Copy 404.html
- name: Cache Cargo registry + build artifacts
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
community-forum-rs/target
key: ${{ runner.os }}-cargo-${{ hashFiles('community-forum-rs/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-

- name: Install Trunk
run: |
if [ -f "public/404.html" ]; then
cp public/404.html dist/404.html
echo "✅ 404.html copied to dist"
else
echo "❌ 404.html not found in public directory"
fi

- name: Copy all data files to dist
TRUNK_VERSION="0.21.12"
curl -fsSL "https://github.com/trunk-rs/trunk/releases/download/v${TRUNK_VERSION}/trunk-x86_64-unknown-linux-gnu.tar.gz" \
| tar xz -C /usr/local/bin
trunk --version

- name: Build Leptos forum with Trunk
working-directory: community-forum-rs/crates/forum-client
run: trunk build --release --public-url /community/

# ── Combine outputs ────────────────────────────────────────────────
- name: Merge React + Forum into dist/
run: |
echo "Copying all public/data to dist/data..."
mkdir -p dist/data
cp -rv public/data/* dist/data/ || echo "No data to copy"
# React build already in dist/
# Copy forum output into dist/community/
mkdir -p dist/community
cp -r community-forum-rs/dist/* dist/community/

echo "Contents of dist/data:"
find dist/data -type f | head -20
echo "=== React site ==="
ls dist/index.html dist/assets/ | head -5

echo "Video files in dist/data/media/videos:"
ls -la dist/data/media/videos/ || echo "No video files found"
echo "=== Forum (community/) ==="
ls dist/community/

echo "Thumbnail files in dist/data/media:"
ls -la dist/data/media/*-thumb.jpg || echo "No thumbnail files found"
- name: Inject runtime env config into forum
run: |
ENV_SCRIPT='<script>window.__ENV__={VITE_RELAY_URL:"'"$VITE_RELAY_URL"'",VITE_AUTH_API_URL:"'"$VITE_AUTH_API_URL"'",VITE_POD_API_URL:"'"$VITE_POD_API_URL"'",VITE_SEARCH_API_URL:"'"$VITE_SEARCH_API_URL"'",VITE_LINK_PREVIEW_API_URL:"'"$VITE_LINK_PREVIEW_API_URL"'"};</script>'
sed -i "s|</head>|${ENV_SCRIPT}</head>|" dist/community/index.html
echo "Injected window.__ENV__ into forum index.html"

- name: Verify build artifacts
- name: Create GitHub Pages SPA routing files
run: |
echo "Verifying team data:"
ls -la dist/data/team/ || echo "dist/data/team directory not found!"

echo "Verifying video files:"
if [ -d "dist/data/media/videos" ]; then
echo "✅ Videos directory exists"
ls -la dist/data/media/videos/
else
echo "❌ Videos directory missing"
fi

echo "Verifying thumbnail files:"
if ls dist/data/media/*-thumb.jpg 1> /dev/null 2>&1; then
echo "✅ Thumbnail files exist:"
ls -la dist/data/media/*-thumb.jpg
else
echo "❌ Thumbnail files missing"
fi

if [ -f "dist/data/team/06.md" ]; then
echo "✅ 06.md exists in build output"
else
echo "❌ 06.md missing from build output"
fi
if [ -f "dist/data/team/06.png" ]; then
echo "✅ 06.png exists in build output"
else
echo "❌ 06.png missing from build output"
fi
# Smart 404.html: routes /community/* to the forum SPA,
# all other paths to the React SPA.
cat > dist/404.html << 'REDIRECT_EOF'
<!DOCTYPE html>
<html><head><meta charset="utf-8"><title>Redirecting...</title>
<script>
(function(){
var loc = window.location;
var path = loc.pathname;
if (path.startsWith('/community')) {
// Route to forum SPA — encode sub-path as query param
var sub = path.slice('/community'.length) || '/';
loc.replace(
loc.protocol + '//' + loc.host +
'/community/?__p=' + encodeURIComponent(sub + loc.search + loc.hash)
);
} else {
// Route to React SPA — standard SPA redirect
loc.replace(
loc.protocol + '//' + loc.host +
'/?__p=' + encodeURIComponent(path + loc.search + loc.hash)
);
}
})();
</script>
</head><body></body></html>
REDIRECT_EOF

# Forum also needs its own 404.html for direct community/ sub-paths
cp dist/community/index.html dist/community/404.html

# Prevent Jekyll processing
touch dist/.nojekyll

echo "SPA routing files created"

- name: Inject React SPA redirect pickup
run: |
# Add redirect pickup script to React index.html (before </head>)
PICKUP='<script>(function(){var q=new URLSearchParams(window.location.search);var r=q.get("__p");if(r){q.delete("__p");var s=q.toString();history.replaceState(null,"",r+(s?"?"+s:""));}})();</script>'
sed -i "s|</head>|${PICKUP}</head>|" dist/index.html
echo "Injected SPA redirect pickup into React index.html"

# ── Deploy ─────────────────────────────────────────────────────────
- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
Expand All @@ -109,4 +152,12 @@ jobs:
publish_branch: gh-pages
force_orphan: true
cname: dreamlab-ai.com
commit_message: "Deploy from GitHub Actions ${{ github.sha }}"
commit_message: "Deploy React + Leptos forum from ${{ github.sha }}"

- name: Deploy to Cloudflare Pages
if: vars.CLOUDFLARE_PAGES_ENABLED == 'true'
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy dist/ --project-name=dreamlab-ai --commit-dirty=true
Loading