Menu

Tree [982829] master /
 History

HTTPS access


File Date Author Commit
 .github 2025-12-16 Mario Siric Mario Siric [2f52b1] Initial commit
 .husky 2025-12-16 Mario Siric Mario Siric [2f52b1] Initial commit
 prisma 2025-12-29 msiric msiric [1fc62c] refactor: cleanup and reorg
 public 2025-12-16 Mario Siric Mario Siric [2f52b1] Initial commit
 src 2026-01-09 msiric msiric [982829] fix: limit DB network data transfer
 .DS_Store 2025-12-16 Mario Siric Mario Siric [2f52b1] Initial commit
 .env.example 2025-12-24 msiric msiric [e524a8] feat: add isOwner flag
 .eslintrc.json 2025-12-25 msiric msiric [0f22ee] refactor: lint cleanup
 .gitignore 2025-12-24 msiric msiric [bfd2c9] fix: symlinks
 .lintstagedrc.js 2025-12-16 Mario Siric Mario Siric [2f52b1] Initial commit
 LICENSE.md 2025-12-16 Mario Siric Mario Siric [2f52b1] Initial commit
 README.md 2025-12-24 msiric msiric [e524a8] feat: add isOwner flag
 docker-compose.yml 2025-12-16 Mario Siric Mario Siric [2f52b1] Initial commit
 logo.svg 2025-12-16 Mario Siric Mario Siric [2f52b1] Initial commit
 mdx-components.tsx 2025-12-16 Mario Siric Mario Siric [2f52b1] Initial commit
 next-env.d.ts 2025-12-16 Mario Siric Mario Siric [2f52b1] Initial commit
 next.config.mjs 2025-12-16 Mario Siric Mario Siric [2f52b1] Initial commit
 overrides.sh 2025-12-16 Mario Siric Mario Siric [2f52b1] Initial commit
 package.json 2025-12-29 msiric msiric [76c1ba] feat: add idempotency keys
 postcss.config.js 2025-12-16 Mario Siric Mario Siric [2f52b1] Initial commit
 prettier.config.js 2025-12-16 Mario Siric Mario Siric [2f52b1] Initial commit
 sentry.client.config.ts 2025-12-16 Mario Siric Mario Siric [2f52b1] Initial commit
 sentry.edge.config.ts 2025-12-16 Mario Siric Mario Siric [2f52b1] Initial commit
 sentry.server.config.ts 2025-12-16 Mario Siric Mario Siric [2f52b1] Initial commit
 tailwind.config.ts 2025-12-16 Mario Siric Mario Siric [2f52b1] Initial commit
 tsconfig.json 2025-12-16 Mario Siric Mario Siric [2f52b1] Initial commit
 typography.ts 2025-12-16 Mario Siric Mario Siric [2f52b1] Initial commit
 vitest.config.mts 2025-12-24 msiric msiric [e524a8] feat: add isOwner flag
 yarn.lock 2025-12-29 msiric msiric [76c1ba] feat: add idempotency keys

Read Me

<picture> Memoized </picture>

An open-source JavaScript/TypeScript interview prep platform

WebsiteFeaturesQuick StartArchitecture

Production License: MIT


Features

  • Structured courses: JavaScript and Data Structures & Algorithms tracks with progressive curriculum
  • Practice problems: 450+ coding and theory problems linked to lessons with difficulty ratings
  • Progress tracking: Mark lessons and problems as complete with visual analytics dashboard
  • Premium content system: Free and premium access tiers with Stripe subscription management
  • Full-text search: Fast, relevant search across all content powered by MeiliSearch
  • OAuth authentication: Sign in with GitHub or Google via NextAuth.js
  • MDX content: Rich lessons with syntax-highlighted code, interactive components and custom annotations
  • Pre-compiled content: MDX serialized at build/sync time for fast page loads
  • Resources library: Standalone reference materials for data structures, async patterns and more

Quick Start

Requirements: Node.js 18+, Yarn, Docker Desktop

git clone https://github.com/msiric/memoized.git
cd memoized
yarn install
yarn setup:dev
yarn dev

Open http://localhost:3000

Architecture

Frontend        Next.js 14 (App Router) + React + Tailwind CSS
API Layer       Server Actions + Route Handlers + NextAuth.js
Services        Course · Lesson · Problem · Resource · Subscription · User
Data            PostgreSQL (Prisma ORM) + MeiliSearch
Integrations    Stripe (Payments) · Resend (Email) · Sentry (Monitoring)

Data Model

  • Courses → Sections → Lessons → Problems
  • Resources: Standalone reference content (linked to lessons optionally)
  • Users → Accounts (OAuth) → Customers (Stripe) → Subscriptions
  • Progress: UserLessonProgress + UserProblemProgress tracking

Content Pipeline

  1. MDX files with _lessons.json metadata define curriculum structure
  2. yarn sync:all parses MDX, serializes with Shiki highlighting, stores in PostgreSQL
  3. yarn index indexes lessons in MeiliSearch for search
  4. Pre-serialized content hydrates instantly on page load

Manual Setup

  1. Clone and install:

bash git clone https://github.com/msiric/memoized.git cd memoized yarn install

  1. Environment setup:

bash cp .env.example .env.local

Update database URL in .env.local:

DATABASE_URL="postgresql://postgres:postgres@localhost:5432/postgres" MEILISEARCH_HOST="http://localhost:7700" MEILISEARCH_MASTER_KEY="dev-master-key"

  1. Start services:

bash docker-compose up -d # PostgreSQL + MeiliSearch

  1. Database setup:

bash yarn migrate:dev

  1. Content setup:

bash yarn setup:content # Auto-detects content source (see below) yarn sync:all:dev # Syncs all content to database

Content Sources (auto-detected by setup:content):
- Premium content: If ../memoized-content exists as a sibling directory, symlinks are created automatically. Changes are instantly reflected - just run yarn sync:all:dev after editing.
- Sample content: If no premium content is found, sample content from src/samples/ is copied for open-source development.

  1. Start development:
    bash yarn dev

Tech Stack

Category Technology
Framework Next.js 14 (App Router)
Language TypeScript
Database PostgreSQL + Prisma
Search MeiliSearch
Styling Tailwind CSS
Content MDX + Shiki
Auth NextAuth.js (GitHub, Google)
Payments Stripe
Email Resend
Testing Vitest
Monitoring Sentry
Deployment Vercel

Project Structure

memoized/
├── src/
   ├── app/              # Next.js App Router (pages, API routes)
   ├── components/       # React components
   ├── services/         # Business logic (course, lesson, problem, subscription)
   ├── scripts/          # Sync, index and setup scripts
   ├── mdx/              # MDX plugins (remark, rehype, recma)
   ├── content/          # Working directory for course content
   ├── samples/          # Sample content for local development
   ├── lib/              # Prisma, Stripe, MeiliSearch, Resend clients
   ├── hooks/            # React hooks
   ├── contexts/         # Zustand stores (auth, progress)
   ├── constants/        # App constants and curriculum config
   └── types/            # TypeScript types
├── prisma/               # Database schema and migrations
├── public/               # Static assets (images, icons)
└── docker-compose.yml    # Local PostgreSQL + MeiliSearch

Content System

Memoized uses a hybrid content architecture. Sample content is provided for local development:

src/samples/
├── js-track/
   ├── page.mdx                   # Course overview
   └── core-fundamentals/
       ├── _lessons.json          # Lesson metadata + problems
       └── variables/
           └── page.mdx           # Lesson content
└── dsa-track/

Development Workflow

  1. Setup: yarn setup:content - Copy sample content
  2. Sync: yarn sync:all:dev - Sync to local database
  3. Develop: yarn dev - Start development server

Contributing

Issues and PRs welcome.

License

MIT