DREAMLAB AI CONSULTING
- -Where Creative Vision Meets Engineering Precision
- -- Transform Your Skills at the UK's Premier - Technology Training Facility -
-diff --git a/.env.example b/.env.example index 5539232..a9d9b4e 100644 --- a/.env.example +++ b/.env.example @@ -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 diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md new file mode 100644 index 0000000..383fd1b --- /dev/null +++ b/.github/copilot-instructions.md @@ -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 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index a2a7dee..538dad5 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -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='' + sed -i "s||${ENV_SCRIPT}|" 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' + +
Deep learning with no distractions
-Transform Nuclear Industry Leadership
-Through Immersive AI & VR Training
-- DreamLab AI is the UK's premier executive training facility, strategically positioned 30 minutes from Sellafield Nuclear Site in the stunning Lake District. We transform nuclear industry leaders through cutting-edge AI and VR immersive training experiences. -
- -We offer intensive 2-5 day executive training programs combining:
-Transform nuclear industry leadership through immersive AI and VR training, creating safer, more efficient operations while advancing the UK's clean energy future.
- -Premium location combining natural beauty with proximity to Sellafield Nuclear Site
-Ideal for executive training without disrupting operations
-Inspiring setting for leadership transformation
-Easy access from Manchester, London, and Scotland
-Led by industry veterans with combined expertise in:
-Cinema-quality immersive environments for realistic nuclear facility simulations
-360-degree sound for enhanced realism and situational awareness training
-Precise equipment simulation for hands-on operational training
-Sustainable operations demonstrating clean energy commitment
-Our immersive VR system enables:
-Transform your leadership approach with AI-powered decision making and predictive analytics for nuclear operations.
-Master complex nuclear procedures in our state-of-the-art VR environment with zero safety risk.
-Comprehensive program covering AI, VR, and digital innovation for nuclear industry leaders.
-Our exclusive Lake District property offers the perfect blend of comfort and focus for executive training.
- -5 premium private bedrooms with dedicated workspace areas
-Full catering facilities with private chef options
-Premium selection for evening networking
-Multiple areas for breakout sessions and informal discussions
-All packages include:
-DreamLab AI is uniquely positioned as:
-- Transform your nuclear leadership with AI-powered training at DreamLab AI. - Contact us to discuss your executive development needs. -
- -Book your executive training experience today.
-dreamlab-ai.co.uk/book
-© 2024 DreamLab AI Consulting Ltd. All rights reserved.
-Registered in England. Company No. 12345678
-{{tagline}}
-{{date}}
-{{introduction}}
- -{{vision}}
- -{{mission}}
-{{servicesIntro}}
- -{{contactIntro}}
- -{{address}}
-{{email}}
-{{phone}}
-{{website}}
-{{closingStatement}}
-Where Creative Vision Meets Engineering Precision
- -- Transform Your Skills at the UK's Premier - Technology Training Facility -
-Where AI Innovation Meets Sustainable Living
-Transform Nuclear Industry Leadership
-Through Immersive AI & VR Training
-- DreamLab AI is the UK's premier executive training facility, strategically positioned 30 minutes from Sellafield Nuclear Site in the stunning Lake District. We transform nuclear industry leaders through cutting-edge AI and VR immersive training experiences. -
- -We offer intensive 2-5 day executive training programs combining:
-Transform nuclear industry leadership through immersive AI and VR training, creating safer, more efficient operations while advancing the UK's clean energy future.
- -Premium location combining natural beauty with proximity to Sellafield Nuclear Site
-Ideal for executive training without disrupting operations
-Inspiring setting for leadership transformation
-Easy access from Manchester, London, and Scotland
-Led by industry veterans with combined expertise in:
-Cinema-quality immersive environments for realistic nuclear facility simulations
-360-degree sound for enhanced realism and situational awareness training
-Precise equipment simulation for hands-on operational training
-Sustainable operations demonstrating clean energy commitment
-Our immersive VR system enables:
-Transform your leadership approach with AI-powered decision making and predictive analytics for nuclear operations.
-Master complex nuclear procedures in our state-of-the-art VR environment with zero safety risk.
-Comprehensive program covering AI, VR, and digital innovation for nuclear industry leaders.
-Our exclusive Lake District property offers the perfect blend of comfort and focus for executive training.
- -5 premium private bedrooms with dedicated workspace areas
-Full catering facilities with private chef options
-Premium selection for evening networking
-Multiple areas for breakout sessions and informal discussions
-All packages include:
-DreamLab AI is uniquely positioned as:
-- Transform your nuclear leadership with AI-powered training at DreamLab AI. - Contact us to discuss your executive development needs. -
- -Book your executive training experience today.
-dreamlab-ai.co.uk/book
-© 2024 DreamLab AI Consulting Ltd. All rights reserved.
-Registered in England. Company No. 12345678
-Hands-on experience with our 6m × 2.5m LED volume
-Transform engineering data into compelling visualizations
-Advanced techniques for technical visualization
-Professional camera systems and tracking workflows
-End-to-end workflow implementation
-Expert guidance to identify AI opportunities and develop implementation roadmaps tailored to your business goals.
-Bespoke AI solutions built from the ground up to address your specific challenges and requirements.
-Advanced ML models for prediction, classification, and optimization across various business domains.
-Intelligent text analysis, chatbots, and language understanding systems for enhanced communication.
-JavaScript (noble/nostr-tools) vs Rust WASM (@dreamlab/nostr-core-wasm)
+ +results.json...Initializing…
+