StudyPal โ€” Your AI-Powered Study Companion

The study pal every student always needed. AI-powered study accountability for African students who work while they study. Study smarter, even offline.

Live Demo: studypal-your-ai-study-companion.vercel.app


๐Ÿ“‹ Overview

StudyPal is a full-stack AI-powered study application designed specifically for students in Africa who balance work, school, and life. Built for the YPIT Hackathon 2026 โ€” Education Track, StudyPal transforms the study experience by:

  • ๐Ÿ“ Structuring your notes into bite-size lessons using AI
  • ๐ŸŽง Reading content aloud for hands-free learning while you commute, work, or cook
  • โ“ Quizzing you instantly with voice-based comprehension checks
  • ๐Ÿ“Š Tracking real progress with Daily Pulse โ€” actual coverage data, no motivation quotes
  • ๐Ÿ”Œ Working offline after the first load โ€” no internet required
  • ๐ŸŽฏ Adapting to your reality with "Life Happened Mode" that replans when you miss days

Beta tested by 200+ students from UNILAG, LASU, UI, Covenant, and ABU with a 4.9/5 rating.


๐ŸŽฏ The Problem We Solve

Why Students Struggle

  1. Inconsistent Internet โ€” NEPA goes. Data finishes. Study apps shouldn't punish you for that.
  2. No One Checking In โ€” Self-study is lonely. Without accountability, weeks blur into nothing.
  3. Life Gets in the Way โ€” You work, you commute, you cook. Most planners weren't built for real students.

StudyPal is built to work for any learner โ€” university students, polytechnic students, JAMB/WAEC candidates, or self-studiers. It fits into your real schedule, not the other way around.


โœจ Core Features

1. Voice Lessons ๐ŸŽง

  • AI reads your content aloud in 10โ€“15 minute sessions
  • Perfect for learning while doing chores, commuting, or working

2. Smart Study Planner

  • Personalized micro-sessions adapted to your real schedule
  • Automatically reschedules when life happens

3. Comprehension Checks โ“

  • 3 quick voice-based or text questions after every session
  • Instant feedback โ€” real understanding, not just recall

4. Daily Pulse ๐Ÿ“Š

  • Real progress data day by day
  • Streak tracking, average performance, and days remaining
  • Zero guilt-tripping if you miss a day

5. Offline Mode ๐Ÿ”Œ

  • Full functionality without internet after the first load
  • Syncs automatically when you're back online

6. AI-Powered Content Structuring ๐Ÿค–

  • Upload lecture notes, past questions, or PDFs
  • AI structures them into 5โ€“7 ordered lesson topics
  • Groq + Aethex power the intelligence

๐Ÿ›  Tech Stack

99.1% TypeScript | 0.9% Other

Frontend & Framework

  • React 19.2.0 โ€” Modern UI with Concurrent features
  • TanStack Start โ€” Full-stack framework with file-based routing
  • TanStack Router โ€” Type-safe routing & query management
  • TanStack React Query โ€” Server state management

UI & Animation

  • Radix UI โ€” Unstyled, accessible components (accordion, dialog, dropdown, etc.)
  • Tailwind CSS 4.2 โ€” Utility-first styling
  • Framer Motion โ€” Smooth animations and transitions
  • Lucide React โ€” Icon library

Forms & Validation

  • React Hook Form โ€” Efficient form handling
  • Zod โ€” Runtime TypeScript schema validation
  • Class Variance Authority โ€” Component variant management

Backend & Database

  • Supabase โ€” PostgreSQL database + authentication
  • Groq โ€” AI content structuring (LLM inference)

Build & Deployment

  • Vite 7.3.1 โ€” Lightning-fast build tool
  • Vercel โ€” Deployment platform (configured in vercel.json)
  • TypeScript 5.8.3 โ€” Type safety

Development

  • ESLint โ€” Code quality
  • Prettier โ€” Code formatting
  • Bun โ€” Fast package manager
  • Nitro โ€” Backend framework (beta)

๐Ÿš€ Getting Started

Prerequisites

  • Node.js 18+ or Bun
  • Git
  • Supabase account (free tier available)
  • Groq API key

Installation

# Clone the repository
git clone https://github.com/zion-robotics/studypal-your-ai-study-companion.git
cd studypal-your-ai-study-companion

# Install dependencies
bun install
# or
npm install

# Create .env.local
cp .env.example .env.local

Environment Setup

Create a .env.local file with:

VITE_SUPABASE_URL=your_supabase_url
VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
VITE_GROQ_API_KEY=your_groq_api_key

Development Server

# Start dev server with hot reload
bun run dev
# or
npm run dev

Open http://localhost:5173 in your browser.

Production Build

# Build for production
bun run build
# or
npm run build

# Preview production build
bun run preview

๐Ÿ“ Project Structure

src/
โ”œโ”€โ”€ routes/                    # File-based routing (TanStack Start)
โ”‚   โ”œโ”€โ”€ __root.tsx             # App shell with authentication
โ”‚   โ”œโ”€โ”€ index.tsx              # Landing page
โ”‚   โ”œโ”€โ”€ login.tsx              # Login page
โ”‚   โ”œโ”€โ”€ signup.tsx             # Registration page
โ”‚   โ”œโ”€โ”€ onboarding.tsx         # User setup flow
โ”‚   โ”œโ”€โ”€ dashboard.tsx          # Main dashboard
โ”‚   โ”œโ”€โ”€ upload.tsx             # Note upload & AI structuring
โ”‚   โ”œโ”€โ”€ session.tsx            # Study session (voice, quizzes)
โ”‚   โ”œโ”€โ”€ documents.tsx          # Document management
โ”‚   โ”œโ”€โ”€ courses.tsx            # Folder/course organization
โ”‚   โ”œโ”€โ”€ notes.tsx              # Personal notes
โ”‚   โ”œโ”€โ”€ community.tsx          # Social feed
โ”‚   โ”œโ”€โ”€ discussions.tsx        # Discussion threads
โ”‚   โ”œโ”€โ”€ settings.tsx           # User preferences
โ”‚   โ”œโ”€โ”€ -AppShell.tsx          # Sidebar layout
โ”‚   โ””โ”€โ”€ README.md              # Route conventions
โ”œโ”€โ”€ components/
โ”‚   โ””โ”€โ”€ sp/                    # StudyPal-specific UI components
โ”‚       โ”œโ”€โ”€ TopNav.tsx
โ”‚       โ”œโ”€โ”€ Logo.tsx
โ”‚       โ”œโ”€โ”€ ThemeToggle.tsx
โ”‚       โ””โ”€โ”€ AppShell.tsx
โ”œโ”€โ”€ lib/
โ”‚   โ”œโ”€โ”€ supabase.ts            # Supabase client
โ”‚   โ”œโ”€โ”€ groq.ts                # Groq API integration
โ”‚   โ”œโ”€โ”€ validation.ts          # Form validation
โ”‚   โ”œโ”€โ”€ guards.ts              # Route protection
โ”‚   โ””โ”€โ”€ lovable-error-reporting.ts
โ”œโ”€โ”€ hooks/
โ”‚   โ”œโ”€โ”€ useAuth.ts             # Authentication
โ”‚   โ”œโ”€โ”€ useProfile.ts          # User profile
โ”‚   โ””โ”€โ”€ useCountUp.ts          # Animation helpers
โ”œโ”€โ”€ styles.css                 # Global styles
โ””โ”€โ”€ types/                     # TypeScript types


๐Ÿ“Š Database Schema (Supabase)

Tables

users (via Supabase Auth)
โ”œโ”€โ”€ id (UUID)
โ”œโ”€โ”€ email
โ”œโ”€โ”€ created_at

user_profiles
โ”œโ”€โ”€ user_id (FK)
โ”œโ”€โ”€ full_name
โ”œโ”€โ”€ school_name
โ”œโ”€โ”€ user_type (tertiary | secondary)
โ”œโ”€โ”€ learning_mode (mixed | online | offline)
โ”œโ”€โ”€ notifications_enabled
โ”œโ”€โ”€ voice_id
โ”œโ”€โ”€ exam_date
โ”œโ”€โ”€ avatar_url
โ”œโ”€โ”€ onboarding_completed

lessons
โ”œโ”€โ”€ id
โ”œโ”€โ”€ user_id (FK)
โ”œโ”€โ”€ subject
โ”œโ”€โ”€ notes (text)
โ”œโ”€โ”€ topics (string[])
โ”œโ”€โ”€ exam_type (JAMB | WAEC | NECO | POST-UTME | null)
โ”œโ”€โ”€ created_at

documents
โ”œโ”€โ”€ id
โ”œโ”€โ”€ user_id (FK)
โ”œโ”€โ”€ folder_id (FK)
โ”œโ”€โ”€ name
โ”œโ”€โ”€ file_path
โ”œโ”€โ”€ file_size
โ”œโ”€โ”€ public_url
โ”œโ”€โ”€ created_at

courses (Folders)
โ”œโ”€โ”€ id
โ”œโ”€โ”€ user_id (FK)
โ”œโ”€โ”€ parent_folder_id (FK, nullable)
โ”œโ”€โ”€ title
โ”œโ”€โ”€ created_at

notes
โ”œโ”€โ”€ id
โ”œโ”€โ”€ user_id (FK)
โ”œโ”€โ”€ title
โ”œโ”€โ”€ body (markdown)
โ”œโ”€โ”€ color (yellow | sage | coral | sky | lavender | white)
โ”œโ”€โ”€ tags (Chemistry | Biology | Economics | Math | General | Important)
โ”œโ”€โ”€ created_at
โ”œโ”€โ”€ updated_at

๐Ÿ” Authentication

StudyPal uses Supabase Auth with magic links and password-based login. The app includes:

  • Email validation & password strength checks
  • OAuth callback handling with automatic redirects
  • Session restoration from localStorage
  • Onboarding flow for new users
  • Protected routes with requireAuth and requireGuest guards

๐ŸŽจ Design System

  • Colors: Accent-driven (teal/cyan) with light/dark mode support
  • Typography: Display fonts for headings, monospace for metadata
  • Spacing: Tailwind's default scale (px-4, gap-6, etc.)
  • Components: Radix UI primitives + custom StudyPal variants
  • Animations: Framer Motion for micro-interactions
  • Icons: Lucide React

๐Ÿ“ฑ Key Pages & Features

Landing Page (/)

  • Hero section with parallax scrolling
  • Problem statement (3 challenges)
  • Feature showcase
  • How-it-works timeline
  • Testimonials from beta testers
  • Call-to-action

Authentication (/login, /signup)

  • Email validation
  • Password strength indicator
  • Error handling with friendly messages
  • Redirect based on onboarding status

Dashboard (/dashboard)

  • User's study stats & streaks
  • Recent lessons & documents
  • Quick-start actions
  • Progress visualization

Upload (/upload)

  • Drag-and-drop file/text input
  • AI content structuring (via Groq)
  • Exam-type selection (JAMB/WAEC/NECO)
  • Topic preview & confirmation

Study Session (/session)

  • Voice-based lesson playback
  • Comprehension quiz (3 questions)
  • Session timer & progress
  • Offline support

Documents (/documents)

  • File browser (PDFs, Word, Excel, Images, etc.)
  • List & grid views
  • Search & filter
  • Real-time sync with Supabase

Courses (/courses)

  • Hierarchical folder management
  • Drag-and-drop organization
  • Quick actions (rename, delete, move)
  • Document count per folder

Notes (/notes)

  • Rich text editing
  • Color & tag organization
  • Full-text search
  • Real-time sync

Community (/community)

  • Social feed of student posts
  • Categories: University & Exam Prep
  • Tags for filtering
  • Like & comment functionality

Settings (/settings)

  • Profile management (name, school, user type)
  • Learning preferences
  • Voice settings
  • Notification controls

๐Ÿ”Œ API Integrations

Supabase

  • PostgreSQL database
  • Row-level security policies
  • Real-time subscriptions
  • Storage for documents

Groq

  • Structured output API for content parsing
  • Fast inference for note structuring
  • Model: Best available in Groq (configurable)

๐Ÿงช Development

# Run linter
bun run lint

# Format code
bun run format

# Watch for changes
bun run dev

๐Ÿ“ˆ Performance Optimizations

  • โœ… Code splitting with TanStack Router
  • โœ… Lazy loading of routes
  • โœ… Image optimization (Unsplash CDN)
  • โœ… Framer Motion GPU acceleration
  • โœ… Offline-first architecture (via localStorage + Supabase)
  • โœ… React Query caching & stale-while-revalidate

๐ŸŒ Deployment

Vercel (Recommended)

# Deploy automatically on push to main
git push origin main

The app is configured in vercel.json for SSR + edge runtime.

Environment Variables (Vercel)

Set these in your Vercel dashboard:

  • VITE_SUPABASE_URL
  • VITE_SUPABASE_ANON_KEY
  • VITE_GROQ_API_KEY

๐ŸŽฏ Beta Users & Testimonials

"I work at a phone repair shop till 5pm. StudyPal gives me 10-minute sessions I can actually finish. My GPA went from 2.8 to 3.4 this semester." โ€” Tunde A., 300L Engineering, LASU

"I uploaded my Biology past questions and StudyPal turned them into daily quizzes. I scored 287 on my JAMB. I wasn't expecting that at all." โ€” Chisom E., JAMB Candidate, Enugu

"The voice lessons are everything. I listen while I'm cooking or on the bus. It actually asks me questions and waits for my answer. Nothing else does that." โ€” Amaka O., HND Accounting, Yaba Tech


๐Ÿค Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/your-feature)
  3. Commit changes (git commit -m 'Add your feature')
  4. Push to the branch (git push origin feature/your-feature)
  5. Open a Pull Request

๐Ÿ“„ License

This project is part of the YPIT Hackathon 2026. See LICENSE file for details.


๐Ÿ“ž Contact

  • GitHub: @zion-robotics
  • Built for: YPIT Hackathon 2026 โ€” Education Track

๐Ÿš€ What's Next?

  • [ ] Mobile app (React Native)
  • [ ] AI-generated exam simulations
  • [ ] Peer tutoring marketplace
  • [ ] Integration with school LMS
  • [ ] Multi-language support
  • [ ] Advanced analytics dashboard

Built for students who work while they study.

Built With

  • framer-motion
  • groq
  • pwa
  • radix-ui
  • react
  • react-hook-form
  • supabase
  • tailwind-css
  • tanstack-router
  • typescript
  • vercel
  • vite
  • zod
Share this project:

Updates