Skip to content

Latest commit

 

History

History
332 lines (270 loc) · 10.7 KB

File metadata and controls

332 lines (270 loc) · 10.7 KB

WARP.md - Rise Journey (Yahudim.app) Project Context

Project Overview

Rise Journey is a spiritual growth application for the Yahudim community, featuring:

  • 4 Pillars: Wellness, Mental, Spiritual, Physical
  • Guided path dashboard
  • Focus mode lesson view
  • Video streaming integration
  • Scripture study tools
  • Task management
  • Journal features

Tech Stack

  • Frontend: React 19.2.0, Vite 7.2.4, Tailwind CSS 3.4.18
  • Backend: Node.js + Express (hosted on Render)
  • Database: SQLite (better-sqlite3)
  • Deployment: Frontend on yahudim.app, Backend auto-deploys from Git via Render
  • VCS: Git (main branch)

Project Structure

/home/ishaglcy/public_html/yahudim.app/
├── src/
│   ├── components/
│   │   ├── VideoStream.jsx       # Video streaming component
│   │   ├── ScriptureStudy.jsx    # Scripture reader & notes
│   │   ├── QandA.jsx             # Q&A component
│   │   └── [other components]
│   ├── config/
│   │   └── api.js                # API configuration
│   ├── App.jsx                   # Main app component
│   └── main.jsx                  # Entry point
├── api/
│   ├── server.js                 # Express backend (runs on Render)
│   └── database.js               # SQLite database utilities
├── dist/                         # Build output
├── assets/                       # Deployed static assets
├── package.json                  # Dependencies & scripts
└── vite.config.js                # Vite configuration

Build & Deploy Process

  1. Build: npm run build - Builds Tailwind + Vite, outputs to dist/
  2. Deploy Frontend: Copy dist/ contents to root and assets/
  3. Deploy Backend: Push to Git → Render auto-deploys

Recent Changes (Dec 6, 2025)

Commit: 71e424e

Features Added:

  1. Video Platform Support (VideoStream.jsx)

    • Added Google Meet (meet.google.com)
    • Added Hyperbeam (hyperbeam.com/app/room)
    • Existing: YouTube, Discord, Zoom
  2. Scripture Persistence (ScriptureStudy.jsx)

    • localStorage key: yahudim_scripture_state
    • Persists: book, startVerse, endVerse, verses[]
    • Scripture remains visible across tab switches/refreshes
  3. Markdown Export (ScriptureStudy.jsx)

    • New "📥 Export .md" button
    • Downloads notes as markdown for offline use
    • Format: # Title\n**Verse Reference:**\n## Notes\n[content]

Files Modified:

  • src/components/VideoStream.jsx
  • src/components/ScriptureStudy.jsx
  • IMPLEMENTATION_SUMMARY.md (new)

Deployment Status: ✅ Built and deployed to yahudim.app

Component Details

VideoStream.jsx

  • Purpose: Embed video streams from various platforms
  • State: streamUrl, embedUrl, streamType
  • Supported Platforms: YouTube, Discord, Zoom, Google Meet, Hyperbeam
  • Key Functions: detectStreamType(), getYouTubeEmbedUrl(), handleSubmit()

ScriptureStudy.jsx

  • Purpose: Bible verse reader with note-taking functionality
  • State:
    • Verse reader: book, startVerse, endVerse, verses[], loading, error
    • Notes: notes[], currentNote, title, verseRef, content
  • API Endpoints:
    • GET /api/notes - Load all notes
    • POST /api/notes - Create new note
    • PUT /api/notes/:id - Update note
    • DELETE /api/notes/:id - Delete note
  • External API: bible-api.com (KJV translation)
  • Key Functions:
    • loadScriptureFromStorage(), saveScriptureToStorage()
    • fetchVerses(), saveNote(), exportNoteAsMarkdown()
    • editNote(), deleteNote(), resetNoteForm()

QandA.jsx

  • Purpose: Q&A functionality
  • (Details to be documented)

Environment Variables

  • VITE_API_BASE_URL: Backend API URL (default: http://localhost:3001)
  • PORT: Backend server port (default: 3001)
  • CORS_ORIGIN: Allowed CORS origins for backend

Known Issues & TODOs

  • Document QandA.jsx component
  • Add backend API documentation
  • Document database schema
  • Add testing strategy
  • Document 4 pillars implementation

API Reference

Scripture Notes API

Base URL: Configured in import.meta.env.VITE_API_BASE_URL

Endpoints:

  • GET /api/notes - Returns all notes
  • POST /api/notes - Create note (body: {title, verse, content})
  • PUT /api/notes/:id - Update note
  • DELETE /api/notes/:id - Delete note
  • GET /health - Health check

Development Commands

# Install dependencies
npm install

# Development mode
npm run dev

# Build for production
npm run build

# Clean build
npm run build:clean

# Lint
npm run lint

# Preview build
npm run preview

# Build and deploy (automated script)
npm run deploy

Backup Files

Backup files created with .bak extension:

  • src/components/VideoStream.jsx.bak
  • src/components/ScriptureStudy.jsx.bak

Notes for AI Assistants

  • Backend runs on Render - auto-deploys from Git commits
  • Don't try to start backend locally unless needed for development
  • Always create backups before modifying components
  • Test video URLs: Use actual platform URLs for testing
  • Scripture persistence uses browser localStorage (client-side only)
  • Markdown export is client-side only (no server interaction)

Last Updated: December 6, 2025 Maintained by: AI Assistant (Warp Agent Mode)


CRITICAL ISSUE - December 6, 2025, 23:47 UTC

Problem: Vite Build Not Including Source Code Changes

Status: 🔴 UNRESOLVED - Requires Manual Investigation

Symptoms

  • Source files (src/components/VideoStream.jsx, src/components/ScriptureStudy.jsx) contain all new features
  • Git commits show features are present (commits 71e424e, 17a6548)
  • Vite builds complete successfully without errors
  • BUT: Built JavaScript bundles (dist/assets/index-*.js) do NOT contain the new features

Features Not Appearing in Build

  1. VideoStream.jsx: Google Meet and Hyperbeam URL detection

    • Source has: url.includes('meet.google.com') and url.includes('hyperbeam.com')
    • Build missing: These strings don't appear in compiled JS
  2. ScriptureStudy.jsx: localStorage persistence

    • Source has: const SCRIPTURE_STORAGE_KEY = 'yahudim_scripture_state'
    • Build missing: localStorage calls and storage key not in compiled JS
  3. ScriptureStudy.jsx: Markdown export button

    • Source has: exportNoteAsMarkdown() function and "📥 Export .md" button
    • Build missing: Export function and button text not in compiled JS

Verification Commands Used

# Source files have features (CONFIRMED ✓)
grep -c "exportNoteAsMarkdown\|SCRIPTURE_STORAGE_KEY" src/components/ScriptureStudy.jsx
# Returns: 5

grep -n "google-meet\|hyperbeam" src/components/VideoStream.jsx
# Returns: Lines 16, 17, 57

# Built files DON'T have features (PROBLEM ✗)
node -e "const fs=require('fs'); const js=fs.readFileSync('dist/assets/index-BVEm59vx.js','utf8'); console.log({hyperbeam: js.includes('hyperbeam.com'), localStorage: js.includes('localStorage'), exportMd: js.includes('Export')});"
# Returns: All false

Attempted Fixes (All Failed)

  1. ✗ Cleared dist/ directory
  2. ✗ Cleared node_modules/.vite cache
  3. ✗ Cleared node_modules/.cache
  4. ✗ Used npm run build:clean
  5. ✗ Ran npx vite build directly
  6. ✗ Rebuilt with NODE_ENV=production
  7. ✗ Added test marker to source - also didn't appear in build
  8. ✗ Staged files with git add - no effect
  9. ✗ Reset and checked out files from Git - no effect

Key Observations

  • Vite reports "✓ 4 modules transformed" (correct count)
  • Build completes in ~1.8-2.7 seconds (normal)
  • No errors or warnings during build
  • Source file line count: 355 lines (new) vs 299 lines (old backup) - CORRECT
  • Built file size: ~213KB (slightly larger than 206KB old version)
  • Size increase suggests SOME new code, but features still missing

Possible Causes

  1. Vite Cache Issue: Despite clearing, some deep cache persists
  2. Build Optimization: Tree-shaking removing "unused" code incorrectly
  3. Module Resolution: Vite reading from unexpected location
  4. React Plugin Issue: @vitejs/plugin-react not transforming correctly
  5. Symlink/Alias: Hidden file redirection (checked, none found)
  6. Git Index: Vite building from Git index instead of working dir (unlikely but tested)

Source File Status

src/components/VideoStream.jsx:
- Line 15-18: Google Meet and Hyperbeam detection ✓
- Line 57: URL handling for new platforms ✓
- className typos fixed (was classNameName) ✓

src/components/ScriptureStudy.jsx:
- Line 4: SCRIPTURE_STORAGE_KEY constant ✓
- Line 26-42: loadScriptureFromStorage() function ✓
- Line 44-50: saveScriptureToStorage() function ✓
- Line 126-141: exportNoteAsMarkdown() function ✓
- Line 300: Export button with onClick={exportNoteAsMarkdown} ✓
- Line 303: "📥 Export .md" button text ✓

Git Status

Current commit: 17a6548
Files modified in commits:
- 71e424e: Added all three features
- 8aab071: Fixed className typo
- 17a6548: Fixed semicolon syntax error

All changes are committed and pushed to origin/main ✓

Recommended Next Steps

  1. Try Different Build Tool:

    # Try Rollup directly
    npx rollup -c
  2. Check Vite Version/Config:

    # Upgrade Vite
    npm install vite@latest
    
    # Or try downgrading
    npm install vite@6.0.0
  3. Inspect Vite Transform Output:

    # Enable debug logging
    DEBUG=vite:* npm run build
  4. Manual Bundle:

    # Try esbuild directly
    npx esbuild src/main.jsx --bundle --outfile=dist/manual.js
  5. Check for Conditional Compilation:

    • Search for if (process.env or if (import.meta.env in source
    • Check .env files for build flags
  6. Nuclear Option - Reinstall Dependencies:

    rm -rf node_modules package-lock.json
    npm install
    npm run build
  7. Alternative: Use Dev Build:

    # Build without minification
    vite build --mode development

Workaround

If build issue persists, consider:

  • Deploy from a different machine/environment
  • Use Render's build process (may not have same issue)
  • Manually concatenate and minify files
  • Switch to different bundler (webpack, esbuild, parcel)

Files to Examine

  • vite.config.js - Check for unexpected plugins or config
  • package.json - Check build scripts and dependencies
  • .env files - Check for environment variables affecting build
  • node_modules/.vite/ - Inspect cache structure when it exists

Contact Info for Debug

If this needs escalation:

  • Vite version: 7.2.6
  • Node version: 22.19.0
  • React version: 19.2.0
  • OS: AlmaLinux (Linux)
  • Build command: npm run build (runs Tailwind + Vite)

Issue documented by: AI Assistant (Warp Agent Mode) Last updated: December 6, 2025, 23:47 UTC