Overview
EduMate requires several environment variables for proper configuration. This guide covers all the environment variables used across the application.Create a
.env file in your project root to store these variables securely.Required Variables
AI/ML Configuration
Google Gemini API key for generating MCQ assessments.Used in:
chatting.py:11backend/queue/chat.py:11
Get your API key from Google AI Studio
Database Configuration
PostgreSQL database connection string.Used in: Default configuration:
backend/database.py:7Format:Security Configuration
Secret key for JWT token generation and encryption.Used in:
backend/server.py:31Default (for development only):JWT signing algorithm.Used in:
backend/server.py:32JWT access token expiration time in minutes (default: 24 hours).Used in:
backend/server.py:33Password reset token expiration time in minutes.Used in:
backend/server.py:34Redis Configuration
Redis server host address.Used in:
backend/client/rq_client.py:6Redis server port number.Used in:
backend/client/rq_client.py:7Vector Database Configuration
Qdrant vector database URL.Used in:
backend/queue/chat.py:38backend/queue/doc_chunking.py:99
Ollama Configuration
Ollama server base URL for embeddings.Used in:
backend/queue/chat.py:25,33backend/queue/doc_chunking.py:93
Ollama embedding model name.Used in:
backend/queue/chat.py:32backend/queue/doc_chunking.py:92
Alternative model:
nomic-embed-textExample .env File
Loading Environment Variables
EduMate usespython-dotenv to load environment variables:
Make sure to add
.env to your .gitignore file to prevent committing sensitive credentials.