MY-BIGGEST COURSE GUIDE

Build a Full Google Drive Clone with Next.js & TypeScript

A chapter-by-chapter readback of the free course by Theo (Theo Browne) on Theo - t3․gg.

Length3:27:34
Chapters20
Modules6
Plain Markdown with clickable timestamps — drops into Obsidian, Notion or GitHub as-is.

Unlike polished tutorials, this course shows the real process: rabbit holes, AI tooling, live debugging and opinions (like skipping migrations and hating them). You learn not just what to build but why choices are made.

Who it's for
Read this guide if
  • You know React/TypeScript basics and want to see a full-stack app assembled end to end
  • You want real-world workflows: Netlify previews, GitHub Actions CI, server actions, Drizzle
  • You enjoy strong, opinionated commentary on tooling trade-offs
Skip ahead if
  • You need a slow, beginner-friendly introduction to React or JavaScript
  • You want a polished, edited tutorial without live debugging detours
  • You only care about one narrow topic (e.g. just auth or just uploads)
In brief
  • Total runtime: about 3 hours 27 minutes (12,454 seconds).
  • 20 chapters grouped into 6 chronological modules.
  • Tools: Next.js App Router, TypeScript, Drizzle ORM, SingleStore, Clerk, UploadThing, PostHog, Netlify.
  • Level: intermediate — assumes comfort with React, TypeScript and Git.
  • Format: unedited live build with opinions, AI-assisted coding and debugging on camera.

The walkthrough

Each chapter below is our original written explanation of what happens at that moment in the video — a paraphrase, not a transcript. Click any timestamp to jump the player.

Project Setup & Deployment

0:00

Introduction

Theo outlines the plan: build a complete Google Drive clone from scratch while showing rabbit holes, AI usage and live debugging instead of a polished recreation. Sponsors funding the free tutorial are introduced.

2:03

Scaffolding with T3 Stack

The project is created with create-t3-app: TypeScript, Drizzle, Next App Router, Clerk auth instead of NextAuth, and t3-env so missing environment variables fail loudly at build time.

5:12

First Deploy to Netlify

The repo is pushed to GitHub and imported into Netlify, with the database URL entered manually. Advice: deploy as early as possible so deployment never breaks late, and never commit secrets.

7:34

Prototyping the UI with v0

The Drive UI is generated with v0 from a mock-data prompt, then refined: dark mode, list view, breadcrumbs, no sidebar. v0's shadcn/ui components are copy-pasted into the codebase.

UI Wiring, CI & Database Choice

10:05

Adding shadcn Components

The shadcn CLI is used to add components, hitting a classic bug where both an app folder and src/app exist and confuse Next.js. Fix tips like deleting .next are shared.

11:57

Mock Data and Client State

Mock folders and files render from component state instead of the URL, which is flagged as temporary. Theo explains nullish coalescing versus the OR operator while wiring click handlers.

16:56

CI with GitHub Actions

A CI workflow runs type-check and lint on every push and PR, with preview deploys from Netlify giving shareable test URLs. Theo argues CI is almost always worth it.

22:54

Choosing and Setting Up SingleStore

SingleStore is picked as the database: SQL-based, scalable, with official Drizzle bindings. A deployment is created, tokens generated, and environment variables configured in Netlify and validated with t3-env.

Data Modeling

27:21

Connecting Drizzle to SingleStore

A mysql2 connection pool is created in server/db and cached on globalThis for hot reloads, with quirks like ssl: {} and maxIdle: 0 explained along the way.

53:05

Defining the Files and Folders Schema

Mock types are split into separate File and Folder types, then mirrored as Drizzle tables with bigint IDs and an index on parent for fast per-folder lookups. Theo explains why he skips migrations in favor of db push.

56:43

Pushing the Schema and Seeding

The schema is pushed to SingleStore after fixing table prefixes and ID types, then mock data is seeded through a sandbox page using a server action and Drizzle inserts.

Real Data, Routing & Clean Architecture

1:08:52

Rendering Real Database Data

The client page becomes a server component that queries files and folders directly, with Drizzle's inferSelect providing types. Row components are split out and server-only imports guard the boundary.

1:14:11

Folder Routes via Dynamic Segments

A dynamic /f/[folderId] route replaces client-state navigation; params must be awaited, arrive as strings, and are parsed with parseInt before querying with an indexed where clause.

1:27:19

Real Links and Parallel Fetches

Folder buttons become Next.js Link components, client state is removed, and folder/file queries run in parallel with Promise.all alongside a new getAllParents query that powers fixed breadcrumbs.

1:41:27

Extracting a Data Access Layer

All SQL moves into a server/queries.ts file grouped under a queries object, keeping components free of database logic. Theo explains why queries and mutations are separated and argues you should never write SQL inside components.

Auth, Uploads & Ownership

1:50:22

Authentication with Clerk

Clerk provides Google OAuth, middleware, and SignedIn/SignedOut components with full working auth in minutes. A GPG signing key expiry detour teaches the new ECC default for commits.

2:03:13

File Uploads with UploadThing

An UploadThing file router defines upload endpoints with auth middleware and an onUploadComplete callback that persists files to the database; router.refresh makes uploads appear instantly.

2:24:01

Ownership and Input Validation

ownerId and timestamps are added to the schema, uploads target the current folder via a tRPC-style Zod-validated input, and permission checks ensure only owners can upload to a folder.

Analytics, Deletion & the Home Page

2:42:00

Analytics with PostHog

PostHog is integrated with user identification via Clerk, page-view tracking that works with client-side navigation, and Netlify rewrites as a reverse proxy so ad blockers don't drop events.

3:00:37

Deleting Files and Building the Home Page

A deleteFile server action verifies auth and ownership and removes files from both DB and UploadThing, with a cookie-set trick for revalidation. A v0-generated marketing page and onboarding flow create the user's root folder, wrapping up the app.

Moment by moment

TimeWhy it matters
5:12Deploying to Netlify in minute five — the 'deploy early, deploy often' principle in action.
22:54SingleStore is introduced as the database, setting up the whole Drizzle data-modeling arc.
53:05Designing the files/folders schema with bigint IDs and a parent index — the core data-model decision of the app.
1:50:22Full Clerk authentication goes live in minutes, including middleware and provider setup.
3:00:37Secure file deletion with ownership checks plus the home page and onboarding flow complete the app.

Do this next

  1. Extend the app yourself: add folder creation and folder deletion via server actions, as suggested as homework in the video.
  2. Fix the access-control gap by adding an owner check to folder pages so users can't view others' drives via links.
  3. Polish UX with toasts, loading states and optimistic updates for uploads and deletions.

Common questions

What stack is used in this Google Drive clone tutorial?

Next.js App Router with TypeScript, Drizzle ORM on SingleStore, Clerk for auth, UploadThing for file storage, PostHog for analytics, and Netlify for deployment and previews.

How long is the tutorial?

About 3 hours and 27 minutes (12,454 seconds), and it's a single unedited live build rather than a cut-together course.

Why does Theo skip database migrations?

He considers migrations an anti-pattern for this workflow and uses drizzle-kit push (via the db:push script) to sync the schema directly instead.

Is this tutorial beginner-friendly?

Not fully — it moves fast and assumes React, TypeScript and Git basics, but its honest debugging and opinionated explanations make it valuable for intermediates.

Spot a mistake?

Every timestamp and summary on this page has been hand-checked against the video, but a 3.5-hour build can hide slips. If you spot an error or a misleading summary, tell us and we'll fix it.

More course guides