Welcome to the AI Learning Platform! This project is designed to provide an interactive and engaging learning experience for users interested in artificial intelligence. The platform offers various courses, quizzes, and a chatbot to assist users in their learning journey.
The AI Learning Platform consists of a frontend built with React and a backend powered by Spring Boot. The platform allows users to browse courses, take quizzes, and interact with a chatbot for additional support. The backend provides APIs to manage users, courses, quizzes, and questions.
- Frontend: React (JSX)
- Backend: Spring Boot
- Database: MySQL
- API Testing: Postman
The backend of the AI Learning Platform provides a variety of APIs to manage users, courses, quizzes, questions, chats, emails, and authentication. Below is a detailed list of the available endpoints:
-
Get All Users
- URL:
/api/users - Method:
GET
- URL:
-
Get User by ID
- URL:
/api/users/{id} - Method:
GET
- URL:
-
Get User by Email
- URL:
/api/users/email/{email} - Method:
GET
- URL:
-
Create User
- URL:
/api/users/create - Method:
POST - Example Request:
{ "name": "John Doe", "email": "[email protected]" }
- URL:
-
Update User
- URL:
/api/users/{id} - Method:
PUT - Example Request:
{ "name": "Jane Doe", "email": "[email protected]" }
- URL:
-
Renew Student
- URL:
/api/users/renew/{userid} - Method:
GET - Example: Not Available
- URL:
(This will save to DB, and shown to frontend)
-
Create Course for User
- URL:
/api/courses/user/{userId} - Method:
POST - Example Request:
{ "title": "AI Basics", "description": "Introduction to AI", "level": "Beginner", "contents": [ { "sectionTitle": "Intro", "body": "Content here..." } ] }
- URL:
-
Get Course by ID
- URL:
/api/courses/{id} - Method:
GET - Example Request: Not Available
- URL:
-
Get Courses by User ID
- URL:
/api/courses/user/{userId} - Method:
GET - Example: Not Available
- URL:
-
Update Course
- URL:
/api/courses/{id} - Method:
PUT - Example Request:
{ "title": "Updated Course Title", "description": "Updated description", "level": "Intermediate" }
- URL:
-
Delete Course
- URL:
/api/courses/{id} - Method:
DELETE - Example: Not Available
- URL:
-
Save Quiz Report
- URL:
/api/quizzes/{course_id} - Method:
POST - Example Request:
{ "title": "AI Quiz 1", "questions": [ { "questionText": "What is AI?", "options": ["Option 1", "Option 2", "Option 3", "Option 4"], "correctAnswer": "Option 1" } ] }
- URL:
-
Get Quiz Reports
- URL:
/api/quizzes/{course_id} - Method:
GET - Example: Not Available
- URL:
-
Create New Chat
- URL:
/api/chats/user/{userid}/{topic}/newchat - Method:
POST - Example Request:
{ "message": "Hello, I need help with AI basics." }
- URL:
-
Get Chats by User
- URL:
/api/chats/user/{userid} - Method:
GET - Example: Not Available
- URL:
-
Get Chats by Topic
- URL:
/api/chats/user/{userid}/{topic} - Method:
GET - Example: Not Available
- URL:
-
Rename Chat Topic
- URL:
/api/chats/user/{userid}/{oldName}/update - Method:
GET - Example: Not Available
- URL:
-
Delete Chats by Topic
- URL:
/api/chats/user/{userid}/{topic} - Method:
DELETE - Example: Not Available
- URL:
-
Send Email
- URL:
/api/sendMail - Method:
POST - Example Request:
{ "recipient": "[email protected]", "subject": "Welcome to AI Learning Platform", "message": "Thank you for signing up!" }
- URL:
-
Send Email with Attachment
- URL:
/api/sendMailWithAttachment - Method:
POST - Example: Not Available
- URL:
-
Sign Up
- URL:
/api/auth/signup - Method:
POST - Example Request:
{ "name": "John Doe", "email": "[email protected]", "password": "password123" }
- URL:
-
Log In
- URL:
/api/auth/login - Method:
POST - Example Request:
{ "email": "[email protected]", "password": "password123" }
- URL:
-
Log Out
- URL:
/api/auth/logout - Method:
GET - Example: Not Available
- URL:
-
Reset Password Token
- URL:
/api/auth/resetToken/{email} - Method:
GET - Example: Not Available
- URL:
-
Change Password
- URL:
/api/auth/changePassword - Method:
POST - Example Request:
{ "email": "[email protected]", "newPassword": "newpassword123" }
- URL:
-
Generate OTP
- URL:
/api/admin/getotp - Method:
POST - Example Request:
{ "email": "[email protected]" }
- URL:
-
Verify OTP
- URL:
/api/admin/checkOtp - Method:
POST - Example Request:
{ "email": "[email protected]", "otp": "123456" }
- URL:
-
Get All Users
- URL:
/api/admin/users - Method:
GET - Example: Not Available
- URL:
-
Delete User
- URL:
/api/admin/{id} - Method:
DELETE - Example: Not Available
- URL:
// Only generate the course ( It won't get saved to DB , so won't be shown in frontend)
-
Generate Course
- URL:
/api/gemini/course/user/{userId} - Method:
POST - Example Request:
{ "courseName": "AI Basics", "courseLevel": "Beginner" }
- URL:
-
Generate Quiz
- URL:
/api/gemini/quiz - Method:
GET - Example: Not Available
- URL:
-
Generate Question
- URL:
/api/gemini/question/{course}/{difficulty} - Method:
GET - Example: Not Available
- URL:
-
Chatbot Response
- URL:
/api/gemini/chatbot/{prompt} - Method:
GET - Example: Not Available
- URL:
To get started with the AI Learning Platform, follow these steps:
- Clone the repository.
- Navigate to the frontend directory and run
npm installto install dependencies. - Start the frontend server with
npm start. - Navigate to the backend directory and run
mvn installto install dependencies. - Start the backend server with
mvn spring-boot:run.
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.