Skip to content

AqilaRifti/StudyBlocks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StudyBlocks Platform

A full-stack student productivity platform built with Nuxt 3, integrating AI-powered study tools, assignment planning, mood tracking, and task management.

Features

  • 📚 Study Guide Generator: Transform notes into comprehensive study guides with summaries, flashcards, and practice questions
  • 📝 Assignment Planner: Generate structured outlines, slide decks, and time plans for assignments
  • 🧠 Spaced Repetition: Smart flashcard system with SRS algorithm for optimal learning
  • 📊 Mood Journal: Track wellbeing with AI-powered burnout risk analysis
  • Task Management: Organize and track study tasks with deadlines
  • 🤖 AI-Powered: All features powered by Cerebras AI with load-balanced API keys

Tech Stack

  • Frontend: Nuxt 3, Vue 3, TypeScript, Tailwind CSS, shadcn-vue
  • Backend: Nuxt Nitro server routes
  • Database: Supabase (PostgreSQL)
  • Authentication: Clerk
  • AI: Cerebras Cloud SDK (8 API keys for load balancing)

Setup

1. Install Dependencies

npm install

2. Configure Environment Variables

Copy .env.example to .env and fill in your credentials:

cp .env.example .env

Required variables:

  • SUPABASE_URL: Your Supabase project URL
  • SUPABASE_ANON_KEY: Supabase anonymous key
  • SUPABASE_SERVICE_KEY: Supabase service role key
  • NUXT_PUBLIC_CLERK_PUBLISHABLE_KEY: Clerk publishable key
  • CLERK_SECRET_KEY: Clerk secret key

3. Set Up Database

Run the SQL schema in your Supabase project:

# Copy the contents of supabase/schema.sql
# Paste into Supabase SQL Editor and run

Or use the Supabase CLI:

supabase db push

4. Start Development Server

npm run dev

The app will be available at http://localhost:3000

API Endpoints

Notes

  • POST /api/notes/upload - Upload a note
  • GET /api/notes - List all notes
  • GET /api/notes/:id - Get note details
  • DELETE /api/notes/:id - Delete a note

AI Generation

  • POST /api/ai/study-guide - Generate study guide from notes
  • POST /api/ai/assignment-outline - Generate assignment outline
  • POST /api/ai/generate-questions - Generate practice questions
  • POST /api/ai/analyze-mood - Analyze mood and assess burnout risk

Tasks

  • GET /api/tasks - List tasks
  • POST /api/tasks - Create task
  • PATCH /api/tasks/:id - Update task
  • DELETE /api/tasks/:id - Delete task

Journal

  • GET /api/journal - List journal entries
  • POST /api/journal - Create journal entry
  • DELETE /api/journal/:id - Delete journal entry

Study Guides

  • GET /api/study-guides - List study guides
  • GET /api/study-guides/:id - Get study guide details

Flashcards

  • GET /api/flashcards - List flashcards
  • PATCH /api/flashcards/:id/review - Review flashcard (SRS update)

Dashboard

  • GET /api/dashboard - Get dashboard overview

Settings

  • GET /api/settings - Get user settings
  • PATCH /api/settings - Update settings

Testing

Run the API test script:

npx tsx test-api.ts

This will test all major endpoints including:

  • Note creation
  • Study guide generation
  • Task management
  • Journal entries
  • AI-powered features

Database Schema

The platform uses the following main tables:

  • users - User profiles
  • notes - Uploaded study notes
  • study_guides - Generated study guides
  • flashcards - Spaced repetition flashcards
  • assignments - Assignment outlines and plans
  • journals - Mood journal entries
  • tasks - Task management
  • sessions - Pomodoro sessions
  • ai_jobs - AI generation job logs
  • settings - User preferences

AI Features

All AI features use Cerebras Cloud SDK with automatic load balancing across 8 API keys:

  1. Study Guide Generation: Transforms notes into structured study materials
  2. Assignment Outlining: Creates comprehensive assignment plans
  3. Question Generation: Generates practice questions from any text
  4. Burnout Analysis: Assesses mental health and provides suggestions

Security

  • All API keys stored server-side
  • Row Level Security (RLS) enabled on all tables
  • JWT-based authentication via Clerk
  • Rate limiting on AI endpoints
  • Daily AI quota per user (default: 50 requests)

Development

# Start dev server
npm run dev

# Build for production
npm run build

# Preview production build
npm run preview

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors