Skip to content

parthvaja/MindsetLens

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 MindsetLens

AI-Powered Teacher Analytics Platform

MindsetLens helps teachers assess and track student learning mindsets through AI-scored surveys and delivers personalized teaching recommendations powered by Claude.


The Problem

Teachers work with students who have fundamentally different learning mindsets. One student picks up concepts quickly, another needs five different examples, and a third may have special needs requiring entirely different approaches. Keeping track of what works for each student and crafting individualized strategies across an entire classroom is overwhelming and unsustainable.

The Solution

MindsetLens gives teachers a single dashboard to:

  • Add and manage student profiles with grade level, age, and learning context
  • Conduct 12-question mindset assessments (10 Likert-scale + 2 open-ended)
  • View AI-calculated Growth Mindset Scores (0-100) with growth/mixed/fixed classification
  • Receive 4-5 personalized teaching recommendations generated by Claude
  • Add ongoing observations that trigger updated, context-aware recommendations
  • Track mindset evolution over time with interactive trend charts

Teachers only. No student login required. Teachers conduct surveys on their own devices.


How the Scoring Works

MindsetLens uses a hybrid scoring algorithm that combines quantitative and qualitative signals:

  1. Likert Component - 10 questions scored on a 1-5 scale, normalized to 0-100. Three questions are reverse-scored to detect acquiescence bias.
  2. Text Analysis - 2 open-ended responses analyzed using TextBlob sentiment analysis and keyword matching against growth/fixed mindset indicator phrases. This produces a +/- 15 point adjustment.
  3. Classification - Final score mapped to Growth (70-100), Mixed (40-69), or Fixed (0-39).

The score and full survey data are then sent to the Claude API, which generates categorized teaching recommendations (communication, feedback, challenge level, motivation, general strategy) with confidence scores.


Tech Stack

Backend

  • Python 3.11+ with Django 4.2 and Django REST Framework
  • SQLite (development) / PostgreSQL 15+ (production)
  • Celery + Redis for async AI task processing
  • Django Simple JWT for authentication
  • drf-spectacular for auto-generated API documentation
  • TextBlob for sentiment analysis

Frontend

  • Next.js 14 (App Router) with TypeScript
  • Tailwind CSS with animated components (Framer Motion, GSAP)
  • Zustand for state management
  • TanStack Query for server state and caching
  • Recharts for data visualization
  • React Hook Form + Zod for form validation

AI / ML

  • Anthropic Claude API for recommendation generation
  • TextBlob for sentiment scoring
  • Custom NLP keyword-based growth/fixed mindset detection

Infrastructure

  • Docker + Docker Compose for containerization
  • Nginx reverse proxy
  • Gunicorn WSGI server
  • WhiteNoise for static file serving

Project Structure

mindsetlens/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ apps/
β”‚   β”‚   β”œβ”€β”€ accounts/          # Teacher auth (JWT)
β”‚   β”‚   β”œβ”€β”€ students/          # Student CRUD
β”‚   β”‚   β”œβ”€β”€ surveys/           # Survey submission + scoring
β”‚   β”‚   β”œβ”€β”€ notes/             # Teacher observations
β”‚   β”‚   β”œβ”€β”€ recommendations/   # AI recommendation generation
β”‚   β”‚   └── analytics/         # Dashboard stats + trends
β”‚   β”œβ”€β”€ core/                  # Shared utilities
β”‚   β”œβ”€β”€ mindsetlens/           # Django project settings
β”‚   └── requirements/
β”œβ”€β”€ frontend/
β”‚   └── src/
β”‚       β”œβ”€β”€ app/               # Next.js App Router pages
β”‚       β”œβ”€β”€ components/        # UI + feature components
β”‚       β”œβ”€β”€ lib/               # API client, stores, utils
β”‚       β”œβ”€β”€ hooks/             # Custom React hooks
β”‚       └── types/             # TypeScript type definitions
β”œβ”€β”€ nginx/
β”œβ”€β”€ docker-compose.yml
└── .env.example

Getting Started

Prerequisites

  • Python 3.11+
  • Node.js 18+
  • Git

Backend Setup

cd backend

# Create and activate virtual environment
python -m venv venv
venv\Scripts\activate        # Windows
# source venv/bin/activate   # macOS/Linux

# Install dependencies
pip install -r requirements/development.txt

# Copy environment variables
cp ../.env.example .env
# Edit .env with your SECRET_KEY and ANTHROPIC_API_KEY

# Run migrations
python manage.py migrate

# Create a teacher account
python manage.py createsuperuser

# Start the server
python manage.py runserver

Frontend Setup

cd frontend

# Install dependencies
npm install

# Start dev server
npm run dev

The backend runs at http://localhost:8000 and the frontend at http://localhost:3000.

Environment Variables

Create a .env file in the backend/ directory:

SECRET_KEY=your-random-secret-key
DEBUG=True
ALLOWED_HOSTS=localhost,127.0.0.1
DATABASE_URL=sqlite:///db.sqlite3
REDIS_URL=redis://localhost:6379/0
CORS_ALLOWED_ORIGINS=http://localhost:3000
ANTHROPIC_API_KEY=your-anthropic-api-key
NEXT_PUBLIC_API_URL=http://localhost:8000

Get your Anthropic API key at console.anthropic.com. Without it, the app uses generic fallback recommendations.

Docker (Optional)

docker-compose up --build

This starts PostgreSQL, Redis, Django, Celery, Next.js, and Nginx.


API Endpoints

Method Endpoint Description
POST /api/auth/register/ Register a new teacher
POST /api/auth/login/ Login and receive JWT tokens
GET /api/auth/me/ Get current teacher profile
GET/POST /api/students/ List / create students
GET/PUT/DELETE /api/students/{id}/ Student detail operations
POST /api/surveys/submit/{student_id}/ Submit a mindset survey
GET /api/surveys/ List survey responses
GET/POST /api/notes/ List / create teacher notes
GET /api/recommendations/{student_id}/ Get active recommendations
GET /api/analytics/dashboard/ Dashboard statistics
GET /api/analytics/trends/{student_id}/ Student mindset trends

Full interactive API docs available at http://localhost:8000/api/docs/ (Swagger UI).


Key Features

Mindset Assessment Survey

12-question assessment combining Likert-scale and open-ended responses. Scores are calculated in under 200ms with real-time classification.

AI-Powered Recommendations

Claude generates 4-5 categorized teaching strategies based on the student's score, survey responses, and teacher observations. Recommendations update automatically when teachers add new notes.

Trend Tracking

Interactive charts built with Recharts display mindset score evolution over time. Each assessment and note-triggered update creates a new data point.

Responsive Design

Fully mobile-responsive dashboard with animated components, loading states, and toast notifications.


Testing

cd backend
pytest

Deployment

See the production checklist in the project spec:

  • Set DEBUG=False and use a cryptographically secure SECRET_KEY
  • Configure PostgreSQL with automated backups
  • Set up Redis persistence for Celery
  • Configure SSL/HTTPS with Let's Encrypt
  • Set up Nginx as a reverse proxy
  • Add rate limiting and CSP headers
  • Review GDPR/FERPA compliance for student data

Built With

Python, Django, Django REST Framework, PostgreSQL, SQLite, Celery, Redis, Next.js, React, TypeScript, Tailwind CSS, Zustand, TanStack Query, Recharts, Framer Motion, GSAP, Anthropic Claude API, TextBlob, Docker, Nginx, JWT


Author

Parth Vaja - MS Data Science, UMBC


License

This project is for educational and demonstration purposes.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors