A real-time video calling application built with React, TypeScript, and Supabase. This app allows users to create and join video call rooms, with features like screen sharing, camera toggling, and microphone control.
- Create and join video call rooms
- Real-time video and audio communication
- Screen sharing
- Camera on/off toggle
- Microphone mute/unmute
- Simple user interface
- Room ID sharing
- React
- TypeScript
- WebRTC (using simple-peer)
- Supabase (for signaling and room management)
- Styled Components
- UUID
- Node.js (v14 or higher)
- npm or yarn
- A Supabase account and project
-
Clone the repository:
git clone <repository-url> cd video-app -
Install dependencies:
npm install -
Create a Supabase project and set up the database:
- Create a new Supabase project at https://supabase.com
- Use the provided SQL script in
setup-supabase.sqlto create the necessary tables and policies - You can run this script in the Supabase SQL Editor
-
Set up your environment variables:
- Create a
.envfile in the root directory - Add your Supabase URL and anonymous key:
REACT_APP_SUPABASE_URL=your_supabase_url REACT_APP_SUPABASE_ANON_KEY=your_supabase_anon_key
- Create a
-
Start the development server:
npm start -
Open your browser and navigate to
http://localhost:3000
- Navigate to your Supabase project dashboard
- Go to Database > Replication > Realtime
- Enable the "Broadcast" option for Realtime functionality
- Under "Tables", add the "rooms" table to be tracked for Realtime changes
This configuration is necessary for the WebRTC signaling to work properly between peers.
-
Create a Meeting:
- Click on "Create New Meeting" on the home page
- You'll be redirected to a new room
- Share the room ID with others to join
-
Join a Meeting:
- Enter the room ID in the input field on the home page
- Click "Join Meeting"
-
During a Call:
- Use the control buttons at the bottom to toggle camera, microphone, or share your screen
- Click "End Call" to leave the meeting and return to the home page
The application is configured for easy deployment to Vercel, but can be deployed to any static hosting provider.
-
Create a Vercel account if you don't have one already at https://vercel.com
-
Install the Vercel CLI (already included as a dev dependency):
# Or install globally npm install -g vercel -
Login to Vercel:
npx vercel login
-
Deploy to Vercel:
npm run deploy
Or for a preview deployment:
npm run deploy:preview
-
Set up environment variables on Vercel:
- Go to your Vercel project dashboard
- Navigate to Project Settings > Environment Variables
- Add your environment variables:
REACT_APP_SUPABASE_URLREACT_APP_SUPABASE_ANON_KEY
You can also deploy directly from the Vercel dashboard:
- Import your GitHub/GitLab/Bitbucket repository
- Configure the project:
- Set the build command to
npm run build - Set the output directory to
dist
- Set the build command to
- Add your environment variables
- Deploy
To build the application for deployment anywhere:
- Build the production bundle:
npm run build
- The build output will be in the
distdirectory - Deploy the contents of the
distdirectory to your hosting provider
- Ensure your hosting provider supports URL rewriting for SPAs (Single Page Applications)
- Set up appropriate environment variables for your Supabase configuration
- Configure CORS on your Supabase project to allow requests from your deployment domain
MIT