Skip to content

BrandVid represents a customizable and branded video hosting platform designed to meet specific business needs, providing a professional and cohesive way to manage and present video content.

License

Notifications You must be signed in to change notification settings

abudusamad/VideoPlatform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

BrandVid

I will be glad if you will involve me in the review process

demo

ForgotPassword demo

Add Video Demo

๐ŸŒ Live Demo

Explore the live demonstration of the project: BrandVid

Description

BrandVid is all about providing a bespoke video hosting platform that emphasizes brand consistency, content control, and a professional user experience. It caters to businesses, educators, and creative professionals who need a reliable and customizable solution for hosting and sharing their video content.

Key Features and Descriptions User Authentication

Signup & Login: Users can create accounts and log in using their email and password, ensuring secure access to the platform. Account Verification: New users receive an email to verify their account, adding an extra layer of security and confirming the user's identity. Password Reset: Users have the option to reset their passwords in case they forget them, ensuring they can always regain access to their accounts. Video Navigation

Video Pages: Users can easily browse and navigate through different video pages, each dedicated to a single video. Next/Previous Buttons: Navigate between videos using next and previous buttons. These buttons will be hidden if there are no more videos in that direction, providing a smooth user experience. Share Links: Users can share links to specific videos, allowing for easy dissemination of content across different platforms and media. Admin Controls

Video Upload: Admins can upload videos, providing a title and description for each. This feature ensures that videos are properly categorized and described. Video Management: Admins can manage the uploaded videos, including editing titles, descriptions, and other metadata to keep the content up-to-date and relevant. Video Page Features

Single Video Display: Each video page is dedicated to one video, ensuring a focused and distraction-free viewing experience. Navigation Controls: Next and previous buttons enable seamless navigation through the video library. These buttons are hidden if there are no more videos to navigate to. Video Controls: Common video controls (play, pause, volume adjustment, etc.) are available, giving users full control over their viewing experience. Branding: A prominently displayed business logo at the top of the video page reinforces brand identity and professionalism. Share Button: A share button allows users to share the link to the current video page easily, promoting the content and brand. Use Cases Business Branding

Companies can use BrandVid to host promotional videos, product demos, tutorials, and other content that aligns with their brand identity. Ensures all videos are consistently branded, providing a professional and cohesive look. Educational Content

Educators and institutions can use BrandVid to upload and manage lecture videos, tutorials, and other educational content. Provides a controlled environment for students and learners to access educational materials. Creative Professionals

Filmmakers, videographers, and other creatives can showcase their work in a branded environment, ensuring their content is presented professionally and consistently. Allows for easy sharing and promotion of their video content.

Database

Database

If you want to see the database schema, you can check the database schema file.

Folder Structure
app
โ”œโ”€โ”€ admin
โ”‚   โ”œโ”€โ”€ courses
โ”‚   โ”‚   โ”œโ”€โ”€ _components
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ columns.tsx
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ data-table.tsx
โ”‚   โ”‚   โ”œโ”€โ”€ [courseId]
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ _components
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ action.tsx
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ course-update.tsx
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ image-form.tsx
โ”‚   โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ video-form.tsx
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ page.tsx
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ video
โ”‚   โ”‚   โ”‚       โ”œโ”€โ”€ _components
โ”‚   โ”‚   โ”‚       โ””โ”€โ”€ [videoId]
โ”‚   โ”‚   โ”‚           โ”œโ”€โ”€ _compoenents
โ”‚   โ”‚   โ”‚           โ”‚   โ”œโ”€โ”€ videoId-action-form.tsx
โ”‚   โ”‚   โ”‚           โ”‚   โ””โ”€โ”€ videoId-form.tsx
โ”‚   โ”‚   โ”‚           โ””โ”€โ”€ page.tsx
โ”‚   โ”‚   โ”œโ”€โ”€ new
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ page.tsx
โ”‚   โ”‚   โ””โ”€โ”€ page.tsx
โ”‚   โ””โ”€โ”€ layout.tsx
โ”œโ”€โ”€ api
โ”‚   โ”œโ”€โ”€ auth
โ”‚   โ”‚   โ””โ”€โ”€ [...nextauth]
โ”‚   โ”‚       โ””โ”€โ”€ route.ts
โ”‚   โ”œโ”€โ”€ courses
โ”‚   โ”‚   โ”œโ”€โ”€ [courseId]
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ publish
โ”‚   โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ route.ts
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ route.ts
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ unpublish
โ”‚   โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ route.ts
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ video
โ”‚   โ”‚   โ”‚       โ”œโ”€โ”€ route.ts
โ”‚   โ”‚   โ”‚       โ””โ”€โ”€ [videoId]
โ”‚   โ”‚   โ”‚           โ”œโ”€โ”€ publish
โ”‚   โ”‚   โ”‚           โ”‚   โ””โ”€โ”€ route.ts
โ”‚   โ”‚   โ”‚           โ”œโ”€โ”€ route.ts
โ”‚   โ”‚   โ”‚           โ””โ”€โ”€ unpublish
โ”‚   โ”‚   โ”‚               โ””โ”€โ”€ route.ts
โ”‚   โ”‚   โ””โ”€โ”€ create
โ”‚   โ”‚       โ””โ”€โ”€ route.ts
โ”‚   โ””โ”€โ”€ uploadthing
โ”‚       โ”œโ”€โ”€ core.ts
โ”‚       โ””โ”€โ”€ route.ts
โ”œโ”€โ”€ auth
โ”‚   โ”œโ”€โ”€ confirm
โ”‚   โ”‚   โ””โ”€โ”€ page.tsx
โ”‚   โ”œโ”€โ”€ error
โ”‚   โ”‚   โ””โ”€โ”€ page.tsx
โ”‚   โ”œโ”€โ”€ layout.tsx
โ”‚   โ”œโ”€โ”€ login
โ”‚   โ”‚   โ””โ”€โ”€ page.tsx
โ”‚   โ”œโ”€โ”€ new-password
โ”‚   โ”‚   โ””โ”€โ”€ page.tsx
โ”‚   โ”œโ”€โ”€ register
โ”‚   โ”‚   โ””โ”€โ”€ page.tsx
โ”‚   โ””โ”€โ”€ reset
โ”‚       โ””โ”€โ”€ page.tsx
โ”œโ”€โ”€ courses
โ”‚   โ”œโ”€โ”€ _components
โ”‚   โ”‚   โ””โ”€โ”€ video-player.tsx
โ”‚   โ””โ”€โ”€ [courseId]
โ”‚       โ””โ”€โ”€ page.tsx
โ”œโ”€โ”€ (dashboard)
โ”‚   โ”œโ”€โ”€ _components
โ”‚   โ”‚   โ”œโ”€โ”€ avatarImage.tsx
โ”‚   โ”‚   โ”œโ”€โ”€ course-card.tsx
โ”‚   โ”‚   โ”œโ”€โ”€ course-list.tsx
โ”‚   โ”‚   โ”œโ”€โ”€ logo.tsx
โ”‚   โ”‚   โ”œโ”€โ”€ navbar.tsx
โ”‚   โ”‚   โ””โ”€โ”€ usermenu.tsx
โ”‚   โ”œโ”€โ”€ layout.tsx
โ”‚   โ””โ”€โ”€ page.tsx
โ”œโ”€โ”€ globals.css
โ”œโ”€โ”€ hooks
โ”‚   โ”œโ”€โ”€ use-confetti.ts
โ”‚   โ””โ”€โ”€ use-debounce.ts
โ”œโ”€โ”€ layout.tsx
โ”œโ”€โ”€ providers
โ”‚   โ”œโ”€โ”€ confetti-provider.tsx
โ”‚   โ”œโ”€โ”€ provider.tsx
โ”‚   โ””โ”€โ”€ toast-provider.tsx
โ””โ”€โ”€ settings
    โ””โ”€โ”€ page.tsx

๐Ÿ“– Table of Contents

Table of Contents

โœจ Technologies Used

BrandVid is built using the following technologies:
  • TypeScript: TypeScript is a typed superset of JavaScript that compiles to plain JavaScript.
  • Next.js: Next.js is a React framework for building server-side rendered and statically generated web applications.
  • Tailwind CSS: Tailwind CSS is a utility-first CSS framework for rapidly building custom user interfaces.
  • Prisma: Prisma is a modern database access toolkit that makes it easy to build type-safe, composable database access.
  • React Hook Form: React Hook Form is a performant, flexible and extensible forms with easy-to-use validation.
  • React Query: React Query is a data-fetching library for React that helps you fetch, cache, and update data in your React applications.
  • ESLint: ESLint is a static code analysis tool for identifying problematic patterns found in JavaScript code.
  • Prettier: Prettier is an opinionated code formatter.
  • Shadcn-UI: Shadcn UI is a React UI library that helps developers rapidly build modern web applications.
  • Zustand: Zustand is a small, fast and scalable bearbones state-management solution.
  • NextAuth.js: NextAuth.js is a complete open source authentication solution for Next.js applications.
  • useHooks TS: useHooks TS is a collection of reusable React hooks.
  • NeonDb: NeonDb is a simple, fast, and lightweight database for your next project.
  • Zod: Zod is a TypeScript-first schema declaration and validation library.
  • Vercel: Vercel is a cloud platform for frontend developers, providing the frameworks, workflows, and infrastructure to build a faster, more personalized Web.

Technologies Used

๐Ÿงฐ Get Started

To get this project up and running in your development environment, follow these step-by-step instructions.

๐Ÿ“‹ Prerequisites

In order to install and run this project locally, you would need to have the following installed on your local machine.

โš™๏ธ Installation and Run Locally

Step 0:

Note: The application uses Prisma for ORM, therefore, you can read documentation of prisma here .env file.

Note: The application uses AuthJs for Authentication and User Management, therefore, you need to create Auth account here and sets the AUTH_SECRET environment variables in .env file.

Note: The application uses Uploadthing for file uploads, therefore, you need to create Uploadthing account here and sets the UPLOADTHING_APP_ID and UPLOADTHING_SECRET environment variables in .env file.

Note: The application uses MuxPlayer for image and video preload, therefore, you need to create Cloudinary account here and sets the MUX_TOKEN_SECRET, and MUX_TOKEN_ID environment variables in .env file.

Note: The application uses Github and Google for OAuth, therefore, you need to create Github here and Google OAuth account here and sets the GITHUB_CLIENT_ID, GITHUB_CLIENT_SECRET, GOOGLE_CLIENT_ID, and GOOGLE_CLIENT_SECRET environment variables in .env file.

Also, you need to create a JWT template in Clerk and define the JWKS Endpoint as a provider inside /auth.config.js file.

Step 1:

Download or clone this repo by using the link below:

git clone https://github.com/abudusamad/VideoPlatform.git

Step 2:

Execute the following command in the root directory of the downloaded repo in order to install dependencies:

npm install

or install with legacy peer dependencies which fixes with incompatible peer dependencies

npm install --legacy-peer-deps

Step 3:

Execute the following command in order to run the development server locally:

npm run dev

Step 4:

Open http://localhost:3000 with your browser to see the result.

๐Ÿ“œ Scripts

All scripts are defined in the package.json file. Here is a list of all scripts:

Script Action
npm install Installs dependencies
npm run dev Starts local dev server at localhost:3000
npm run build Build your production site to ./dist/
npm run start Start your production site locally
npm run lint Run ESLint

๐Ÿ”’ Environment Variables

Environment variables can be used for configuration. They must be set before running the app.

Environment variables are variables that are set in the operating system or shell, typically used to configure programs.

BrandVide uses . You need to create an accounts on Convex and Clerk and get the required credentials to run the app.

Create a .env file in the root directory of the project and add the following environment variables:

AUTH_SECRET=

GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=

GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=


NEXT_PUBLIC_URL=http://localhost:3000
RESEND_API_KEY=

MUX_TOKEN_ID=
MUX_TOKEN_SECRET=

UPLOADTHING_SECRET=
UPLOADTHING_APP_ID=

๐Ÿš€ Deployment

Deploy to production (manual)

You can create an optimized production build with the following command:

npm run build

Deploy on Vercel (recommended)

The easiest way to deploy this Next.js app is to use the Vercel Platform.

Deploy with Vercel

Deploy on Netlify

You can also deploy this Next.js app with Netlify.

Deploy with Netlify

Check out Next.js deployment documentation for more details.

๐Ÿ’ก Features

  • ๐Ÿš€ Next.js 14 with server actions
  • ๐Ÿ”‘ Credentials Provider
  • ๐ŸŒ OAuth Provider (Social login with Google & GitHub)
  • ๐Ÿ”’ Forgot password functionality
  • โœ‰๏ธ Email verification
  • ๐Ÿ‘ฅ User roles (Admin & User)
  • ๐Ÿ”“ Login component (Opens in redirect or modal)
  • ๐Ÿ“ Register component
  • ๐Ÿค” Forgot password component
  • โœ… Verification component
  • โš ๏ธ Error component
  • ๐Ÿ”˜ Login button
  • ๐Ÿšช Logout button
  • ๐Ÿšง Role Gate
  • ๐Ÿ” Exploring next.js middleware
  • ๐Ÿ“ˆ Extending & Exploring next-auth session
  • ๐Ÿ”„ Exploring next-auth callbacks
  • ๐Ÿ‘ค useCurrentUser hook
  • ๐Ÿ›‚ useRole hook
  • ๐Ÿง‘ currentUser utility
  • ๐Ÿ‘ฎ currentRole utility
  • ๐Ÿ–ฅ๏ธ Example with server component
  • ๐Ÿ’ป Example with client component
  • ๐Ÿ‘‘ Render content for admins using RoleGate component
  • ๐Ÿ›ก๏ธ Protect API Routes for admins only
  • ๐Ÿ” Protect Server Actions for admins only
  • ๐Ÿ”” Enable/disable two-factor auth in Settings page
  • ๐Ÿ”„ Change user role in Settings page (for development purposes only)
  • ๐Ÿ™‹โ€โ™‚๏ธClient form validation and handling using react-hook-form
  • โœ…โŒServer error and success handling using react-toastisfy
  • ๐Ÿ“Server form validation and handling using zod
  • ๐Ÿ™Žโ€โ™€๏ธAdmin Can Create, Update, Delete, and View Videos.๐Ÿ™Žโ€โ™€
  • Users can only view videos and share the link to other users

๐Ÿ’Ž Acknowledgements

I'd like to express my gratitude to the following people who helped me with this project and made it possible:

๐Ÿ“š References

๐Ÿ“ž Contact Us

-Twitter -LinkedIn -Email -Github

๐Ÿ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.

Code of Conduct

Please read the CODE_OF_CONDUCT for details on our code of conduct.

Security Vulnerabilities

Please read the SECURITY for details on our security policy.

About

BrandVid represents a customizable and branded video hosting platform designed to meet specific business needs, providing a professional and cohesive way to manage and present video content.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages