Skip to content
ย 
ย 

Repository files navigation

๐Ÿง  Recallify

Train Your Memory. Level Up Your Learning.

React TypeScript Vite Tailwind Three.js

Scientifically proven spaced repetition meets gamified learning. Watch your recall skyrocket with Recallify.

Features โ€ข Demo โ€ข Tech Stack โ€ข Getting Started โ€ข Structure โ€ข Roadmap


โœจ Features

๐ŸŽฎ Gamification Engine

  • XP & Leveling System - Earn experience points for every correct answer
  • Streak Tracking - Build daily streaks to stay motivated
  • Achievement System - Unlock badges and rewards for milestones
  • Level-Up Celebrations - Animated modals celebrating your progress
  • XP Floaters - Real-time visual feedback for earned XP

๐Ÿง  Advanced Learning System

  • Spaced Repetition Algorithm - Science-backed review scheduling
  • Adaptive Difficulty - Cards adjust based on your performance
  • Recall Strength Tracking - Monitor memory retention per card
  • Smart Study Sessions - AI-optimized review recommendations
  • Multi-Deck Management - Organize cards by subject or category

๐Ÿ“Š Analytics & Insights

  • Performance Dashboard - Visualize your learning progress
  • Retention Analytics - Track recall rates over time
  • Study Heatmaps - See your most productive study patterns
  • Cognitive Load Monitor - Prevent mental fatigue with smart pacing
  • AI-Powered Insights - Get personalized study recommendations

๐ŸŽจ Beautiful UI/UX

  • 3D Interactive Hero - Immersive Three.js landing page
  • Glassmorphism Design - Modern, elegant UI components
  • Smooth Animations - Framer Motion powered transitions
  • Dark Mode Ready - Built-in theme support
  • Responsive Design - Seamless experience across all devices

๐Ÿ† Social Features

  • Leaderboards - Compete with friends and the community
  • Ghost Competitors - Race against AI-powered study partners
  • Challenge System - Daily, weekly, and special challenges
  • Social Proof - See what others are mastering
  • Community Stats - Compare your progress with global averages

๐ŸŽฏ Demo

Landing Page

Beautiful 3D interactive hero with glowing particles and ethereal animations

Dashboard

![Dashboard Features]

  • Quick stats overview with streak, retention, and cognitive load
  • Smart nudge banner for optimal study timing
  • Deck mastery progress with visual indicators
  • Active challenges and AI insights

Recall Mode

Interactive flashcard interface with:

  • Real-time XP tracking
  • Streak counter
  • Confidence-based difficulty adjustment
  • Session summary with detailed analytics

๐Ÿ› ๏ธ Tech Stack

Frontend Core

  • React 18.3 - UI library with concurrent features
  • TypeScript 5.8 - Type-safe development
  • Vite 5.4 - Lightning-fast build tool
  • React Router 6 - Client-side routing

Styling & Design

  • Tailwind CSS 3.4 - Utility-first styling
  • shadcn/ui - High-quality component library
  • Framer Motion 10 - Production-ready animations
  • Radix UI - Accessible component primitives

3D & Animations

  • Three.js 0.160 - 3D graphics library
  • React Three Fiber - React renderer for Three.js
  • React Three Drei - Useful helpers for R3F
  • GSAP 3.14 - Professional-grade animation

State & Data

  • TanStack Query - Server state management
  • Context API - Global app state (Auth, Game)
  • React Hook Form - Form state management
  • Zod - Schema validation

UI Enhancements

  • Recharts - Data visualization
  • Lucide React - Beautiful icon library
  • Sonner - Toast notifications
  • date-fns - Date manipulation

๐Ÿš€ Getting Started

Prerequisites

  • Node.js 18.x or higher
  • npm or bun package manager

Installation

# Clone the repository
git clone <your-repo-url>
cd memory-master

# Install dependencies
npm install
# or
bun install

# Start development server
npm run dev
# or
bun dev

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

Build for Production

# Create optimized build
npm run build

# Preview production build
npm run preview

Linting

# Run ESLint
npm run lint

๐Ÿ“ Project Structure

memory-master/
โ”œโ”€โ”€ public/                  # Static assets
โ”‚   โ””โ”€โ”€ robots.txt          # SEO configuration
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ components/         # React components
โ”‚   โ”‚   โ”œโ”€โ”€ brand/         # Logo and branding
โ”‚   โ”‚   โ”œโ”€โ”€ features/      # Feature showcases
โ”‚   โ”‚   โ”œโ”€โ”€ gamification/  # XP, streaks, level-ups
โ”‚   โ”‚   โ”œโ”€โ”€ layout/        # App shell components
โ”‚   โ”‚   โ”œโ”€โ”€ recall/        # Flashcard session UI
โ”‚   โ”‚   โ”œโ”€โ”€ social/        # Community features
โ”‚   โ”‚   โ””โ”€โ”€ ui/            # shadcn/ui components
โ”‚   โ”œโ”€โ”€ contexts/          # React Context providers
โ”‚   โ”‚   โ”œโ”€โ”€ AuthContext.tsx    # User authentication
โ”‚   โ”‚   โ””โ”€โ”€ GameContext.tsx    # Gamification state
โ”‚   โ”œโ”€โ”€ data/              # Mock data & types
โ”‚   โ”‚   โ””โ”€โ”€ mockData.ts    # Sample decks & cards
โ”‚   โ”œโ”€โ”€ hooks/             # Custom React hooks
โ”‚   โ”œโ”€โ”€ lib/               # Utilities
โ”‚   โ”‚   โ””โ”€โ”€ utils.ts       # Helper functions
โ”‚   โ”œโ”€โ”€ pages/             # Route components
โ”‚   โ”‚   โ”œโ”€โ”€ Index.tsx      # Landing page
โ”‚   โ”‚   โ”œโ”€โ”€ Dashboard.tsx  # Main dashboard
โ”‚   โ”‚   โ”œโ”€โ”€ RecallMode.tsx # Study session
โ”‚   โ”‚   โ”œโ”€โ”€ Analytics.tsx  # Performance stats
โ”‚   โ”‚   โ”œโ”€โ”€ Library.tsx    # Deck management
โ”‚   โ”‚   โ”œโ”€โ”€ Challenges.tsx # Achievement system
โ”‚   โ”‚   โ”œโ”€โ”€ Social.tsx     # Community hub
โ”‚   โ”‚   โ”œโ”€โ”€ Settings.tsx   # User preferences
โ”‚   โ”‚   โ””โ”€โ”€ Login.tsx      # Authentication
โ”‚   โ”œโ”€โ”€ App.tsx            # Root component
โ”‚   โ”œโ”€โ”€ main.tsx           # App entry point
โ”‚   โ””โ”€โ”€ index.css          # Global styles
โ”œโ”€โ”€ index.html             # HTML template
โ”œโ”€โ”€ vite.config.ts         # Vite configuration
โ”œโ”€โ”€ tailwind.config.ts     # Tailwind settings
โ”œโ”€โ”€ tsconfig.json          # TypeScript config
โ””โ”€โ”€ package.json           # Dependencies

๏ฟฝ๏ธ Architecture

System Architecture

graph TB
    subgraph "Frontend Application"
        A[React App] --> B[React Router]
        A --> C[Context Providers]
        
        C --> C1[AuthContext]
        C --> C2[GameContext]
        
        B --> D[Pages]
        D --> D1[Landing/Index]
        D --> D2[Dashboard]
        D --> D3[RecallMode]
        D --> D4[Analytics]
        D --> D5[Library]
        D --> D6[Social]
        D --> D7[Challenges]
        D --> D8[Settings]
        
        A --> E[Components]
        E --> E1[Layout Components]
        E --> E2[UI Components]
        E --> E3[Feature Components]
        E --> E4[Gamification]
        
        A --> F[3D Engine]
        F --> F1[Three.js]
        F --> F2[React Three Fiber]
        F --> F3[GSAP Animations]
    end
    
    subgraph "State Management"
        G[TanStack Query] --> A
        H[Mock Data] --> A
        I[Local Storage] -.->|Future| A
    end
    
    subgraph "Styling & UI"
        J[Tailwind CSS] --> A
        K[shadcn/ui] --> E2
        L[Framer Motion] --> E
        M[Radix UI] --> K
    end
    
    subgraph "Backend (Planned)"
        N[REST API] -.->|Future| A
        O[(Database)] -.->|Future| N
        P[Authentication Service] -.->|Future| N
        Q[Spaced Repetition Engine] -.->|Future| N
    end
    
    style A fill:#61DAFB,stroke:#333,stroke-width:3px
    style N fill:#f9f,stroke:#333,stroke-width:2px,stroke-dasharray: 5 5
    style O fill:#f9f,stroke:#333,stroke-width:2px,stroke-dasharray: 5 5
    style P fill:#f9f,stroke:#333,stroke-width:2px,stroke-dasharray: 5 5
    style Q fill:#f9f,stroke:#333,stroke-width:2px,stroke-dasharray: 5 5
Loading

Component Hierarchy

graph TD
    A[App.tsx] --> B[QueryClientProvider]
    B --> C[AuthProvider]
    C --> D[GameProvider]
    D --> E[TooltipProvider]
    E --> F[BrowserRouter]
    
    F --> G[Routes]
    
    G --> H1[Index - Landing Page]
    G --> H2[Login Page]
    G --> H3[Protected Routes]
    
    H3 --> I1[Dashboard]
    H3 --> I2[RecallMode]
    H3 --> I3[Analytics]
    H3 --> I4[Library]
    H3 --> I5[Social]
    H3 --> I6[Challenges]
    H3 --> I7[Settings]
    
    I1 --> J[AppLayout]
    I2 --> J
    I3 --> J
    I4 --> J
    I5 --> J
    I6 --> J
    I7 --> J
    
    J --> K1[Header]
    J --> K2[Sidebar]
    J --> K3[Main Content]
    
    I1 --> L1[StreakCard]
    I1 --> L2[XPProgress]
    I1 --> L3[SmartNudgeBanner]
    
    I2 --> M1[Flashcard Display]
    I2 --> M2[SessionSummary]
    I2 --> M3[XPFloater]
    
    style A fill:#8B5CF6,stroke:#333,stroke-width:3px,color:#fff
    style B fill:#61DAFB,stroke:#333,stroke-width:2px
    style C fill:#F59E0B,stroke:#333,stroke-width:2px
    style D fill:#22C55E,stroke:#333,stroke-width:2px
Loading

Data Flow Architecture

sequenceDiagram
    participant U as User
    participant UI as UI Components
    participant AC as AuthContext
    participant GC as GameContext
    participant MD as Mock Data
    participant LS as Local Storage
    
    Note over U,LS: User Login Flow
    U->>UI: Enter Credentials
    UI->>AC: login(email, password)
    AC->>MD: Validate User
    MD-->>AC: User Data
    AC->>AC: setUser(userData)
    AC-->>UI: isAuthenticated = true
    UI->>U: Redirect to Dashboard
    
    Note over U,LS: Study Session Flow
    U->>UI: Start Study Session
    UI->>MD: Get Flashcards
    MD-->>UI: Cards Array
    U->>UI: Answer Card (correct/incorrect)
    UI->>GC: addXPEvent(xpAmount)
    GC->>GC: Update XP Events
    GC-->>UI: Show XP Floater
    UI->>AC: addXP(xpAmount)
    AC->>AC: Check Level Up
    alt Level Up
        AC->>GC: triggerLevelUp(newLevel)
        GC-->>UI: Show Level Up Modal
    end
    AC-->>UI: Updated User State
    
    Note over U,LS: Future Backend Integration
    UI-.->LS: Cache Data (Offline Mode)
    LS-.->UI: Restore on Reconnect
Loading

User Journey Map

journey
    title Recallify User Journey
    section Discovery
      Visit Landing Page: 5: User
      View 3D Animation: 5: User
      Read Features: 4: User
      Click Get Started: 5: User
    section Onboarding
      Create Account: 3: User
      Login: 4: User
      View Tutorial: 4: User
    section Daily Usage
      Check Dashboard: 5: User
      Review Due Cards: 4: User
      Start Study Session: 5: User
      Answer Cards: 5: User
      Earn XP & Level Up: 5: User
      View Progress: 5: User
    section Engagement
      Complete Challenges: 4: User
      Check Leaderboard: 4: User
      View Analytics: 5: User
      Adjust Settings: 3: User
    section Retention
      Maintain Streak: 5: User
      Unlock Achievements: 5: User
      Share Progress: 4: User
Loading

State Management Flow

stateDiagram-v2
    [*] --> Unauthenticated
    
    Unauthenticated --> Authenticated: Login Success
    Authenticated --> Unauthenticated: Logout
    
    state Authenticated {
        [*] --> Dashboard
        Dashboard --> StudySession: Start Review
        Dashboard --> Library: Manage Decks
        Dashboard --> Analytics: View Stats
        Dashboard --> Social: Check Leaderboard
        Dashboard --> Challenges: View Challenges
        
        StudySession --> AnswerCard
        AnswerCard --> EarnXP
        EarnXP --> CheckLevelUp
        CheckLevelUp --> LevelUp: XP >= Threshold
        CheckLevelUp --> Continue: XP < Threshold
        LevelUp --> Continue
        Continue --> AnswerCard: More Cards
        Continue --> SessionComplete: No More Cards
        SessionComplete --> Dashboard
        
        Library --> CreateDeck
        Library --> EditDeck
        Library --> DeleteDeck
        CreateDeck --> Library
        EditDeck --> Library
        DeleteDeck --> Library
    }
Loading

Technology Stack Layers

