A modern learning management system built with React, TypeScript, and Tailwind CSS.
- Role-based Authentication: Student, Instructor, and Admin roles
- Modern UI: Built with shadcn/ui components and Tailwind CSS
- Responsive Design: Works on desktop and mobile devices
- Real-time Updates: Live notifications and updates
- Course Management: Create, edit, and manage courses
- Assignment System: Submit and grade assignments
- Dashboard Analytics: Performance tracking and insights
- Node.js (v18 or higher)
- npm or yarn
- MongoDB database
- Backend API running on port 5000
npm install
# or
yarn installCreate a .env file in the root directory:
VITE_LOCAL_API_URL=http://localhost:5000npm run dev
# or
yarn devThe application will be available at http://localhost:8080
- Navigate to
/signup - Choose your role (Student or Instructor)
- Fill in your details
- Submit the form
- You'll be automatically redirected to your role-specific dashboard
- Navigate to
/login - Enter your email and password
- Submit the form
- You'll be redirected to your role-specific dashboard
- Students: Access to
/student/dashboardand/my-assignments - Instructors: Access to
/instructor/dashboard,/instructor/courses, etc. - Admins: Access to
/admin/dashboard
src/
├── components/ # Reusable UI components
│ ├── ui/ # shadcn/ui components
│ ├── admin/ # Admin-specific components
│ ├── dashboard/ # Dashboard components
│ └── ...
├── pages/ # Page components
├── hooks/ # Custom React hooks
├── lib/ # Utility functions and configurations
├── types/ # TypeScript type definitions
└── ...
- ✅ User registration with role selection
- ✅ User login with automatic role-based redirection
- ✅ Protected routes with role-based access control
- ✅ JWT token management with cookies
- ✅ Automatic logout on token expiration
- ✅ Student dashboard and assignments
- ✅ Instructor dashboard and course management
- ✅ Admin dashboard
- ✅ Automatic redirection based on user role
- ✅ Loading states during authentication
- ✅ Form validation and error handling
- ✅ Responsive design for all screen sizes
- ✅ Modern UI with shadcn/ui components
Make sure your backend is running on port 5000 with MongoDB connected.
- Go to
http://localhost:8080/signup - Create a new account as a Student
- Verify you're redirected to
/student/dashboard
- Go to
http://localhost:8080/login - Login with your credentials
- Verify you're redirected to the correct dashboard
- Try accessing
/instructor/dashboardas a student - Verify you're redirected to
/student/dashboard - Try accessing
/admin/dashboardas a student - Verify you're redirected to
/student/dashboard
- CORS Errors: Ensure the backend CORS configuration includes
http://localhost:8080 - Authentication Failures: Check that the backend is running and MongoDB is connected
- Route Access Issues: Verify user roles are properly set in the database
Enable debug logging by checking the browser console for:
- API request/response logs
- Authentication state changes
- Route redirection logs
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License.