An e-learning platform where students can browse and enroll in courses, teachers can create and manage their content, and managers oversee the platform.
Backend — learnhub-api
- Java 17 + Spring Boot 3.4.1
- Spring Security with JWT authentication
- Spring Data JPA + MySQL
- AWS S3 for file/video storage
- Spring Mail for email notifications
- Springdoc OpenAPI (Swagger UI)
Frontend — learnhub-ui
- React 18 + TypeScript + Vite
- React Router v7
- Formik + Yup for forms and validation
- Axios for API communication
- CKEditor5 for rich text editing
- Chart.js for analytics dashboards
LearnHub/
├── learnhub-api/ # Spring Boot REST API
│ └── src/main/java/com/learnhub/
│ ├── auth/ # Authentication & JWT
│ ├── course/ # Courses, chapters, categories, reviews
│ ├── enrollment/ # Student enrollment
│ ├── payment/ # Payment processing
│ ├── notification/# Notifications
│ ├── user/ # Students, teachers, managers
│ ├── aws/ # S3 file upload
│ └── contact/ # Contact form
└── learnhub-ui/ # React frontend
└── src/
├── pages/ # Route pages (public, auth)
├── layouts/ # Page layouts
├── hooks/ # Custom React hooks
├── api/ # Axios API clients
├── types/ # TypeScript types
└── utils/ # Utility functions
- Java 17+
- Node.js 18+
- MySQL 8+
- AWS S3 bucket (for file storage)
- Create a MySQL database and configure
learnhub-api/src/main/resources/application.properties:
spring.datasource.url=jdbc:mysql://localhost:3306/learnhub
spring.datasource.username=<your-username>
spring.datasource.password=<your-password>
spring.mail.username=<your-email>
spring.mail.password=<your-app-password>
aws.s3.bucket=<your-bucket-name>
aws.access-key=<your-access-key>
aws.secret-key=<your-secret-key>
aws.region=<your-region>
app.jwt.secret=<your-jwt-secret>- Run the API:
cd learnhub-api
./mvnw spring-boot:runThe API will be available at http://localhost:8080.
Swagger UI: http://localhost:8080/swagger-ui.html
cd learnhub-ui
npm install
npm run devThe app will be available at http://localhost:5173.
| Role | Capabilities |
|---|---|
| Student | Browse courses, enroll, watch content, leave reviews |
| Teacher | Create and manage courses, chapters, and materials |
| Manager | Oversee platform, manage users and content |