CertiBot is a Symfony application for generating, crawling, and reformulating multiple-choice questions (MCQs) from Symfony documentation, with storage in MongoDB.
- User Authentication with registration, login, and email verification.
- Crawling Symfony documentation and exam topics.
- Automatic MCQ generation from text.
- Interactive quiz interface for Symfony certification training.
- API to trigger crawling and MCQ generation commands.
- MongoDB storage for questions, results, and user data.
-
Clone the repository
git clone git@github.com:askeita/certibot.git cd certibot -
Install PHP dependencies
composer install
-
Install JS dependencies
npm install
and then build the assets:
npm run build
-
Configure environment
-
Start MongoDB service (if not already running)
mongod
-
Create the
symfony_certificationdatabase -
Start the Symfony server
symfony server:start
or
php -S localhost:8000 -t public
To run the unit tests, ensure you have PHPUnit installed and run:
php bin/phpunitsrc/Controller/: Web and API controllerssrc/Command/: Crawling and MCQ generation commandssrc/Repository/: MongoDB accesstemplates/: Twig templatestests/: Unit tests
The application features a complete authentication system:
-
Registration
- Navigate to
/registerto create a new account. - Fill in your username, email, password, and password confirmation.
- Upon successful registration, a verification email will be sent to your email address.
- Navigate to
-
Email Verification
- Check your email inbox for a verification message from CertiBot.
- Click the verification link to activate your account.
- Once verified, you can log in to the application.
-
Login
- Navigate to
/loginto access your account. - Enter your username and password.
- Use the "Remember me" option to stay logged in for up to one week.
- Navigate to
-
Logout
- Click the logout button to end your session.
-
Access the application
- Open your browser and navigate to
http://localhost:8000. - Register a new account at
http://localhost:8000/registerif you don't have one yet. - Verify your email by clicking the link sent to your email address.
- Log in at
http://localhost:8000/loginwith your credentials.
- Open your browser and navigate to
-
Start a quiz
- Click on "Train with CertiBot" to begin.
- Choose the desired training duration and click "Next".
- Select the Symfony version you want to cover and click "Start training".
- If your database is empty, the tool will first crawl the list of exam topics on the Symfony certification website. It will then crawl the Symfony documentation for the selected version and retrieve links and paragraphs related to the different topics. Then it will generate Multiple-Choice Questions (MCQs) based on the crawled content using OpenAI API.
-
View your results
- After completing the quiz, you will see your score and the correct answers.
- You can also view the links to the documentation for each question.
- View your attempt history (Coming soon).
- Identify your strengths and weaknesses by topic (Coming soon).
Via CLI, you can run the following commands:
# Crawl Symfony certification website and exam topics:
symfony console app:crawl:symfony-exam-topics
# Crawl Symfony documentation for a specific version and retrieve links and paragraphs related to the exam topics:
symfony console app:crawl:symfony-doc
# Generate Questions: Multiple-choice questions based on explored content using OpenAI API:
symfony console app:reformulate-text-to-mcq- Coming soon
- Edit Twig templates to change the UI.
- Add new crawlers or question types in
src/Command/.
Open source project under the MIT license.