A full-stack application for measuring emotional intelligence through an interactive quiz. The application uses React for the frontend and FastAPI for the backend, with Ollama-based LLM integration for question generation and evaluation.
- Interactive quiz interface with 10 random questions
- Objective questions with 4 options each
- Dynamic question generation using LLM
- Emotional intelligence scoring (out of 10)
- Detailed feedback and analysis
- Python 3.12+
- NodeJS 20+
- Ollama installed and running locally
emotional-intelligence-meter/
├── backend/ # FastAPI backend
│ ├── app/
│ │ ├── main.py
│ │ └── services/
│ │ └── llm_service.py
│ └── requirements.txt
└── frontend/ # React frontend
├── public/
│ └── index.html
├── src/
│ └── App.js
│ └── index.js
└── package.json
Ensure you have the necessary models pulled in Ollama:
ollama pull llama3
Ensure Ollama is running:
ollama serve
- Navigate to the backend directory
- Create a virtual environment:
python -m venv .venv - Activate the virtual environment:
- Windows:
venv\Scripts\activate - Unix/MacOS:
source .venv/bin/activate
- Windows:
- Install dependencies:
pip install -r requirements.txt - Set environment variable to point Ollama instance, the default is:
OLLAMA_HOST=http://localhost:11434 - Run the server:
uvicorn app.main:app --reload
- Navigate to the frontend directory
- Install dependencies:
npm install - Start the development server:
npm start
- Frontend: React, Material-UI
- Backend: FastAPI, Python
- LLM: llama3 hosted on Ollama
GET /api/health: Basic health check of the API serverGET /api/questions: Get 10 random questionsPOST /api/submit: Submit quiz answers and get evaluation