- About CLOVE
- Purpose
- Core Algorithms
- System Architecture
- Learning Features
- How to Setup to Run Locally
- Usage
- Development
- Learning Metrics & Insights
- Security
- Deployment
- License
CLOVE (Code, Logic, Overcome, Validate, Excel) is an intelligent, adaptive learning platform designed to teach Java programming through immersive, game-inspired challenges. The system combines advanced educational algorithms with engaging thematic environments to create a personalized learning experience that adapts to each student's performance and learning patterns.
CLOVE addresses the challenge of making programming education more engaging and effective by:
- Personalizing Learning: Adapts challenge difficulty, timing, and hints based on individual performance
- Gamifying Education: Uses immersive themes (Wizard Academy, Space Mission, Noir Detective) to make learning engaging
- Optimizing Learning Paths: Employs AI algorithms to select the most effective challenges for each student
- Tracking Progress: Provides detailed analytics and progress visualization
- Ensuring Mastery: Uses assessment systems to verify knowledge retention
- Purpose: Models student knowledge state and predicts learning outcomes
- File Location:
clove-backend/app/core/bkt.py - Parameters:
p_T = 0.1(Transition probability - likelihood of learning)p_G = 0.2(Guess probability - chance of correct answer without knowledge)p_S = 0.1(Slip probability - chance of incorrect answer despite knowledge)
- Implementation: Updates knowledge probability after each challenge attempt
- Key Method:
update_knowledge(knowledge_prob, is_correct)
- Purpose: Optimizes challenge selection strategy based on student performance
- File Location:
clove-backend/app/core/rl.py - Parameters:
ฮฑ = 0.1(Learning rate)ฮณ = 0.9(Discount factor)ฮต = 0.8(Initial exploration rate, decays to 0.1)
- State Space: (Mastery Level, Timer Active, Hint Active)
- Actions: Challenge types (code_fixer, code_completion, output_tracing)
- Rewards: Based on correctness, hints used, timing, and streak performance
- Key Methods:
select_action(state),update_q_value(current_state, action, reward, next_state)
- Purpose: Intelligently selects the most appropriate challenge for each student
- File Location:
clove-backend/app/services/selection.py - Mastery Classification:
- Beginner (0-33% knowledge)
- Intermediate (34-66% knowledge)
- Advanced (67-100% knowledge)
- Difficulty Mapping: Automatically adjusts challenge difficulty based on mastery level
- Streak Analysis: Tracks correct/incorrect streaks to activate timers and hints
- Key Functions:
_select_adaptive_challenge(),_select_non_adaptive_challenge()
- Purpose: Orchestrates the learning process and updates student knowledge
- File Location:
clove-backend/app/services/engine.py - Functions:
- Manages adaptive and non-adaptive learning updates
- Integrates BKT and Q-Learning algorithms
- Handles reward calculation and state transitions
- Key Functions:
_run_adaptive_update(),_run_non_adaptive_update()
- Purpose: Common utilities and configuration for all algorithms
- File Location:
clove-backend/app/core/utils.py - Contains:
- Algorithm parameters and constants
- Mastery classification functions
- Q-table value rounding utilities
- Challenge type and difficulty mappings
- Framework: React 19 with Vite for fast development
- Styling: SCSS with Bootstrap 5 and custom theme system
- State Management: React Context API for authentication and app state
- Routing: React Router DOM for navigation
- UI Components: Custom components with Framer Motion animations
- Code Editor: Monaco Editor for syntax highlighting and code completion
- Charts: Recharts for progress visualization
- Framework: FastAPI with async/await support
- Database: PostgreSQL with SQLAlchemy ORM
- Authentication: JWT tokens with refresh token mechanism
- API Design: RESTful API with automatic OpenAPI documentation
- Email Service: Brevo integration for user notifications
- Deployment: Render.com with PostgreSQL database
Core entities include:
- Users: Student profiles and authentication
- Topics/Subtopics: Learning content hierarchy
- Challenges: Interactive coding exercises with multiple types
- Lessons: Educational content and tutorials
- Assessments: Pre/post assessments for knowledge evaluation
- Q-Values: Reinforcement learning state-action values
- Statistics: Performance tracking and analytics
- Code Fixer: Identify and correct bugs in provided code
- Code Completion: Complete missing code segments
- Output Tracing: Predict program output and trace execution
- Wizard Academy: Fantasy-themed learning with magical elements
- Noir Detective: Mystery-themed problem-solving scenarios
- Space Mission: Sci-fi themed challenges aboard a starship
- Dynamic Difficulty: Automatically adjusts based on performance
- Smart Hints: Contextual help that activates during struggle
- Timer Management: Adaptive time limits based on performance streaks
- Progress Tracking: Real-time analytics and mastery visualization
Before running CLOVE, both the frontend and backend need to be set up to ensure the system runs correctly.
Make sure the following prerequisites are already installed and properly configured on your machine before proceeding:
- Node.js 18+ and npm
- Python 3.11+
- PostgreSQL database
- Git
Start by cloning the project repository, then follow the setup steps in order โ beginning with the frontend, followed by the backend.
- Navigate to frontend directory:
cd clove-frontend
# Moves into the frontend project folder- Install dependencies:
npm install
# Installs all required frontend packages- Start development server:
npm run dev
# Launches the frontend on the local development serverIf you don't have PostgreSQL installed yet: https://www.postgresql.org/download/. Follow installation instructions for your own operating system.
Once installed, open PostgreSQL and do the following:
- Create a Login/Group Role:
- General --> Name: clove_user
- Definition --> Password: password-you-want (e.g., 123123)
- Privilages --> Tick all EXEPT "Can initiate streaming replication and backups"
- Save
- Create a Database:
- General --> Database: clove_db
- General --> Owner --> clove_user
- Save
- Navigate to backend directory:
cd clove-backend
# Moves into the backend project folder- Create virtual environment:
python -m venv venv
# Create an isolated Python environment- Activate the virtual environment:
venv\Scripts\activate
# On Linux: source venv/bin/activate
# Activates the isolated Python environment- Install dependencies:
pip install -r requirements.txt
# Installs all required backend packages- Set up environment variables:
cp .env.template .env
# Edit .env with your database and API keys- Generate JWT Secret Key:
python -m scripts.generate_key
# Edit .env and add the generated key under JWT Secret Key6.1 Populate the database by seeding:
python -m app.db.seeder
# Run this only if the database has not been seeded yet- Run database migrations:
alembic upgrade head
# Applies all database schema migrations- Start the server:
uvicorn app.main:app --reload
# Starts the FastAPI backend server in development modeTo access the Render PostgreSQL database:
-
Via Render Dashboard:
- Go to your Render dashboard
- Navigate to your PostgreSQL service
- Use the built-in database browser or connection details
-
Via psql (if you have connection details):
psql -h YOUR_RENDER_DB_HOST -U YOUR_USERNAME -d YOUR_DB_NAME- Via Database URL:
- Use the DATABASE_URL from your Render environment variables
- Connect using your preferred PostgreSQL client
Follow these steps to navigate the platform and begin your learning journey:
- Access the Website โ Open the CLOVE platform in your browser.
- Sign Up or Log In โ Create an account or sign in to enter your learning dashboard.
- Open โMy Deckโ โ Go to the My Deck tab to browse and start available lessons.
- Start a Lesson โ Take the pre-assessment to unlock subtopics under the selected lesson.
- Study Each Subtopic โ Read the learning materials provided for every subtopic.
- Practice and Challenge โ Apply your knowledge through practice exercises or coding challenges.
- Track Progress โ Visit the Progress tab to monitor your overall improvement and completion across lessons.
CLOVE-Restructured/
โโโ clove-frontend/ # React frontend application
โ โโโ src/
โ โ โโโ features/ # Feature-based modules
โ โ โโโ components/ # Reusable UI components
โ โ โโโ contexts/ # React context providers
โ โ โโโ styles/ # SCSS styling system
โโโ clove-backend/ # FastAPI backend application
โ โโโ app/
โ โ โโโ api/ # API endpoints
โ โ โโโ core/ # Core algorithms (BKT, RL)
โ โ โโโ crud/ # Database operations
โ โ โโโ db/ # Database models and session
โ โ โโโ schemas/ # Pydantic schemas
โ โ โโโ services/ # Business logic services
โโโ scripts/ # Utility scripts
- Frontend: React, Vite, SCSS, Bootstrap, Framer Motion
- Backend: FastAPI, SQLAlchemy, PostgreSQL, Alembic
- AI/ML: NumPy, Custom BKT and Q-Learning implementations
- Deployment: Netlify (Frontend), Render.com (Backend + Database)
- Development: Black, isort, ESLint
The platform tracks detailed learning data to evaluate student progress and adapt challenges dynamically, including:
- Mastery progression
- Challenge completion rates
- Time-to-mastery
- Learning efficiency
- Adaptive model performance
Multiple layers of security are implemented to protect user data and maintain application integrity, including:
- JWT-based authentication with refresh tokens for secure session management
- Password hashing using bcrypt
- CORS protection and rate limiting to prevent unauthorized or excessive requests
- Input validation and sanitization to reduce injection risks
- Secure database connections using encrypted credentials
The platform is deployed using cloud-based services for scalability and reliability.
- Frontend: Deployed on Netlify
- Backend API: Deployed on Render.com
- Database: PostgreSQL hosted on Render.com
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ Netlify โ โ Render.com โ โ Render.com โ
โ (Frontend) โโโโโบโ (Backend) โโโโโบโ (Database) โ
โ React App โ โ FastAPI โ โ PostgreSQL โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
This project is licensed under the MIT License.
See the LICENSE file for details.
