This is an educational platform where users can access and consume educational content such as videos, lectures, and quizzes. The platform also includes features for user authentication, progress tracking, and quiz grading.
- User authentication
- Upload and manage educational content such as videos, lectures, and quizzes
- Progress tracking for users to keep track of their progress through educational content
- Quiz grading to evaluate user knowledge and understanding
POST /api/register
: Register a new user
curl --location 'http://localhost:5000/api/register' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'name=fakename' \
--data-urlencode 'email=fakename@gmail.com' \
--data-urlencode 'password=fakepass'
Response:
{
"token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.WyJBbGlBaG1hZGkiLCJBbGlBaG1hZGlAZ21haWwuY29tIiwiJDJ5JDEwJFV2RE9pM3dVMFVJdE1jOWVkS09nWHVWVWdOdEFEWmw0MmdtZ0RIQzI5VVVWbkgzUHhhQkVTIl0.pJrm81UK1aysfLWM2tyzeWDTugsdoBqBZj3vsj9z1OA"
}
POST /api/login
: Login a user
curl --location 'http://localhost:5000/api/login' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'name=fakename' \
--data-urlencode 'email=fakename@gmail.com' \
--data-urlencode 'password=fakepass'
Response:
{
"token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.WyJBbGlBaG1hZGkiLCJBbGlBaG1hZGlAZ21haWwuY29tIiwiJDJ5JDEwJFV2RE9pM3dVMFVJdE1jOWVkS09nWHVWVWdOdEFEWmw0MmdtZ0RIQzI5VVVWbkgzUHhhQkVTIl0.pJrm81UK1aysfLWM2tyzeWDTugsdoBqBZj3vsj9z1OA"
}
GET /api/content
: Get a list of all contentGET /api/content/{id}
: Get specific content by IDPOST /api/content
: Upload new contentPUT /api/content/{id}
: Update existing contentDELETE /api/content/{id}
: Delete existing content
GET /api/progress
: Get a list of all progress for a userPOST /api/progress
: Update progress for a user
GET /api/quizzes
: Get a list of all quizzesGET /api/quizzes/{id}
: Get specific quiz by IDPOST /api/quizzes
: Create a new quizPUT /api/quizzes/{id}
: Update an existing quizDELETE /api/quizzes/{id}
: Delete an existing quiz
GET /api/quizzes/{quiz_id}/questions
: Get a list of all questions for a specific quizGET /api/quizzes/{quiz_id}/questions/{id}
: Get a specific question by ID for a specific quizPOST /api/quizzes/{quiz_id}/questions
: Create a new question for a specific quizPUT /api/quizzes/{quiz_id}/questions/{id}
: Update an existing question for a specific quizDELETE /api/quizzes/{quiz_id}/questions/{id}
: Delete an existing question for a specific quiz
GET /api/questions/{question_id}/answers
: Get a list of all answers for a specific questionGET /api/questions/{question_id}/answers/{id}
: Get a specific answer by ID for a specific questionPOST /api/questions/{question_id}/answers
: Create a new answer for a specific questionPUT /api/questions/{question_id}/answers/{id}
: Update an existing answer for a specific questionDELETE /api/questions/{question_id}/answers/{id}
: Delete an existing answer for a specific question
Note: This is just an example list of API routes, and you may need to modify it based on the specific requirements.
id
: int (primary key)name
: varchar(255)email
: varchar(255)password
: varchar(255)created_at
: timestampupdated_at
: timestamp
id
: int (primary key)title
: varchar(255)description
: texttype
: enum('video', 'lecture', 'quiz')content_file
: varchar(255) (path to file)created_at
: timestampupdated_at
: timestamp
id
: int (primary key)user_id
: int (foreign key to Users table)content_id
: int (foreign key to Content table)completed
: booleancreated_at
: timestampupdated_at
: timestamp
id
: int (primary key)content_id
: int (foreign key to Content table)title
: varchar(255)created_at
: timestampupdated_at
: timestamp
id
: int (primary key)quiz_id
: int (foreign key to Quizzes table)question
: textcreated_at
: timestampupdated_at
: timestamp
id
: int (primary key)question_id
: int (foreign key to Questions table)answer
: textcorrect
: booleancreated_at
: timestampupdated_at
: timestamp
Note: This is just an example schema, and you may need to modify it based on the specific requirements.
Clone this repository and install dependencies:
git clone https://github.com/BaseMax/EducationalMVCPlatformPHP.git
cd EducationalMVCPlatformPHP
composer install
Now copy .env.example
to .env
and fill database credentials in .env
file:
cp .env.example .env
You can run the project now:
cd public
php -S localhost:5000
- Ali Ahmadi
- Max Base
Copyright 2023, Max Base