Skip to content

A spaced repetition learning application that helps you master and retain what you learn using scientifically proven review intervals.

Notifications You must be signed in to change notification settings

blackstuend/Daily-Lesson-Review

Repository files navigation

Daily Study Review

A spaced repetition learning application that helps you master and retain what you study using scientifically proven review intervals.

Features

  • Spaced Repetition System: Review lessons at optimal intervals (0, 1, 3, and 7 days) to maximize retention
  • Flexible Study Items: Save links, difficult words, or sentences you want to remember
  • Waiting List: Stage lessons you plan to learn later, then promote them into the main study flow when ready
  • Daily Reviews: Get reminded to review at the right time
  • Progress Tracking: Visualize your learning journey with calendar view
  • User Authentication: Secure authentication powered by Supabase
  • Responsive Design: Works seamlessly on desktop and mobile devices

Tech Stack

  • Framework: Next.js 16 with React 19
  • Language: TypeScript
  • Database: Supabase (PostgreSQL)
  • Authentication: Supabase Auth
  • Styling: Tailwind CSS v4
  • UI Components: Radix UI primitives
  • State Management: Zustand
  • Form Handling: React Hook Form with Zod validation
  • Date Utilities: date-fns
  • Icons: Lucide React

Getting Started

Prerequisites

  • Node.js 18+ installed
  • A Supabase account and project

Installation

  1. Clone the repository:
git clone <repository-url>
cd daily-study-review
  1. Install dependencies:
pnpm install
# or
npm install
# or
yarn install
  1. Set up environment variables:

Create a .env file in the root directory with the following variables:

NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
  1. Set up the database:

Run the SQL scripts in the scripts/ directory in your Supabase SQL editor:

  • 001_create_lessons_table.sql - Creates the lessons and review_schedule tables
  • 002_create_review_trigger.sql - Sets up automatic review scheduling
  • 003_add_lesson_date_column.sql - Adds explicit lesson dates to avoid timezone drift
  • 004_fix_review_schedule_trigger.sql - Ensures review schedules stay in sync
  • 005_add_linked_lessons_relation.sql - Allows lessons to reference a related lesson
  • 006_create_waiting_lessons_table.sql - Adds the waiting list table plus the promotion helper function
  • 007_sync_review_schedule_on_lesson_date_update.sql - Keeps the review schedule aligned whenever a lesson's date changes
  1. Run the development server:
pnpm dev
# or
npm run dev
# or
yarn dev
  1. Open http://localhost:3000 in your browser

Project Structure

.
├── app/                    # Next.js app directory
│   ├── auth/              # Authentication pages (login, sign-up)
│   ├── dashboard/         # Dashboard and main app features
│   ├── globals.css        # Global styles
│   ├── layout.tsx         # Root layout
│   └── page.tsx           # Landing page
├── components/            # Reusable UI components
│   └── ui/               # shadcn/ui components
├── hooks/                # Custom React hooks
├── lib/                  # Utility functions and configurations
├── scripts/              # Database setup scripts
├── stores/               # Zustand state management
├── styles/               # Additional styles
└── public/               # Static assets

Database Schema

Lessons Table

Stores user's learning content with support for three types:

  • link: Web links to articles, videos, or resources
  • word: Difficult words to remember
  • sentence: Important sentences or phrases

Review Schedule Table

Tracks the spaced repetition schedule for each lesson:

  • Review intervals: 0, 1, 3, and 7 days
  • Completion tracking
  • Automatic scheduling via database triggers

How It Works

  1. Add Study Items: Create new lessons by adding links, words, or sentences you want to remember
  2. Automatic Scheduling: The system automatically creates a review schedule with intervals at 0, 1, 3, and 7 days
  3. Daily Reviews: Check your dashboard to see which study items are due for review today
  4. Mark as Complete: Mark reviews as complete after studying them
  5. Track Progress: View your study progress on the calendar

Available Scripts

  • pnpm dev - Start development server
  • pnpm build - Build for production
  • pnpm start - Start production server
  • pnpm lint - Run ESLint

License

This project is private and not licensed for public use.

Contributing

This is a private project. Contributions are not currently accepted.

About

A spaced repetition learning application that helps you master and retain what you learn using scientifically proven review intervals.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •