Skip to content

eladjak/Haderech-Next

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

93 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⭐ If you find this project useful, please star it! ⭐

🇮🇱 עברית

🛣️ HaDerech - Advanced Learning Platform

📝 Description

HaDerech is an advanced learning platform combining an interactive simulator, community forum, and online courses. The platform is designed to help users develop professional and personal skills through experiential and interactive learning.

Read documentation in English

🚀 Key Features

  • Course System - Interactive courses with support for video, text, and exercises
  • Community Forum - Advanced forum with category, tag, and search support
  • Practice Simulator - Interactive training environment with real-time feedback
  • Achievement System - Points system, badges, and achievements
  • Modern User Interface - Clean, modern design with full RTL support

🔄 Recent Updates

  • Next.js 14 Compatibility - Updated API routes to use Next.js 14 standards:
    • Removed unnecessary "use client" directives from API files
    • Updated Supabase client from createServerClient to createRouteHandlerClient
    • Standardized Database type imports
    • See detailed documentation

🛠 Technologies

  • Frontend: Next.js 14, React 18, TypeScript
  • UI Components: Shadcn UI, Radix UI
  • Styling: Tailwind CSS
  • Database: Supabase (PostgreSQL)
  • Authentication: NextAuth.js, Supabase Auth
  • State Management: React Context, TanStack Query
  • Testing: Vitest, Jest, Playwright
  • Linting: ESLint, Prettier
  • CI/CD: GitHub Actions, Vercel

📋 System Requirements

  • Node.js 18.0.0 or higher
  • pnpm 8.0.0 or higher
  • Supabase account or self-hosted instance

⚙️ Installation

  1. Clone the project:
git clone https://github.com/your-username/haderech-next.git
cd haderech-next
  1. Install dependencies:
pnpm install
  1. Set up environment variables:
cp .env.example .env.local

Update .env.local with appropriate values, especially the Supabase configuration.

Note about environment variables:
The application has a sophisticated environment variable management system that distinguishes between critical variables (required in all environments) and optional variables (only required in development or with reduced functionality). See Environment Variables Documentation for details about our approach.

Critical variables (required in all environments):

  • NEXT_PUBLIC_SUPABASE_URL
  • NEXT_PUBLIC_SUPABASE_ANON_KEY

For development, most other variables are required. In production, many are optional with fallback mechanisms in place.

  1. Run the development server:
pnpm dev
  1. Build for production:
pnpm build

🏗️ Project Structure

haderech-next/
├── src/                   # Source code
│   ├── app/               # Next.js App Router pages and layouts
│   ├── components/        # Reusable UI components
│   ├── config/            # Configuration files
│   ├── constants/         # Application constants
│   ├── contexts/          # React Context providers
│   ├── hooks/             # Custom React hooks
│   ├── lib/               # Core libraries and utilities
│   ├── locales/           # Internationalization files
│   ├── models/            # Data models
│   ├── providers/         # Service providers
│   ├── services/          # Business logic services
│   ├── store/             # State management
│   ├── styles/            # Global styles
│   ├── tests/             # Test files
│   ├── types/             # TypeScript type definitions
│   └── utils/             # Utility functions
├── public/                # Static assets
├── prisma/                # Database schema and migrations
├── tests/                 # Additional tests
├── docs/                  # Documentation
└── supabase/              # Supabase configuration

📚 Documentation

🔍 Development

Type Checking

pnpm type-check

TypeScript Error Fixes

The project includes several Python scripts to help with common TypeScript errors:

  • scripts/code-fixes/run_all_fixes.py - Runner script for all code fixes
  • scripts/code-fixes/fix_type_files.py - Fixes issues in TypeScript type files (interfaces, types)
  • scripts/code-fixes/fix_component_files.py - Fixes common issues in React component files
  • scripts/code-fixes/fix_test_files.py - Fixes issues in test files
  • scripts/code-fixes/fix_ui_components.py - Fixes issues in UI component files
  • scripts/code-fixes/fix_api_and_models.py - Fixes issues in API and model files
  • scripts/code-fixes/fix_forum_and_store.py - Fixes issues in forum and store files
  • scripts/code-fixes/fix_imports_and_semis.py - Fixes import order and unnecessary semicolons

To run all fixes:

python scripts/code-fixes/run_all_fixes.py

Or run individual scripts:

python scripts/code-fixes/fix_type_files.py

For more details, see the Code Correction Documentation.

Unit Tests

pnpm test

E2E Tests

pnpm test:e2e

Linting

pnpm lint

Development Server

pnpm dev

Production Build

pnpm build

🗄️ Database

This project uses Supabase for database, authentication, and storage. The database schema is defined in the Supabase dashboard or through migration files.

Supabase CLI Commands:

# Generate TypeScript types from Supabase
pnpm supabase gen types typescript --project-id <your-project-id> --schema public > src/types/supabase.ts

# Start local Supabase
pnpm supabase start

# Apply local migrations
pnpm supabase db push

📈 Quality Metrics

Performance

  • Initial load time: < 2 seconds
  • First Contentful Paint: < 1 second
  • Time to Interactive: < 3 seconds
  • Lighthouse score: > 90

Accessibility

  • WCAG score: AA
  • Lighthouse accessibility score: > 90
  • ARIA coverage: 100%
  • Full keyboard support

Security

  • OWASP compliance
  • Zero critical vulnerabilities
  • Package freshness: 100%
  • Security coverage: > 95%

🤝 Contributing

  1. Fork the project
  2. Create a new branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

This project is distributed under the MIT License. See the LICENSE file for more information.

👥 Team

  • Elad Jacobi - Founder and Lead Developer

📞 Contact


הדרך - פלטפורמת למידה מתקדמת

הדרך היא פלטפורמת למידה אינטראקטיבית המאפשרת לפתח כישורים מקצועיים דרך קורסים, פורומים קהילתיים, וסימולטורים.

תכונות מרכזיות

  • מערכת קורסים: קורסים מובנים עם וידאו, טקסט ותרגולים אינטראקטיביים
  • פורום קהילתי: לשאלות, דיונים ושיתוף ידע
  • סימולטור תרגול: להתנסות בתרחישים מציאותיים
  • מערכת הישגים: מעקב אחר התקדמות ופרסים וירטואליים
  • ממשק משתמש מודרני: חוויית משתמש נוחה ונגישה

טכנולוגיות

הפרויקט משתמש בטכנולוגיות המתקדמות ביותר:

  • Next.js 14: עם App Router לניהול דפים ונתיבים
  • React 18: לממשק משתמש תגובתי ומודרני
  • TypeScript: לכתיבת קוד יציב ומתוחזק
  • Tailwind CSS: לעיצוב מהיר ומותאם
  • Supabase: לניהול משתמשים, אימות, ובסיס נתונים
  • Redux Toolkit: לניהול מצב אפליקציה
  • OpenAI API: לאלמנטים מבוססי בינה מלאכותית
  • ShadcnUI & Radix UI: לקומפוננטות נגישות

דרישות מערכת

  • Node.js 18.0.0 ומעלה
  • pnpm 8.0.0 ומעלה
  • חשבון Supabase

התקנה

  1. שכפל את הפרויקט:
git clone https://github.com/yourusername/haderech-next.git
cd haderech-next
  1. התקן את התלויות:
pnpm install
  1. הגדר משתני סביבה:
cp .env.example .env.local

Update .env.local with appropriate values, especially the Supabase configuration.

Note about environment variables:
The application has a sophisticated environment variable management system that distinguishes between critical variables (required in all environments) and optional variables (only required in development or with reduced functionality). See Environment Variables Documentation for details about our approach.

Critical variables (required in all environments):

  • NEXT_PUBLIC_SUPABASE_URL
  • NEXT_PUBLIC_SUPABASE_ANON_KEY

For development, most other variables are required. In production, many are optional with fallback mechanisms in place.

  1. הפעל את שרת הפיתוח:
pnpm dev
  1. בנה לסביבת ייצור:
pnpm build
pnpm start

מבנה הפרויקט

haderech-next/
├── docs/               # תיעוד פרויקט
├── lib/                # קוד משותף וספריות
├── public/             # קבצים סטטיים
├── src/
│   ├── app/            # רכיבי דפים ונתיבי API
│   ├── components/     # רכיבי React משותפים
│   ├── constants/      # קבועים וערכים מוגדרים מראש
│   ├── hooks/          # React hooks מותאמים
│   ├── lib/            # פונקציות שירות וכלים
│   ├── store/          # Redux store וslices
│   ├── styles/         # קבצי CSS
│   ├── tests/          # בדיקות אוטומטיות
│   └── types/          # הגדרות TypeScript
├── .env.example        # דוגמה למשתני סביבה
├── .eslintrc.js        # תצורת ESLint
├── next.config.js      # תצורת Next.js
├── package.json        # תלויות פרויקט
└── tsconfig.json       # תצורת TypeScript

קישורי תיעוד

פיתוח

# בדיקת טיפוסים
pnpm type-check

# הרצת בדיקות יחידה
pnpm test

# הרצת בדיקות קצה-לקצה
pnpm test:e2e

# בדיקות לינט
pnpm lint

# שרת פיתוח
pnpm dev

בסיס נתונים

הפרויקט משתמש ב-Supabase לניהול בסיס נתונים, אימות משתמשים ואחסון.

# התקנת CLI של Supabase
npm install -g supabase

# התחברות לפרויקט
supabase login
supabase link --project-ref <your-project-id>

# דחיפת סכמה לבסיס הנתונים
supabase db push

מדדי איכות

  • ביצועים: עמידה בסטנדרטים של Web Vitals (LCP < 2.5s, FID < 100ms, CLS < 0.1)
  • נגישות: תאימות ל-WCAG 2.1 AA
  • אבטחה: בדיקות אבטחה סדירות וטיפול בסיכונים

תרומה לפרויקט

  1. צור Fork של הפרויקט
  2. צור ענף חדש (git checkout -b feature/amazing-feature)
  3. בצע את השינויים שלך
  4. דחוף לענף (git push origin feature/amazing-feature)
  5. פתח בקשת משיכה (Pull Request)

רישיון

הפרויקט מופץ תחת רישיון MIT. ראה קובץ LICENSE לפרטים נוספים.

צוות

  • אלעד יעקבי - מייסד ומפתח ראשי - GitHub

יצירת קשר

About

פלטפורמת למידה חדשנית למציאת זוגיות מאושרת

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors