Video Library Builder

A comprehensive, production-ready skill for building video libraries with filtering, search, ratings, comments, and analytics. Perfect for educational platforms, content hubs, and knowledge bases.

4
Core Capabilities
15+
tRPC Procedures
5
Database Tables
3
Video Sources

Key Features

Advanced Filtering

Filter videos by category, search by title and description, and discover content easily.

User Ratings

Allow users to rate videos 1-5 stars and see aggregate ratings from the community.

Comments & Reviews

Enable user discussions with comment threads, moderation, and community engagement.

Watch History

Track watched videos, continue watching progress, and enable personalized recommendations.

Analytics Dashboard

Monitor video performance, user engagement, completion rates, and watch duration metrics.

Multi-Source Support

Support YouTube, Vimeo, and self-hosted videos with seamless playback and thumbnails.

Core Capabilities

  • Category-based filtering with custom categories
  • Full-text search by title and description
  • Pagination for performance optimization
  • Trending videos display
  • Continue watching section for logged-in users

Implementation Examples

Database Schema

TypeScript

// Videos table with multi-source support
export const videos = mysqlTable("videos", {
  id: varchar("id", { length: 255 }).primaryKey(),
  title: varchar("title", { length: 255 }).notNull(),
  category: varchar("category", { length: 100 }).notNull(),
  source: enum("source", ["youtube", "vimeo", "self-hosted"]),
  videoId: varchar("video_id", { length: 255 }).notNull(),
  viewCount: int("view_count").default(0),
  createdAt: timestamp("created_at").defaultNow(),
});

tRPC Procedure

TypeScript

// List videos with filtering
export const videoRouter = router({
  list: publicProcedure
    .input(z.object({
      category: z.string().optional(),
      search: z.string().optional(),
      limit: z.number().default(50),
    }))
    .query(async ({ input }) => {
      return await db.query.videos.findMany({
        where: (videos, { and, like, eq }) =>
          and(
            input.category ? eq(videos.category, input.category) : undefined,
            input.search ? like(videos.title, `%${input.search}%`) : undefined
          ),
      });
    }),
});

React Component

TypeScript

// Filter videos with search
const filteredVideos = useMemo(() => {
  return videos.filter((video) => {
    const matchesCategory = selectedCategory === "All" || 
      video.category === selectedCategory;
    const matchesSearch = video.title
      .toLowerCase()
      .includes(searchQuery.toLowerCase());
    return matchesCategory && matchesSearch;
  });
}, [videos, selectedCategory, searchQuery]);

Tech Stack & Resources

Included Resources

  • SKILL.md

    Complete workflow documentation

  • Database Schema

    Drizzle ORM schema for 5 tables

  • API Procedures

    15+ tRPC procedures

  • React Component

    Production-ready UI

  • Seed Script

    Populate initial videos

Technology Stack

  • React 19

    Modern UI framework

  • tRPC 11

    Type-safe API layer

  • Drizzle ORM

    Database layer

  • Tailwind CSS 4

    Styling framework

  • MySQL/TiDB

    Database support

Perfect For

Educational Platforms

Build comprehensive course libraries with video lessons, student ratings, and progress tracking.

Content Hubs

Create engaging video content libraries with community engagement and analytics.

Knowledge Bases

Organize tutorial videos and how-to guides with powerful search and filtering.

Business Training

Deliver employee training videos with completion tracking and engagement metrics.

Ready to Build?

Get started with the Video Library Builder skill and create a production-ready video platform in minutes.

Privacy & Cookies

We use cookies to enhance your experience, analyze site traffic, and enable marketing features. By clicking "Accept All", you consent to our use of cookies. You can customize your preferences below.