graph LR
    subgraph "Presentation Layer"
        A1[React Components]
        A2[shadcn/ui]
        A3[Three.js Canvas]
        A4[Framer Motion]
    end
    
    subgraph "State Layer"
        B1[React Context]
        B2[TanStack Query]
        B3[React Hook Form]
        B4[Local State]
    end
    
    subgraph "Logic Layer"
        C1[Custom Hooks]
        C2[Utility Functions]
        C3[Type Definitions]
        C4[Mock Data]
    end
    
    subgraph "Styling Layer"
        D1[Tailwind CSS]
        D2[CSS Modules]
        D3[Theme System]
    end
    
    subgraph "Build Layer"
        E1[Vite]
        E2[TypeScript]
        E3[ESLint]
        E4[PostCSS]
    end
    
    A1 --> B1
    A2 --> D1
    A3 --> A1
    A4 --> A1
    B1 --> C1
    B2 --> C1
    C1 --> C4
    D1 --> E4
    E2 --> E1
    
    style A1 fill:#61DAFB,stroke:#333
    style B1 fill:#F59E0B,stroke:#333
    style C1 fill:#22C55E,stroke:#333
    style D1 fill:#06B6D4,stroke:#333
    style E1 fill:#646CFF,stroke:#333
Loading

๏ฟฝ๐ŸŽจ Key Features Explained

Spaced Repetition Algorithm

Recallify implements a modified SM-2 algorithm that:

  • Schedules reviews based on recall strength (0-100)
  • Adjusts intervals based on answer confidence
  • Optimizes for long-term retention (currently at 94.8% vs 72% average)

Gamification System

  • XP Formula: Base XP ร— Difficulty Multiplier ร— Streak Bonus
  • Level Progression: Exponential curve requiring ~1.5x more XP per level
  • Streak System: Daily study maintains streaks with 24-hour grace period

AI Insights

Mock AI system provides:

  • Optimal study time recommendations
  • Deck mastery predictions
  • Cognitive load warnings
  • Personalized study strategies

๐Ÿ—“๏ธ Roadmap

Phase 1: Backend Integration โณ

  • REST API development
  • User authentication & authorization
  • Database schema design (PostgreSQL/MongoDB)
  • Card CRUD operations
  • Session tracking & analytics storage

Phase 2: Core Features ๐ŸŽฏ

  • Real spaced repetition algorithm implementation
  • Card creation & editing UI
  • Image & audio support for cards
  • Export/Import deck functionality
  • Offline mode with sync

Phase 3: Advanced Features ๐Ÿš€

  • AI-powered card generation
  • Collaborative deck sharing
  • Real-time multiplayer challenges
  • Advanced analytics & insights
  • Mobile app (React Native)

Phase 4: Premium Features ๐Ÿ’Ž

  • Unlimited deck creation
  • Priority AI insights
  • Custom themes
  • Advanced statistics
  • Team collaboration tools

๐Ÿงช Current Status

โœ… Completed

  • โœจ Complete UI/UX design system
  • ๐ŸŽจ All frontend pages and components
  • ๐ŸŽฎ Gamification mechanics (XP, levels, streaks)
  • ๐Ÿ“Š Mock data and state management
  • ๐ŸŽญ Authentication flow (frontend only)
  • ๐ŸŒˆ 3D interactive landing page
  • ๐Ÿ“ฑ Fully responsive design

๐Ÿ—๏ธ In Progress

  • โš™๏ธ Backend API development
  • ๐Ÿ—„๏ธ Database integration
  • ๐Ÿ” Real authentication system

๐Ÿ“‹ Planned

  • ๐Ÿ“ฑ Mobile applications
  • ๐Ÿค– AI card generation
  • ๐Ÿ‘ฅ Social features expansion
  • ๐ŸŒ Internationalization

๐Ÿค Contributing

Contributions are welcome! This project is currently in frontend-only stage. The backend integration is the next major milestone.

How to Contribute

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

Development Guidelines

  • Follow the existing code style
  • Use TypeScript for type safety
  • Write meaningful commit messages
  • Test your changes across devices
  • Update documentation as needed

๐Ÿ“ Environment Variables

Currently, no environment variables are required as the app uses mock data. Once backend is integrated:

VITE_API_URL=http://localhost:3000/api
VITE_WS_URL=ws://localhost:3000

๐Ÿ› Known Issues

  • Mock authentication doesn't persist across refreshes
  • All data resets on page reload (no backend yet)
  • Some animations may be heavy on low-end devices
  • Three.js hero scene needs optimization for mobile

๐Ÿ“œ License

This project is currently unlicensed. Please add a license file (MIT, Apache 2.0, etc.) before publishing.


๐Ÿ‘จโ€๐Ÿ’ป Author

Built with โค๏ธ by Shafwan Safi


๐Ÿ™ Acknowledgments


๐Ÿ“ž Support

For support, questions, or feedback:


โญ Star this repo if you find it useful!

Happy Learning! ๐Ÿง โœจ

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages