Skip to content

Create professional demos and 3D mockups in seconds, directly in your browser

feat: implement Supabase authentication callback and update dependencies

CristianOlivera114eb89e3d840
diff --git a/.gitignore b/.gitignore
index 5ef6a52..e61df22 100644
--- a/.gitignore
+++ b/.gitignore
@@ -39,3 +39,5 @@ yarn-error.log*
# typescript
*.tsbuildinfo
next-env.d.ts
+
+supabase-setup.sql
diff --git a/README.md b/README.md
index e215bc4..2422771 100644
--- a/README.md
+++ b/README.md
@@ -1,36 +1,151 @@
-This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
+<div align="center">
-## Getting Started
+<img width="100%" alt="OpenVidShot Hero" src="./public/images/hero-preview.png" />
-First, run the development server:
+# OpenVidShot
-```bash
-npm run dev
-# or
-yarn dev
-# or
-pnpm dev
-# or
-bun dev
-```
+### Professional screen recording & video editing in your browser
+
+[![Next.js](https://img.shields.io/badge/Next.js-16-black?style=for-the-badge&logo=next.js&logoColor=white)](https://nextjs.org)
+[![TypeScript](https://img.shields.io/badge/TypeScript-5.0-3178C6?style=for-the-badge&logo=typescript&logoColor=white)](https://www.typescriptlang.org)
+[![Supabase](https://img.shields.io/badge/Supabase-Auth-3ECF8E?style=for-the-badge&logo=supabase&logoColor=white)](https://supabase.com)
+
+[Demo](https://openvid.dev) · [Features](#-features) · [Installation](#-quick-start)
+
+</div>
+
+---
+
+## Features
+
+### Video Input
+- **Browser Recording** - Record screen directly in browser using MediaRecorder API
+- **Upload Support** - MP4, WebM, QuickTime, and MKV formats
+- **Drag & Drop** - Quick video upload via drag and drop
+
+### Visual Customization
+**Backgrounds**
+- 20+ pre-designed wallpapers
+- Custom image upload
+- Solid colors & gradients
+- Unsplash integration
+- Blur effects (0-100%)
+
+**Effects**
+- Dynamic padding control
+- Rounded corners
+- Shadow intensity
+- Video rotation & positioning
+
+### Canvas & Elements
+- **Shapes** - Rectangles, circles, triangles
+- **Text Layers** - Custom fonts, colors, sizes
+- **SVG Support** - Import custom vector graphics
+- **Image Overlays** - PNG, JPG, WebP
+- **Z-axis Control** - Layer management (behind/above video)
+
+### Device Mockups
+Browser window frames for professional demos:
+- Safari (macOS style)
+- Chrome (minimal)
+- Arc (modern)
+
+### Smart Zoom
+- **Fragment-based** - Zoom in/out at specific timestamps
+- **Speed Control** - Customize zoom animation speed
+- **Easing Functions** - Smooth transitions
+
+### Audio
+- **Multi-track** - Layer multiple audio files
+- **Volume Control** - Individual track + master volume
+- **Trim & Loop** - Auto-trim to video length
+- **Original Audio** - Mute/unmute video audio
+
+### Editing Tools
+- **Timeline Scrubbing** - Frame-accurate preview
+- **Trim Range** - Cut video start/end
+- **Crop Tool** - Resize video dimensions
+- **Aspect Ratios** - Auto, 16:9, 9:16, 1:1, 4:3, custom
+
+### Export Options
-Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
+**Quality Presets**
+- 4K (3840×2160) @ 30fps
+- 2K (2560×1440) @ 30fps
+- 1080p (1920×1080) @ 30fps
+- 720p (1280×720) @ 30fps
-You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
+**Formats**
+- MP4 (H.264)
+- WebM (VP9)
-This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
+**Advanced**
+- Transparent backgrounds (WebM only)
+- Multi-track audio mixing
+- Hardware acceleration when available
-## Learn More
+---
-To learn more about Next.js, take a look at the following resources:
+## Authentication
-- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
-- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
+Powered by **Supabase Auth** with OAuth support:
+
+<div align="center">
+
+| Provider | Status |
+|:--------:|:------:|
+| Google | Supported |
+| GitHub | Supported |
+| Twitch | Supported |
+
+</div>
+
+User profiles include: avatar, name, email, provider, timestamps
+
+---
+
+## Technology
+
+**Video Processing**
+- FFmpeg.wasm (browser-side rendering)
+- Canvas API (real-time preview)
+- MediaBunny (optimized video pipeline)
+
+**Storage**
+- IndexedDB (recorded videos)
+- LocalStorage (settings)
+- Supabase Storage (future: cloud backups)
+
+**UI/UX**
+- Radix UI (accessible components)
+- Framer Motion (animations)
+- Tailwind CSS 4 (styling)
+
+---
+
+## Quick Start
+
+```bash
+# Install dependencies
+pnpm install
+
+# Configure environment
+cp .env.example .env
+# Add your Supabase credentials
+
+# Run development server
+pnpm dev
+```
-You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
+Open [http://localhost:3000](http://localhost:3000)
-## Deploy on Vercel
+---
-The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
+## ⌨️ Keyboard Shortcuts
-Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
+| Shortcut | Action |
+|:---------|:-------|
+| `Space` | Play / Pause |
+| `Ctrl+Z` | Undo |
+| `Ctrl+Y` | Redo |
+| `←` / `→` | Skip 5s backward/forward |
\ No newline at end of file
diff --git a/app/auth/callback/route.ts b/app/auth/callback/route.ts
new file mode 100644
index 0000000..820b1e4
--- /dev/null
+++ b/app/auth/callback/route.ts
@@ -0,0 +1,21 @@
+import { createClient } from "@/utils/supabase/server";
+import { NextResponse } from "next/server";
+
+export async function GET(request: Request) {
+ const requestUrl = new URL(request.url);
+ const code = requestUrl.searchParams.get("code");
+ const origin = requestUrl.origin;
+
+ if (code) {
+ const supabase = await createClient();
+ const { error } = await supabase.auth.exchangeCodeForSession(code);
+
+ if (error) {
+ console.error("Error exchanging code for session:", error);
+ return NextResponse.redirect(`${origin}/login?error=auth_failed`);
+ }
+ }
+
+ // URL to redirect to after sign in process completes
+ return NextResponse.redirect(`${origin}/editor`);
+}
diff --git a/next.config.ts b/next.config.ts
index 94b8925..fb6846b 100644
--- a/next.config.ts
+++ b/next.config.ts
@@ -8,13 +8,21 @@ const nextConfig: NextConfig = {
hostname: "images.unsplash.com",
pathname: "/**",
},
+ { protocol: 'https', hostname: 'pixabay.com', pathname: '/**' },
+ { protocol: 'https', hostname: 'cdn.pixabay.com', pathname: '/**' },
+ { protocol: 'https', hostname: 'images.pexels.com', pathname: '/**' },
+ // Auth providers avatars
+ { protocol: 'https', hostname: 'api.dicebear.com', pathname: '/**' },
+ { protocol: 'https', hostname: 'avatars.githubusercontent.com', pathname: '/**' },
+ { protocol: 'https', hostname: 'lh3.googleusercontent.com', pathname: '/**' },
+ { protocol: 'https', hostname: 'static-cdn.jtvnw.net', pathname: '/**' },
],
},
headers: async () => [{
source: "/(.*)",
headers: [
{ key: "Cross-Origin-Opener-Policy", value: "same-origin" },
- { key: "Cross-Origin-Embedder-Policy", value: "require-corp" },
+ { key: "Cross-Origin-Embedder-Policy", value: "unsafe-none" },
],
}]
};
diff --git a/package.json b/package.json
index 4a076c7..f1a07cf 100644
--- a/package.json
+++ b/package.json
@@ -1,5 +1,5 @@
{
- "name": "openvidshot",
+ "name": "openvid",
"version": "0.1.0",
"private": true,
"scripts": {
@@ -12,6 +12,10 @@
"@ffmpeg/core": "^0.12.10",
"@ffmpeg/ffmpeg": "^0.12.15",
"@ffmpeg/util": "^0.12.2",
+ "@radix-ui/react-dialog": "^1.1.15",
+ "@radix-ui/react-dropdown-menu": "^2.1.16",
+ "@supabase/ssr": "^0.9.0",
+ "@supabase/supabase-js": "^2.100.1",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"framer-motion": "^12.34.3",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 18097b0..df5969a 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -17,6 +17,18 @@ importers:
'@ffmpeg/util':
specifier: ^0.12.2
version: 0.12.2
+ '@radix-ui/react-dialog':
+ specifier: ^1.1.15
+ '@radix-ui/react-dropdown-menu':
+ specifier: ^2.1.16
+ '@supabase/ssr':
+ specifier: ^0.9.0
+ version: 0.9.0(@supabase/[email protected])
+ '@supabase/supabase-js':
+ specifier: ^2.100.1
+ version: 2.100.1
class-variance-authority:
specifier: ^0.7.1
version: 0.7.1
@@ -1366,6 +1378,38 @@ packages:
resolution: {integrity: sha512-tlqY9xq5ukxTUZBmoOp+m61cqwQD5pHJtFY3Mn8CA8ps6yghLH/Hw8UPdqg4OLmFW3IFlcXnQNmo/dh8HzXYIQ==}
engines: {node: '>=18'}
+ '@supabase/[email protected]':
+ resolution: {integrity: sha512-c5FB4nrG7cs1mLSzFGuIVl2iR2YO5XkSJ96uF4zubYm8YDn71XOi2emE9sBm/avfGCj61jaRBLOvxEAVnpys0Q==}
+ engines: {node: '>=20.0.0'}
+
+ '@supabase/[email protected]':
+ resolution: {integrity: sha512-mo8QheoV4KR+wSubtyEWhZUxWnCM7YZ23TncccMAlbWAHb8YTDqRGRm9IalWCAswniKyud6buZCk9snRqI86KA==}
+ engines: {node: '>=20.0.0'}
+
+ '@supabase/[email protected]':
+ resolution: {integrity: sha512-RHSx8bHS02xwfHdAbX5Lpbo6PXbgyf7lTaXTlwtFDPwOIw64NnVRwFAXGojHhjtVYI+PEPNSWwkL90f4agN3bw==}
+
+ '@supabase/[email protected]':
+ resolution: {integrity: sha512-OIh4mOSo2LdqF2kox76OAPDtcSs+PwKABJOjc6plUV4/LXhFEsI2uwdEEIs7K7fd141qehWEVl/Y+Ts0fNvYsw==}
+ engines: {node: '>=20.0.0'}
+
+ '@supabase/[email protected]':
+ resolution: {integrity: sha512-FHuRWPX4qZQ4x+0Q+ZrKaBZnOiVGiwsgiAUJM98pYRib1yeaE/fOM1lZ1ozd+4gA8Udw23OyaD8SxKS5mT5NYw==}
+ engines: {node: '>=20.0.0'}
+
+ '@supabase/[email protected]':
+ resolution: {integrity: sha512-UFY6otYV3yqCgV+AyHj80vNkTvbf1Gas2LW4dpbQ4ap6p6v3eB2oaDfcI99jsuJzwVBCFU4BJI+oDYyhNk1z0Q==}
+ peerDependencies:
+ '@supabase/supabase-js': ^2.97.0
+
+ '@supabase/[email protected]':
+ resolution: {integrity: sha512-x9xpEIoWM4xKiAlwfWTgHPSN6N4Y0aS4FVU4F6ZPbq7Gayw08SrtC6/YH/gOr8CjXQr0HxXYXDop2xGTSjubYA==}
+ engines: {node: '>=20.0.0'}
+
+ '@supabase/[email protected]':
+ resolution: {integrity: sha512-CAeFm5sfX8sbTzxoxRafhohreIzl9a7R6qHTck3MrgTqm5M5g/u0IHfEKYzI9w/17r8NINl8UZrw2i08wrO7Iw==}
+ engines: {node: '>=20.0.0'}
+
resolution: {integrity: sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==}
@@ -1499,6 +1543,9 @@ packages:
resolution: {integrity: sha512-lrpDziQipxCEeK5kWxvljWYhUvOiB2A9izZd9B2AFarYAkqZshb4lPbRs7zKEic6eGtH8V/2qJW+dPp9OtF6bw==}
+ '@types/[email protected]':
+ resolution: {integrity: sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==}
+
'@typescript-eslint/[email protected]':
resolution: {integrity: sha512-1y/MVSz0NglV1ijHC8OT49mPJ4qhPYjiK08YUQVbIOyu+5k862LKUHFkpKHWu//zmr7hDR2rhwUm6gnCGNmGBQ==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
@@ -2504,6 +2551,10 @@ packages:
resolution: {integrity: sha512-eKCa6bwnJhvxj14kZk5NCPc6Hb6BdsU9DZcOnmQKSnO1VKrfV0zCvtttPZUsBvjmNDn8rpcJfpwSYnHBjc95MQ==}
engines: {node: '>=18.18.0'}
+ resolution: {integrity: sha512-1dhVQZXhcHje7798IVM+xoo/1ZdVfzOMIc8/rgVSijRK38EDqOJoGula9N/8ZI5RD8QTxNQtK/Gozpr+qUqRRA==}
+ engines: {node: '>=20.0.0'}
+
resolution: {integrity: sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==}
engines: {node: '>=0.10.0'}
@@ -3763,6 +3814,18 @@ packages:
resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==}
+ resolution: {integrity: sha512-sAt8BhgNbzCtgGbt2OxmpuryO63ZoDk/sqaB/znQm94T4fCEsy/yV+7CdC1kJhOU9lboAEU7R3kquuycDoibVA==}
+ engines: {node: '>=10.0.0'}
+ peerDependencies:
+ bufferutil: ^4.0.1
+ utf-8-validate: '>=5.0.2'
+ peerDependenciesMeta:
+ bufferutil:
+ optional: true
+ utf-8-validate:
+ optional: true
+
resolution: {integrity: sha512-g/eziiSUNBSsdDJtCLB8bdYEUMj4jR7AGeUo96p/3dTafgjHhpF4RiCFPiRILwjQoDXx5MqkBr4fwWtR3Ky4Wg==}
engines: {node: '>=20'}
@@ -5137,6 +5200,51 @@ snapshots:
'@sindresorhus/[email protected]': {}
+ '@supabase/[email protected]':
+ dependencies:
+ tslib: 2.8.1
+
+ '@supabase/[email protected]':
+ dependencies:
+ tslib: 2.8.1
+
+ '@supabase/[email protected]': {}
+
+ '@supabase/[email protected]':
+ dependencies:
+ tslib: 2.8.1
+
+ '@supabase/[email protected]':
+ dependencies:
+ '@supabase/phoenix': 0.4.0
+ '@types/ws': 8.18.1
+ tslib: 2.8.1
+ ws: 8.20.0
+ transitivePeerDependencies:
+ - bufferutil
+ - utf-8-validate
+
+ '@supabase/[email protected](@supabase/[email protected])':
+ dependencies:
+ '@supabase/supabase-js': 2.100.1
+ cookie: 1.1.1
+
+ '@supabase/[email protected]':
+ dependencies:
+ iceberg-js: 0.8.1
+ tslib: 2.8.1
+
+ '@supabase/[email protected]':
+ dependencies:
+ '@supabase/auth-js': 2.100.1
+ '@supabase/functions-js': 2.100.1
+ '@supabase/postgrest-js': 2.100.1
+ '@supabase/realtime-js': 2.100.1
+ '@supabase/storage-js': 2.100.1
+ transitivePeerDependencies:
+ - bufferutil
+ - utf-8-validate
+
dependencies:
tslib: 2.8.1
@@ -5249,6 +5357,10 @@ snapshots:
'@types/[email protected]': {}
+ '@types/[email protected]':
+ dependencies:
+ '@types/node': 20.19.33
+
dependencies:
'@eslint-community/regexpp': 4.12.2
@@ -6405,6 +6517,8 @@ snapshots:
+
dependencies:
safer-buffer: 2.1.2
@@ -7812,6 +7926,8 @@ snapshots:
+
dependencies:
is-wsl: 3.1.0