A modern, AI-powered educational platform built with React and TypeScript, designed specifically for Algerian students and educational institutions.
- AI-Powered Content Generation: Generate exams, quizzes, and exercises with AI
- Smart Calendar & Scheduling: AI-driven schedule management and study planning
- Career Vision: Personalized opportunity recommendations based on student profile
- Resource Library: Upload and share educational resources (local files & external links)
- Study Groups: Collaborative learning with video chat integration
- Whiteboard Collaboration: Real-time drawing and collaboration with Tldraw
- Real-time Chat: AI assistant for administrative help and study guidance
- Bot Integration: Connect with Discord and Telegram bots
- Dark Mode Support: Complete theme customization
- Framework: React 18 with TypeScript
- Build Tool: Vite
- Styling: Tailwind CSS
- UI Components: Shadcn UI
- Routing: React Router v6
- State Management: React Context API
- HTTP Client: Fetch API
- AI Integration: Google Gemini 2.0
- Whiteboard: Tldraw
- Notifications: Sonner (Toast)
- PDF Generation: jsPDF
- Code Quality: Biome, ESLint
- Node.js (v18 or higher)
- npm or yarn
- Git
- Clone the repository
git clone https://github.com/Rafeeq-dz/Rafeeq-Frontend.git
cd Rafeeq-Frontend/client- Install dependencies
npm install- Set up environment variables
Create a .env file in the client directory:
# API Configuration
VITE_API_BASE_URL=http://localhost:5000
VITE_AI_BASE_URL=https://your-ai-api-url.ngrok-free.dev
# Google Gemini API (for AI features)
VITE_GEMINI_API=your_gemini_api_key_here
# Optional: Development settings
VITE_ENABLE_DEV_TOOLS=true- Start the development server
npm run devThe application will be available at http://localhost:5173
client/
βββ public/ # Static assets
β βββ icons/ # Icon files
β βββ images/ # Image assets
βββ src/
β βββ api/ # API client and configurations
β β βββ api.ts # Centralized API functions
β βββ assets/ # Application assets
β β βββ logo.svg
β β βββ logo-white.svg
β βββ components/ # Reusable components
β β βββ auth/ # Authentication components
β β βββ landing/ # Landing page components
β β βββ layout/ # Layout components
β β βββ study-groups/ # Study group components
β β βββ ui/ # Shadcn UI components
β βββ contexts/ # React Context providers
β β βββ auth-context.tsx
β βββ lib/ # Utility functions
β β βββ utils.ts
β βββ pages/ # Page components
β β βββ auth/ # Login, Register
β β βββ dashboard/ # Dashboard pages
β β β βββ overview/
β β β βββ calendar/
β β β βββ ai-hub/
β β β β βββ ai-tools/
β β β β βββ opportunities/
β β β β βββ discord-sync/
β β β βββ my-learning/
β β β β βββ courses/
β β β β βββ resources/
β β β β βββ study-groups/
β β β β βββ workspace/
β β β β βββ whiteboard/
β β β βββ settings/
β β βββ landing/ # Landing page
β βββ types/ # TypeScript type definitions
β β βββ types.ts
β βββ App.tsx # Main app component
β βββ main.tsx # Entry point
β βββ index.css # Global styles
β βββ vite-env.d.ts # Vite type definitions
βββ index.html # HTML template
βββ package.json # Dependencies and scripts
βββ tsconfig.json # TypeScript configuration
βββ vite.config.ts # Vite configuration
βββ tailwind.config.js # Tailwind CSS configuration
βββ biome.json # Biome configuration
βββ components.json # Shadcn UI configuration
# Development
npm run dev # Start development server
npm run build # Build for production
npm run preview # Preview production build
# Code Quality
npm run lint # Run ESLint
npm run format # Format code with BiomeLocation: /src/pages/dashboard/ai-hub/ai-tools/
Generate curriculum-aligned educational content:
- Exam Generator: Creates comprehensive exams with detailed corrections
- Quiz Generator: Multiple-choice quizzes with explanations
- Exercise Generator: Practice problems with step-by-step solutions
- Smart Prompting: Context-aware question generation
Supported Subjects:
- Mathematics
- Physics
- Chemistry
- Biology
- Computer Science
- Literature
- History
- Geography
Difficulty Levels:
- Beginner
- Intermediate
- Advanced
- Expert
- Baccalaureate Level
Location: /src/pages/dashboard/calendar/
AI-powered schedule management:
- Natural Language Input: Describe your routine in plain language
- AI Schedule Generation: Automatic weekly schedule creation
- Pre-built Plans: Final exams prep, balanced study, weekend intensive
- Event Management: Exams, homework, study sessions, routine activities
- Priority Levels: High, medium, low
- Visual Organization: Month/day views with color coding
Location: /src/pages/dashboard/ai-hub/opportunities/
Personalized opportunity discovery:
- AI-Matched Recommendations: Based on student profile
- Match Percentage: Shows compatibility score
- Content Filtering: Internships, events, courses, research, training
- Profile Display: Name, specialty, GPA, interests, goals, strengths
- Real-time Updates: Fetches from recommendation API
Location: /src/pages/dashboard/my-learning/resources/
University-specific resource management:
- Dual Resource Support:
- Local uploads: PDF, DOC, PPT, Images, ZIP (max 50MB)
- External links: YouTube, documents, repositories
- 17 University Subjects: Mathematics, Physics, Chemistry, Computer Science, Electronics, etc.
- Resource Types: Course materials, past exams, lecture notes, TD/TP solutions, research papers
- Tags: licence, master, TD, TP, exam, cours
- Sharing: Share resources with classmates
Location: /src/pages/dashboard/my-learning/study-groups/
Collaborative learning environment:
- Video Chat: Integrated video conferencing
- Group Management: Create and join study groups
- Shared Workspace: Collaborative study sessions
- Real-time Communication: Chat and screen sharing
Location: /src/pages/dashboard/my-learning/whiteboard/
Visual collaboration tool:
- Tldraw Integration: Professional drawing canvas
- Real-time Collaboration: Multiple users drawing simultaneously
- Tools: Pen, shapes, text, images, sticky notes
- Export Options: Save as PNG, PDF, or JSON
The application supports both light and dark modes with automatic theme switching.
Brand Colors:
- Primary Purple:
#4A3AFF - Secondary Magenta:
#DC1FFF - Dark Navy:
#0A0820 - White:
#FFFFFF
Typography:
- Font: DM Sans
- Weights: 300, 400, 500, 600, 700, 800
Dark Mode Implementation:
- Theme toggle in header
- Persistent theme preference
- Smooth transitions
- Logo variants (logo.svg / logo-white.svg)
Location: /src/contexts/auth-context.tsx
JWT-based authentication with Context API:
Auth Context Provides:
user- Current user objectlogin(user, token)- Authenticate and store tokenlogout()- Clear authenticationisAuthenticated- Boolean authentication status
Protected Routes:
<ProtectedRoute>
<YourComponent />
</ProtectedRoute>Auth Flow:
- User logs in via
/auth/login - Token stored in localStorage
- Token sent with all API requests
- Auto-redirect to dashboard on successful auth
- Logout clears token and redirects to landing
Location: /src/api/api.ts
Centralized API client with multiple modules:
authApi.login(email, password)
authApi.register(userData)
authApi.logout()courseApi.getCourses()
courseApi.getCourseById(id)
courseApi.createCourse(courseData)
courseApi.enrollInCourse(courseId)classroomApi.getClassrooms()
classroomApi.getClassroomById(id)
classroomApi.joinClassroom(classroomId)resourceApi.getResources()
resourceApi.uploadResource(formData)
resourceApi.shareResource(resourceId, userIds)// Content Generation
aiApi.generateExam(subject, numQuestions, userInput)
aiApi.generateQuiz(subject, numQuestions, userInput)
aiApi.generateExercise(subject, numQuestions, difficulty, userInput)
// Schedule Generation
aiApi.generateWeeklySchedule(userInput)
// Profiling & Recommendations
aiApi.generateUserProfile(name, age, specialty, goals, interests, yearsOfStudy)
aiApi.getRecommendations(query, contentType?, limit?)API Configuration:
- Base URL from
VITE_API_BASE_URL - AI Base URL from
VITE_AI_BASE_URL - Automatic token injection
- Error handling with toast notifications
- Ngrok header for development
Mobile-first approach with breakpoints:
- Mobile: < 768px
- Tablet: 768px - 1024px
- Desktop: > 1024px
Responsive Features:
- Collapsible sidebar on mobile
- Touch-friendly buttons and inputs
- Optimized layouts for all screen sizes
- Hamburger menu for navigation
- Bottom navigation on mobile
npm run buildOutput directory: dist/
Vercel (Recommended):
npm install -g vercel
vercel --prodNetlify:
npm install -g netlify-cli
netlify deploy --prod --dir=distStatic Hosting:
- Upload
dist/folder to any static hosting service - Configure environment variables on hosting platform
- Set up custom domain if needed
Make sure to set these environment variables on your hosting platform:
VITE_API_BASE_URLVITE_AI_BASE_URLVITE_GEMINI_API
# Run tests (when implemented)
npm run test
# Run tests with coverage
npm run test:coverageWe welcome contributions! Please follow these steps:
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Code Style:
- Follow existing code patterns
- Use TypeScript for type safety
- Write meaningful commit messages
- Add comments for complex logic
- Format code with Biome before committing
- None at the moment
| Variable | Description | Required | Default |
|---|---|---|---|
VITE_API_BASE_URL |
Backend API base URL | Yes | - |
VITE_AI_BASE_URL |
AI service base URL | Yes | - |
VITE_GEMINI_API |
Google Gemini API key | Yes | - |
VITE_ENABLE_DEV_TOOLS |
Enable development tools | No | false |
Port already in use:
# Kill process on port 5173
lsof -ti:5173 | xargs kill -9Dependencies not installing:
# Clear npm cache
npm cache clean --force
rm -rf node_modules package-lock.json
npm installBuild errors:
# Check TypeScript errors
npm run type-checkFor support, email support@rafeeq.dz or join our Discord community.
This project is proprietary and confidential. Β© 2025 Rafeeq Platform. All rights reserved.
- React Team - For the amazing framework
- Shadcn - For beautiful UI components
- Tailwind CSS - For utility-first styling
- Google - For Gemini AI API
- Tldraw - For whiteboard integration
- All Contributors - For testing and feedback
Built with β€οΈ for Algerian Students
Last Updated: December 20, 2025