[ SaaS Product ]

Frameflow

Browser-based AI video editor

THE CHALLENGE

Professional editing tools are complex and start from a blank timeline. I wanted a browser editor where you describe the video first, get a scene plan, and edit from there.

ROLE:Full-Stack Developer
YEAR:2025
TYPE:SaaS Product
STATUS:In Development

TECH STACK

Next.jsTypeScriptPrismaPostgreSQLSupabaseNextAuth.jsGroqTailwind CSS
I

Engineering Approach

AI-First Generation Flow

Users describe a video in plain language, and an AI model returns a scene plan. Stock footage search (Pexels) and uploads fill each scene.

Schema-Driven Architecture

Designed the data model around projects, scenes, and audio layers. When music and voiceover needed multiple layers, I replaced flat fields with an audio-layer table and migrated existing projects into it. Prisma uses a pooled connection for the app and a direct one for migrations.

Multi-Track Timeline

Built a timeline with video, music, and voiceover tracks, a fixed time scale, and a draggable playhead that owns playback position across the preview, the timeline, and the page.

Security Hardening

Added Zod schemas for API input, atomic transactions for scene saves, timing-safe authentication, login rate limiting by email and IP, and project-ownership checks on uploads.

II

Key Technical Decisions

The choices that shaped the architecture and how easy it is to maintain.

One source of truth for playback

The playhead position drives the preview, the timeline, and play and pause. Seeking pauses and never auto-plays.

WHY

Several components each kept their own idea of the current time. One owner of that state removes the drift between them.

Stretching a clip changes its speed

Stretching sets playback speed between 0.25x and 2x. Trimming (choosing in and out points) is a separate feature.

WHY

These are two different operations. Keeping them apart lets each be built and tested on its own, and the source duration is stored so stretched clips play at the right speed.

A demo account with guards

A seeded demo account has guards on all write routes and resets every day.

WHY

Visitors can explore the product without being able to change data that other visitors see.

Honest pending states

Features that don't exist yet say so. The export button reports that export is not available, not a fake success.

WHY

A fake success message is a lie in a product. Honest states keep the interface trustworthy while features are built in order.

III

Challenges & Solutions

[ CHALLENGE ]

Any signed-in user could upload to any project, because the upload route did not check who owned the project.

[ SOLUTION ]

Added an ownership check before every upload, and the same check on the audio upload routes.

[ CHALLENGE ]

Duplicating a project produced the right metadata but no clips.

[ SOLUTION ]

The create route copied only 5 of the 7 scene fields, silently dropping the video URL and stock ID. I fixed the mapping and normalized null style and aspect-ratio values that failed validation.

[ CHALLENGE ]

The theme changed in one tab but came back stale in another.

[ SOLUTION ]

The theme hook trusted the DOM class, which raced between tabs. I rewrote it with useSyncExternalStore so localStorage is the only source of truth.

IV

Outcomes

Frameflow runs the core loop end to end: sign in, describe a video, get a scene plan, add stock or uploaded clips, arrange them on a multi-track timeline with audio layers, and manage projects. CI runs lint, type-check, and build on GitHub Actions, and a lint backlog of 2,316 problems, caused by linting generated code, is now zero.

2,316 → 0
Lint problems
3
Timeline tracks: video, music, voiceover
0.25–2x
Clip speed range

KEY TAKEAWAYS

Building alone means every shortcut shows up later as a bug. The habit that paid off most was auditing: which fields a copy really copies, who can call each route, and which state owns each value.