A modern, interactive web application for learning web development technologies including HTML, CSS, and JavaScript in the Sinhala language. Built with React, TypeScript, and Vite.
- Interactive Learning Platform: Structured courses for HTML, CSS, and JavaScript
- AI-Powered Chat Assistant: Get help with coding questions through an integrated AI chatbot
- User Authentication: Complete authentication system with:
- User registration and login
- Email verification (OTP)
- Password reset functionality
- Protected routes for authenticated users
- User Profiles: Personalized user profile management
- Certificate Generation: Download certificates upon course completion
- Responsive Design: Built with Tailwind CSS for a modern, mobile-friendly interface
- Course Progress Tracking: Monitor your learning journey
- Framework: React 19.2.0
- Language: TypeScript 5.9.3
- Build Tool: Vite 7.2.2
- Styling: Tailwind CSS 4.1.17
- State Management: Redux Toolkit 2.11.0
- Routing: React Router DOM 7.9.6
- HTTP Client: Axios 1.13.2
- UI Icons: Lucide React 0.553.0
- Notifications: React Hot Toast 2.6.0
A live demo of the application is available at: Language Hub Live Demo
Make sure to also check out the Backend repository for this project: Language Hub Backend
- Node.js (v18 or higher recommended)
- npm or yarn package manager
- Backend API running on
http://localhost:5000(see API configuration)
-
Clone the repository (if not already cloned):
git clone https://github.com/hasinduudara/RAD_Final_Project_Frontend.git cd "Language Hub/frontend"
-
Install dependencies:
npm install
-
Configure environment (if needed):
- The API base URL is set to
http://localhost:5000/api/v1by default - Update
src/services/api.tsif your backend runs on a different port
- The API base URL is set to
Start the development server with hot-reload:
npm run devThe application will be available at http://localhost:5173 (default Vite port).
Build the application for production:
npm run buildThe optimized build will be created in the dist folder.
Preview the production build locally:
npm run previewRun ESLint to check code quality:
npm run lintfrontend/
βββ public/ # Static assets
β βββ vite.svg
βββ src/
β βββ assets/ # Images and static resources
β β βββ CSS.png
β β βββ HTML.png
β β βββ JavaScript.png
β β βββ HTML/ # Course-specific images
β βββ components/ # Reusable React components
β β βββ html/ # HTML course components
β β βββ css/ # CSS course components
β β βββ js/ # JavaScript course components
β β βββ Header.tsx
β β βββ Footer.tsx
β β βββ ChatWindow.tsx
β β βββ ChatList.tsx
β β βββ CertificateDownloader.tsx
β βββ context/ # React Context providers
β β βββ userContext.tsx
β βββ pages/ # Page components
β β βββ WelcomePage.tsx
β β βββ LoginPage.tsx
β β βββ RegisterPage.tsx
β β βββ ForgotPasswordPage.tsx
β β βββ VerifyOTPPage.tsx
β β βββ ResetPasswordPage.tsx
β β βββ HomePage.tsx
β β βββ ProfilePage.tsx
β β βββ ChatPage.tsx
β βββ routes/ # Routing configuration
β β βββ AppRoutes.tsx
β β βββ ProtectedRoute.tsx
β βββ services/ # API service layer
β β βββ api.ts # Axios instance and interceptors
β β βββ user.ts # User-related API calls
β β βββ chat.ts # Chat API calls
β β βββ course.ts # Course API calls
β β βββ uploadImage.ts
β βββ App.tsx # Root component
β βββ main.tsx # Application entry point
β βββ index.css # Global styles
βββ package.json
βββ vite.config.ts # Vite configuration
βββ tsconfig.json # TypeScript configuration
βββ eslint.config.js # ESLint configuration
- Registration: New users register with email and password
- OTP Verification: Users verify their email via OTP
- Login: Authenticated users receive access and refresh tokens
- Protected Routes: Certain routes require authentication
- Token Refresh: Automatic token refresh on expiration
- Password Reset: Users can reset forgotten passwords via email
- HTML Course: Learn the fundamentals of HTML structure, tags, and best practices
- CSS Course: Master styling, layouts, and responsive design
- JavaScript Course: Understand programming concepts, DOM manipulation, and modern JS features
/- Welcome/Landing page/login- User login/register- New user registration/forgot-password- Password reset request/verify-otp- Email verification/reset-password- Password reset confirmation
/home- Dashboard/Home page/profile- User profile management/ai- AI chat assistant/html-course- HTML learning course/css-courses- CSS learning course/javascript-courses- JavaScript learning course
- Centralized axios instance with interceptors
- Automatic token attachment for authenticated requests
- Token refresh logic on 401 responses
- Public endpoint handling
- Redux Toolkit for global state management
- User context for authentication state
- Tailwind CSS utility classes
- Mobile-first approach
- Modern UI with Lucide React icons
The project uses ESLint with TypeScript and React plugins for code quality. Configuration includes:
- React Hooks rules
- React Refresh plugin
- TypeScript ESLint parser
TypeScript is configured with strict mode for enhanced type safety and better developer experience.
| Script | Description |
|---|---|
npm run dev |
Start development server |
npm run build |
Build for production |
npm run preview |
Preview production build |
npm run lint |
Run ESLint |
- Fork the repository
- Create a 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
This project is private and not currently licensed for public use.
For a complete list of dependencies, see package.json.
- React 19.2.0: UI library
- TypeScript 5.9.3: Type safety
- Vite 7.2.2: Build tool and dev server
- React Router DOM 7.9.6: Routing
- Redux Toolkit 2.11.0: State management
- Tailwind CSS 4.1.17: Styling framework
- Axios 1.13.2: HTTP client
- React Hot Toast 2.6.0: Toast notifications
For support, email hasiduudara@gmail.com or open an issue in the repository.
Built with β€οΈ for aspiring web developers