A fintech education platform built with Symfony 6.4 and a Python ML microservice. Users can browse courses, take quizzes, get personalized recommendations, and chat with an AI assistant — all without creating an account.
| Layer | Technology |
|---|---|
| Backend | Symfony 6.4 (PHP 8.1+) |
| ORM | Doctrine ORM 3.x |
| Templating | Twig 3.x |
| Database | MySQL 8 |
| Admin UI | EasyAdmin 4 + custom admin |
| Frontend | Bootstrap 5, Stimulus 3, Turbo 7 |
| Charts | Chart.js via symfony/ux-chartjs |
| AI Chatbot | Python FastAPI + scikit-learn TF-IDF |
- Courses & Chapters — browse fintech courses organized into ordered chapters with video, images, and key takeaways
- Quiz System — multiple-choice quizzes with practice and timed exam modes
- Recommendations — personalized course suggestions based on quiz performance and weak topics
- Notifications — automatic in-app alerts after quiz completion (score feedback + recommendations ready)
- AI Chatbot — domain-specific assistant trained on the platform's own course content
- Statistics — personal learning dashboard with score history and progress charts
- Comments & Reactions — emoji reactions on course chapter comments
- i18n — French / English / Arabic with RTL support
- Admin Dashboard — full content management for courses, chapters, quizzes, and comments
- PHP 8.1+
- Composer
- MySQL 8
- Node.js (for asset building, optional — importmap is used)
- Python 3.10+ (for the chatbot microservice)
- Symfony CLI (recommended)
git clone <repo-url>
cd Dinari
composer installcp .env .env.localEdit .env.local and set your values:
APP_SECRET=your_secret_here
DATABASE_URL="mysql://root:password@localhost:3306/pidev?serverVersion=8.0.32&charset=utf8mb4"
CHATBOT_SERVICE_URL=http://localhost:8001php bin/console doctrine:database:create
php bin/console doctrine:migrations:migratemysql -u root pidev < fixtures.sqlphp bin/console importmap:install
php bin/console assets:installsymfony server:start
# or
php -S localhost:8000 -t public/The AI chatbot runs as a separate Python process. It must be running for the chat widget to work. If it is down, the widget shows a graceful error message.
cd chatbot_service
pip install -r requirements.txtcp .env.example .envEdit chatbot_service/.env:
DB_HOST=localhost
DB_PORT=3306
DB_NAME=pidev
DB_USER=root
DB_PASSWORD=python build_dataset.pyThis connects to MySQL, extracts all course/chapter/quiz content, and writes dataset.json.
python train.pyThis fits a TF-IDF model on the dataset and saves model.pkl.
uvicorn app:app --host 0.0.0.0 --port 8001The chatbot is now available at http://localhost:8001.
Symfony's CHATBOT_SERVICE_URL env var must point to this address.
After adding or editing courses in the admin, retrain the model:
# Option A — manually
python build_dataset.py && python train.py
# Option B — via API (while the server is running)
curl -X POST http://localhost:8001/retrainDinari/
├── src/
│ ├── Controller/
│ │ ├── Admin/ # Admin-side controllers + EasyAdmin CRUDs
│ │ └── Client/ # User-facing controllers
│ ├── Entity/ # Doctrine entities (Cours, Chapitre, Quiz, QuizResultat,
│ │ # Notification, Commentaire, Reaction, ChapitreTache, ChapitreQuestion)
│ ├── Event/ # QuizCompletedEvent, RecommendationsGeneratedEvent
│ ├── EventSubscriber/ # NotificationEventSubscriber
│ ├── Repository/ # Doctrine repositories
│ └── Service/ # AssistantService, RecommendationService, NotificationService
├── templates/
│ ├── base.html.twig # Main layout (navbar, footer, chatbot widget, i18n)
│ ├── chatbot/ # _widget.html.twig
│ ├── client/ # All user-facing pages
│ └── admin/ # Admin dashboard pages
├── migrations/ # Doctrine database migrations
├── config/
│ ├── services.yaml # DI config (chatbot URL injection)
│ └── packages/ # Bundle configuration
├── public/ # Web root (CSS, JS, fonts, images)
└── assets/ # Stimulus controllers, app.js
chatbot_service/
├── app.py # FastAPI server (/chat, /health, /retrain)
├── train.py # Trains TF-IDF model → model.pkl
├── build_dataset.py # Extracts DB content → dataset.json
├── dataset.json # Training data (Q&A pairs)
├── model.pkl # Trained model (generated, not committed)
└── requirements.txt # Python dependencies
| URL | Description |
|---|---|
/ |
Homepage |
/cours |
Course listing |
/quiz |
Quiz listing |
/recommandations |
Personalized recommendations |
/notifications |
In-app notifications |
/statistiques |
Personal learning stats |
/chatbot/message |
Chatbot API (POST, JSON) |
/admin |
Custom admin dashboard |
/easyadmin |
EasyAdmin CRUD interface |
| Variable | Description | Default |
|---|---|---|
APP_ENV |
Symfony environment (dev/prod) |
dev |
APP_SECRET |
Symfony secret key | — |
DATABASE_URL |
MySQL connection string | — |
CHATBOT_SERVICE_URL |
URL of the Python chatbot microservice | http://localhost:8001 |
MAILER_DSN |
Mailer transport DSN | null://null |
MESSENGER_TRANSPORT_DSN |
Messenger transport | doctrine://default |
ARCHITECTURE.md— full project structure, entities, API routes, and design decisionsMODULES_DEEP_DIVE.md— deep walkthrough of Chatbot, Notifications, Recommendations, and i18n
- There is no user authentication. All personalization is scoped to the browser session.
- The chatbot is entirely self-contained — no external AI API is used.
- The admin at
/adminis the main content management interface./easyadminis a secondary CRUD interface. - Arabic language support includes full RTL layout switching.