Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
4af0b5a
feat: Implement synchronous quiz generation with webhook integration
sdcharly Aug 20, 2025
e6f8796
feat: Implement comprehensive UI design system and enhanced quiz revi…
sdcharly Aug 20, 2025
47d843e
feat: Implement comprehensive quiz management system with delete/arch…
sdcharly Aug 20, 2025
7c55f62
feat: Comprehensive educator dashboard improvements and student manag…
sdcharly Aug 20, 2025
ef20708
feat: Comprehensive UI redesign and timezone implementation
sdcharly Aug 20, 2025
ef4e26a
Production ready: Add Vercel deployment configuration and security en…
sdcharly Aug 20, 2025
a89fa2c
feat: Implement comprehensive super admin control system
sdcharly Aug 21, 2025
61f1eee
Fix Vercel deployment: Remove pnpm-lock.yaml and ensure npm is used
sdcharly Aug 21, 2025
91dd75c
Move @types/jsonwebtoken to dependencies for Vercel deployment
sdcharly Aug 21, 2025
3808fdb
Update .env.example with latest environment variables
sdcharly Aug 21, 2025
96bcb5e
Rename project from agentic-coding-starter-kit to bible-quiz-1
sdcharly Aug 21, 2025
0619271
Delete quiz2.zip
sdcharly Aug 21, 2025
1954acd
feat: Implement async quiz generation with n8n webhook callback pattern
sdcharly Aug 21, 2025
8d354d4
feat: Implement async pattern for question replacement
sdcharly Aug 21, 2025
13369ee
fix: Extend polling duration and improve UX for async operations
sdcharly Aug 21, 2025
e5b23eb
fix: Add safety checks to prevent question duplication during replace…
sdcharly Aug 21, 2025
fce2b6a
feat: Add super admin login link and enhance documentation
sdcharly Aug 21, 2025
f0ba47e
fix: Resolve persistent error notifications and database handling issues
sdcharly Aug 21, 2025
ae538eb
fix: Eliminate race conditions in quiz generation and question replac…
sdcharly Aug 21, 2025
88b6794
fix: Simplify student onboarding and enforce educator-student boundaries
sdcharly Aug 21, 2025
2d9e380
fix: Move scripts outside src directory to prevent build errors
sdcharly Aug 21, 2025
944b238
fix: Improve modal layout and organization for student assignment
sdcharly Aug 21, 2025
ea9b064
fix: Add missing student quiz enrollment endpoint
sdcharly Aug 21, 2025
5377ce5
Delete scripts directory
sdcharly Aug 21, 2025
5bb93ab
feat: Implement comprehensive timezone handling and user context system
sdcharly Aug 21, 2025
ece5296
fix: Fix UserContext client-side error handling
sdcharly Aug 21, 2025
ef756bd
fix: Fix infinite loop in quiz create page
sdcharly Aug 21, 2025
582bc79
fix: Fix 'Invalid time value' error in timezone functions
sdcharly Aug 21, 2025
e58fe95
fix: Resolve webhook communication issues between app and n8n
sdcharly Aug 21, 2025
7c72dc0
fix: Major improvements to quiz generation system and UI/UX enhancements
sdcharly Aug 21, 2025
f25d256
feat: Complete super admin settings panel and biblical email theming
sdcharly Aug 22, 2025
4973b03
feat: Add comprehensive webhook debugging and logging system
sdcharly Aug 22, 2025
965588d
fix: Remove hardcoded API key and add proper environment variable val…
sdcharly Aug 22, 2025
5202cec
docs: Update TODO list to mark LIGHTRAG API key security fix as compl…
sdcharly Aug 22, 2025
1e93eb5
fix: Add enhanced debugging for question replacement flow
sdcharly Aug 22, 2025
7c86571
fix: Prevent students from accessing quiz results before duration exp…
sdcharly Aug 22, 2025
bb53b7e
chore: Remove deleted files from git tracking
sdcharly Aug 22, 2025
08821ed
fix: Map question types to proper Bloom's taxonomy levels
sdcharly Aug 22, 2025
05db3d1
feat: Implement Permission Templates and Performance Optimizations
sdcharly Aug 22, 2025
7d211fe
fix: Resolve TypeScript and ESLint errors for successful build
sdcharly Aug 22, 2025
f703230
feat: Complete Vercel Analytics and Speed Insights integration
sdcharly Aug 22, 2025
b3ffb54
feat: Add quiz reassignment functionality for missed attempts
sdcharly Aug 23, 2025
42768b3
fix: Fix quiz share link login redirect issue
sdcharly Aug 23, 2025
22e2e55
fix: Complete share link routing fixes and signup flow improvements
sdcharly Aug 23, 2025
3525f30
fix: Improve admin panel navigation and reduce unnecessary redirects
sdcharly Aug 23, 2025
f1753e2
fix: Add missing navigation header to admin performance dashboard
sdcharly Aug 23, 2025
53ff15b
feat: Implement comprehensive student group management system
sdcharly Aug 23, 2025
6e3e903
feat: Major UX improvements and bug fixes for quiz system
sdcharly Aug 23, 2025
94e8b57
fix: Remove WebSocket and implement reliable polling-only solution fo…
sdcharly Aug 23, 2025
db0aaad
fix: Resolve ESLint errors for production build
sdcharly Aug 23, 2025
9bf406d
fix: Resolve TypeScript build error in create-deferred route
sdcharly Aug 23, 2025
3468841
fix: Address nullable startTime and TypeScript issues for deferred sc…
sdcharly Aug 23, 2025
e2bdbfc
fix: Resolve all TypeScript build errors for deployment
sdcharly Aug 23, 2025
85d623a
CRITICAL FIX: Prevent users from starting quizzes before scheduled time
sdcharly Aug 23, 2025
194e807
UI/UX: Implement compact design system with mobile-first responsive l…
sdcharly Aug 24, 2025
bf0fe84
Debug: Enhance document status checking logic
sdcharly Aug 24, 2025
041bf4f
FIXED: Document status detection for LightRAG processed documents
sdcharly Aug 24, 2025
63bd91f
Add document status update utility for existing documents
sdcharly Aug 24, 2025
74dd684
CRITICAL FIX: Document track_id handling and status detection
sdcharly Aug 24, 2025
1bdb4ec
docs: Add LightRAG API documentation to CLAUDE.md
sdcharly Aug 24, 2025
d0138f7
DEBUG: Enhanced document ID tracking and status detection
sdcharly Aug 24, 2025
e8933d7
CRITICAL FIX: Ensure proper LightRAG document ID handling
sdcharly Aug 24, 2025
7fdda48
Add debug endpoints for checking user timezones
sdcharly Aug 24, 2025
bc093c6
chore: Clean up test scripts and debug endpoints after timezone fixes
sdcharly Aug 24, 2025
ba5f732
Fix admin documents API - add comprehensive logging and error handlin…
sdcharly Aug 24, 2025
aaf19c0
Fix admin documents API authentication
sdcharly Aug 24, 2025
ddf79a4
Fix TypeScript errors in debug route
sdcharly Aug 24, 2025
bfb9bd5
Fix question replacement error popup issue
sdcharly Aug 24, 2025
645c69b
Improve Create Quiz button prominence and spacing on documents page
sdcharly Aug 24, 2025
eb4e001
Fix LightRAG document status checking using correct ID system
sdcharly Aug 24, 2025
f667705
CRITICAL FIX: Ensure proper ID handling in upload flow
sdcharly Aug 24, 2025
a5392a4
Add comprehensive LightRAG API documentation
sdcharly Aug 24, 2025
ec8b2fd
CRITICAL FIX: Ensure webhook operations only use document_id, never t…
sdcharly Aug 24, 2025
26c2b01
Fix LightRAG document ID truncation issue
sdcharly Aug 24, 2025
5415b87
Fix completion date display showing 01/01/1970 for failed quiz attempts
sdcharly Aug 25, 2025
c83f1b4
Implement comprehensive admin dashboard enhancements and quiz managem…
sdcharly Aug 25, 2025
ed9749e
SAFETY CHECKPOINT: Before educator panel refactoring - Student panel …
sdcharly Aug 25, 2025
e4c017e
refactor(educator): Successfully refactored webhook-logs page - First…
sdcharly Aug 25, 2025
1e5c374
refactor(educator): Complete 3 pages - webhook-logs, review, documents
sdcharly Aug 25, 2025
806f46f
feat: Add shuffle options and improved validation for quiz questions
sdcharly Aug 26, 2025
52d9cbb
fix: Restore replace question modal with configuration options
sdcharly Aug 26, 2025
117521b
fix: Optimize Wisdom Journey card space usage in educator dashboard
sdcharly Aug 26, 2025
a264083
feat: Comprehensively improve educator analytics page UX and function…
sdcharly Aug 26, 2025
3b7f32b
feat: Implement comprehensive educator reminder system
sdcharly Aug 26, 2025
368ff27
feat: Implement centralized email branding system with configuration
sdcharly Aug 26, 2025
9671255
fix: resolve all import syntax errors caused by cleanup script
sdcharly Aug 26, 2025
af93731
refactor(admin): Optimize import order for better performance
sdcharly Aug 27, 2025
b22b529
feat: Add Privacy Policy, Terms of Service, and promotional email tem…
sdcharly Aug 27, 2025
065938f
docs: Clean up and consolidate project documentation
sdcharly Aug 27, 2025
be907ac
fix: Properly filter expired quizzes from student panel
sdcharly Aug 27, 2025
8ce76d9
fix: Implement professional null handling for student panel data
sdcharly Aug 27, 2025
d715519
feat: Redesign landing page with modern religious website patterns an…
sdcharly Aug 27, 2025
67c6c15
feat: Implement permission templates system for educators with dynami…
sdcharly Aug 27, 2025
23257c3
fix: Convert YouTube URLs to embed format to resolve X-Frame-Options …
sdcharly Aug 27, 2025
f86d851
feat: Clean up root folder and add quiz diagnostics & telemetry system
sdcharly Aug 27, 2025
13a7559
fix: Allow reassigned students to take quiz at their convenience
sdcharly Aug 28, 2025
a7cade0
fix: Resolve quiz page 500 error caused by SSR issues
sdcharly Aug 28, 2025
302c161
fix: Fix quiz reassignment display issue - questions now load correctly
sdcharly Aug 28, 2025
c86b16e
fix: Remove redundant quiz fetch that was causing type error
sdcharly Aug 28, 2025
9f4a61a
fix: Remove question filtering that was causing empty quiz display
sdcharly Aug 28, 2025
f840b06
fix: CRITICAL - Fix quiz questions not displaying due to Drizzle fiel…
sdcharly Aug 28, 2025
2fd2280
fix: Make quiz question mapping more robust with fallbacks
sdcharly Aug 28, 2025
279046a
Add critical debug logging for reassignment quiz issue
sdcharly Aug 28, 2025
c0b0f4a
Fix reassignment quiz visibility on dashboard
sdcharly Aug 28, 2025
99b0285
Revert to correct dashboard logic, keep enrollment map fix
sdcharly Aug 28, 2025
342f478
Fix reassignment visibility for expired quizzes
sdcharly Aug 28, 2025
73f8190
Add comprehensive debugging for blank quiz page issue
sdcharly Aug 28, 2025
0c84def
Fix blank page issues and improve quiz access system
sdcharly Aug 28, 2025
8b52874
Fix quiz enrollment status management and prevent quiz retakes
sdcharly Aug 28, 2025
05f7a7d
Optimize quiz page performance and clean up debug scripts
sdcharly Aug 28, 2025
7e4d1a2
Add CodeRabbit configuration and setup guide
sdcharly Aug 29, 2025
95b0d11
Test: Verify CodeRabbit integration with configuration
sdcharly Aug 29, 2025
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
  •  
  •  
  •  
29 changes: 27 additions & 2 deletions .claude/settings.local.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,31 @@
{
"permissions": {
"allow": [
"Bash(npm run:*)",
"Bash(mkdir:*)",
"Bash(curl:*)",
"Bash(git add:*)",
"Bash(git commit:*)",
"Bash(grep:*)",
"Bash(find:*)",
"Bash(NEXT_TELEMETRY_DISABLED=1 npm run build)",
"Bash(vercel:*)",
"Bash(git log:*)",
"Read(//tmp/**)",
"WebSearch",
"Bash(node:*)",
"Bash(npx tsc:*)",
"mcp__playwright__browser_navigate",
"mcp__playwright__browser_wait_for",
"mcp__playwright__browser_console_messages",
"mcp__playwright__browser_click",
"Bash(git push:*)",
"mcp__playwright__browser_close",
"Bash(npx ts-node:*)"
]
},
"enableAllProjectMcpServers": true,
"enabledMcpjsonServers": [
"context7"
],
"enableAllProjectMcpServers": true
]
}
133 changes: 133 additions & 0 deletions .coderabbit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
language: "en-US"
early_access: false
enable_free_tier: true

# Review Settings
reviews:
profile: "assertive" # More thorough reviews for production code
request_changes_workflow: true
high_level_summary: true
poem: false # No poems needed for professional reviews
review_status: true
collapse_walkthrough: true

# Path-specific instructions for your project structure
path_instructions:
- path: "src/components/**"
instructions: |
- Ensure all components use shadcn/ui components, never raw HTML elements
- Verify proper TypeScript types and interfaces
- Check for proper React hook dependencies
- Ensure components follow the educator-v2 patterns when applicable

- path: "src/app/api/**"
instructions: |
- Verify authentication and authorization checks
- Ensure proper error handling with try-catch blocks
- Check for SQL injection prevention with parameterized queries
- Verify no console.log statements, only logger utility usage
- Check for proper database connection handling

- path: "src/lib/**"
instructions: |
- Ensure logger utility is used instead of console statements
- Check for performance optimizations
- Verify proper error handling
- Check for proper TypeScript typing

- path: "src/app/(educator)/**"
instructions: |
- Ensure amber theme colors are used (never blue/purple)
- Verify educator-v2 components are used
- Check TabNavigation component is used for tabs
- Ensure proper loading and empty states

- path: "scripts/**"
instructions: |
- Verify environment variables are loaded with dotenv
- Check for proper database connection handling
- Ensure destructive operations have confirmation prompts
- Verify proper error handling and logging

# Auto Review Settings
auto_review:
enabled: true
drafts: false # Don't review draft PRs

# Chat Settings
chat:
auto_reply: true

# Knowledge Base
knowledge_base:
learnings:
scope: auto
issues:
scope: auto

# Tools Configuration
tools:
eslint:
enabled: true
prettier:
enabled: true
typescript:
enabled: true
biome:
enabled: false # Using ESLint/Prettier instead

# Custom Instructions
tone_instructions: |
You are reviewing code for a Next.js 14 TypeScript project with these critical requirements:

Performance:
- MUST use logger utility from @/lib/logger instead of console.log/error/warn
- Check for proper performance optimizations, especially in timezone operations

UI Standards:
- MUST use shadcn/ui components, NEVER raw HTML form elements
- Educator pages MUST use amber colors and educator-v2 components
- MUST use TabNavigation component for tabs in educator panels

Security:
- Check for SQL injection prevention with parameterized queries
- Verify no hardcoded credentials or secrets
- Ensure proper authentication checks in API routes
- Check for XSS vulnerabilities in user input handling

Database:
- Verify POSTGRES_URL is used from environment variables
- Check for proper connection handling and cleanup
- Ensure snake_case is used in raw SQL, camelCase in Drizzle ORM

TypeScript:
- Ensure proper type definitions, avoid 'any' type
- Check for proper React hook dependencies
- Verify Next.js App Router patterns are followed

LightRAG Integration:
- Verify correct usage of track_id vs document_id
- Check proper status checking flow for document processing

# Ignored Patterns
ignored_titles:
- "WIP"
- "DO NOT REVIEW"
- "[skip-review]"
- "[skip review]"
- "Debug:"

ignored_branches:
- "experimental/*"
- "temp/*"
- "test/*"

# File patterns to ignore
ignored_paths:
- "*.min.js"
- "*.min.css"
- "node_modules/**"
- ".next/**"
- "dist/**"
- "build/**"
124 changes: 124 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
# ============================================
# PRODUCTION ENVIRONMENT VARIABLES
# ============================================
# Copy this file to .env.local and fill in your values
# For Vercel deployment, add these in your Vercel dashboard

# ============================================
# DATABASE (Required)
# ============================================
# PostgreSQL connection string (use Neon, Supabase, or any PostgreSQL provider)
POSTGRES_URL=

# ============================================
# AUTHENTICATION (Required)
# ============================================
# Generate using: openssl rand -base64 32
BETTER_AUTH_SECRET=

# ============================================
# GOOGLE OAUTH (Required for social login)
# ============================================
# Get from Google Cloud Console: https://console.cloud.google.com
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=

# ============================================
# AI INTEGRATION (Required for quiz generation)
# ============================================
# OpenAI API Key from https://platform.openai.com
OPENAI_API_KEY=
OPENAI_MODEL=gpt-4o-mini

# Optional - for vector search
OPENAI_EMBEDDING_MODEL=text-embedding-3-large

# ============================================
# LIGHTRAG API (Required for document processing)
# ============================================
LIGHTRAG_API_URL=
LIGHTRAG_API_KEY=

# ============================================
# QUIZ GENERATION WEBHOOK (Required)
# ============================================
QUIZ_GENERATION_WEBHOOK_URL=

# ============================================
# EMAIL CONFIGURATION (Required for notifications)
# ============================================
# SMTP Settings
# For Gmail: Use app-specific password from https://myaccount.google.com/apppasswords
# For other providers: Use their SMTP settings
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_SECURE=false
SMTP_USER=
SMTP_PASS=
EMAIL_FROM="YourApp <[email protected]>"

# ============================================
# APPLICATION BRANDING (Required)
# ============================================
# App name and branding used in emails and UI
NEXT_PUBLIC_APP_NAME="Your App"
NEXT_PUBLIC_APP_TAGLINE="Your Biblical Knowledge Quest"
NEXT_PUBLIC_SUPPORT_EMAIL="[email protected]"

# ============================================
# ADMIN CONFIGURATION (Required)
# ============================================
# IMPORTANT: Change these in production!
# Use strong, unique passwords and keys
# Consider using a password manager to generate these
[email protected]
[email protected]
# For development: Use plain text password
SUPER_ADMIN_PASSWORD=ChangeThisStrongPassword123!
# For production: Use bcrypt hash generated by scripts/generate-admin-password-hash.js
# SUPER_ADMIN_PASSWORD_HASH=$2a$12$xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
SUPER_ADMIN_SECRET_KEY=generate-a-random-32-character-string-here
SUPER_ADMIN_2FA_ENABLED=false

# ============================================
# APPLICATION SETTINGS (Required)
# ============================================
# Your production URL (update after Vercel deployment)
NEXT_PUBLIC_APP_URL=https://your-app.vercel.app

# ============================================
# RATE LIMITING (Optional but recommended)
# ============================================
# Upstash Redis for rate limiting (get from https://upstash.com)
# Without these, in-memory rate limiting will be used (resets on restart)
UPSTASH_REDIS_REST_URL=
UPSTASH_REDIS_REST_TOKEN=

# ============================================
# DEVELOPMENT ONLY - NEVER USE IN PRODUCTION
# ============================================
# WARNING: Setting this to 'true' bypasses authentication
# This should NEVER be enabled in production environments
# NEXT_PUBLIC_DISABLE_AUTH=false

# ============================================
# FILE STORAGE (Optional)
# ============================================
# Vercel Blob storage token (if using file uploads)
BLOB_READ_WRITE_TOKEN=

# ============================================
# MONITORING (Optional but recommended)
# ============================================
# Add your monitoring service keys here
# SENTRY_DSN=
# LOGFLARE_API_KEY=

# ============================================
# NOTES
# ============================================
# 1. Never commit your actual .env file to version control
# 2. Use different values for development and production
# 3. Rotate keys and passwords regularly
# 4. Use Vercel's environment variables dashboard for production
# 5. Enable 2FA for super admin in production (SUPER_ADMIN_2FA_ENABLED=true)
10 changes: 10 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": ["next/core-web-vitals", "next/typescript"],
"rules": {
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-unused-vars": ["warn", {
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_"
}]
}
}
53 changes: 52 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,62 @@ yarn-error.log*
.pnpm-debug.log*

# env files (can opt-in for committing if needed)
.env*
.env
.env.local
.env.production
.env.development
# Keep .env.example for documentation
!.env.example

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts

# Test scripts - for local development only
scripts/tests/
# Keep the README for documentation
!scripts/README.md
!../scripts/README.md

# Test files that may contain credentials
test-*.js
test-*.ts
*test*.js
*test*.ts

# Database dumps and backups
*.sql.bak
*.db.bak
backup/
dumps/

# Log files that might contain sensitive data
logs/
*.log

# IDE and editor files that might store sensitive data
.vscode/settings.json
.idea/
*.swp
*.swo

# OS generated files
Thumbs.db
.DS_Store?
._*

# Temporary files
temp/
tmp/
*.tmp

# Phase 1 Backup Archives
scripts_backup_phase1_complete_*.tar.gz
docs_backup_phase1_complete_*.tar.gz

# Organized backup and log directories
backups/
logs/
Binary file added .playwright-mcp/quiz-final-test.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .playwright-mcp/quiz-loaded-state.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading