- Overview
- Goals & Key Features
- Project Structure
- System Requirements
- Quick Start
- Tech Stack
- Core Features
- Production Deployment
- Developer
- Aim Towards
π― A modern TikTok clone built with React & Supabase - A comprehensive social media platform that replicates TikTok's core features including video streaming, user authentication, social interactions, real-time messaging, and content discovery.
|
Smooth video playback with adaptive quality and infinite scroll |
|
Live likes, comments, follows with instant UI updates |
|
Real-time chat with media sharing and read receipts |
|
Seamless video upload with preview, custom thumbnails, and metadata editing |
tiktok-clone/
βββ π public/ # Static assets (index.html, images)
β
βββ π src/ # Source Code
β βββ π assets/ # Fonts, icons, and other static resources
β βββ π components/ # Reusable UI components (e.g., Button, LoginForm)
β βββ π config/ # Application configuration (routes, Supabase client)
β βββ π contexts/ # React Context providers for global state
β βββ π hooks/ # Custom React hooks (e.g., useVideoData)
β βββ π layouts/ # Page layout components (e.g., DefaultLayout)
β βββ π pages/ # Main application pages (e.g., Home, Profile)
β βββ π services/ # API integration layer
β
βββ π .env.example # Environment variable template
βββ π docker-compose.dev.yml # Development container setup
βββ π package.json # Dependencies & scripts
βββ π tailwind.config.js # Tailwind CSS configuration
graph TD
A[React Client<br/>Frontend] --> B[Supabase<br/>Backend-as-a-Service]
B --> C[(PostgreSQL<br/>Database)]
B --> D[Storage<br/>Video & Images]
B --> E[Real-time<br/>Subscriptions]
E --> F[Live Chat]
E --> G[Presence Status]
C --> H[User Profiles]
C --> I[Video Metadata]
C --> J[Social Interactions]
| Component | Version | Notes |
|---|---|---|
| Node.js | β₯ 18.0.0 | Required for React development |
| npm/yarn | Latest | Package manager |
| Supabase Account | Free Tier+ | Backend services & database |
| Modern Browser | Latest | Chrome, Firefox, Safari, Edge |
| Docker (Optional) | Latest | For containerized development |
git clone https://github.com/mrthinh307/tiktok-clone.git
cd tiktok-ui-supabase
npm install && npm startgit clone https://github.com/mrthinh307/tiktok-clone.git
cd tiktok-ui-supabasenpm install
# or
yarn install# Create environment file
cp .env.example .env
# Add your Supabase credentials
REACT_APP_SUPABASE_URL=your_supabase_url
REACT_APP_SUPABASE_KEY=your_supabase_anon_key- Create a new project at supabase.com
- Set up authentication providers
- Create necessary database tables (SQL schema available in docs)
- Configure storage buckets for videos and images
npm start
# or
yarn startπ Application: http://localhost:3000
# Start with Docker Compose
docker-compose -f docker-compose.dev.yml up --build| Technology | Purpose | Details |
|---|---|---|
| React 19 | Framework | Latest React with concurrent features |
| React Router DOM | Routing | Client-side navigation |
| Tailwind CSS | Styling | Utility-first CSS framework |
| Framer Motion | Animations | Smooth animations & transitions |
| FontAwesome | Icons | Comprehensive icon library |
| Tippy.js | Tooltips | Interactive tooltip components |
| Axios | HTTP Client | API request handling |
| Technology | Purpose | Details |
|---|---|---|
| Supabase | Backend-as-a-Service | Authentication, database, storage |
| PostgreSQL | Database | Relational database via Supabase |
| Supabase Storage | File Storage | Video and image hosting |
| Supabase Real-time | Live Updates | Real-time subscriptions |
| Row Level Security | Security | Database-level authorization |
| Technology | Purpose | Details |
|---|---|---|
| Custom TikTok Fonts | Typography | Authentic TikTok design |
| SCSS Modules | Styling | Component-scoped styles |
| Desktop-First Design | UI Layout | Optimized for desktop use |
| Custom Animations | UX | Smooth micro-interactions |
| Technology | Purpose | Details |
|---|---|---|
| Create React App | Build Tool | Development & build setup |
| React App Rewired | Configuration | Webpack customization |
| Babel Module Resolver | Imports | Absolute import paths |
| Docker | Containerization | Development environment |
| ESLint | Code Quality | JavaScript/React linting |
|
|
|
|
|
|
- Supabase Auth: Email/password registration and login
- Protected Routes: Authenticated-only areas
- Row Level Security: Database-level permissions
- Session Management: Automatic token refresh
- Password Reset: Email-based password recovery
# Build for production
npm run build
# Serve build files
npx serve -s build -l 3000| Platform | Best For | Setup |
|---|---|---|
| Vercel | React Apps | vercel --prod |
| Netlify | Static Sites | Drag & drop build folder |
| Firebase Hosting | Google Stack | firebase deploy |
| AWS Amplify | AWS Integration | Connect GitHub repo |
# Build production image
docker build -f Dockerfile.prod -t tiktok-clone .
# Run production container
docker run -p 80:80 --env-file .env tiktok-clone# Production environment
REACT_APP_SUPABASE_URL=your_production_supabase_url
REACT_APP_SUPABASE_KEY=your_production_anon_key
REACT_APP_ENVIRONMENT=production- Code Splitting: Automatic route-based splitting
- Image Optimization: WebP format with fallbacks
- Caching Strategy: Service worker for offline support
- Bundle Analysis:
npm run buildincludes size analysis
This TikTok Clone project serves as an educational journey focused on skill development and knowledge accumulation through hands-on experience.
- π Knowledge Building: Mastering modern React ecosystem, Supabase backend services, and real-time applications
- πͺ Skill Development: Problem-solving, code quality, performance optimization, and industry best practices
- π§ Practical Experience: Working with full-stack development, video streaming, and social media features
|
Overcoming technical challenges and debugging complex issues without giving up |
Self-researching solutions and developing autonomous problem-solving capabilities |
Staying updated with new technologies and improving skills daily |
"Learning by building - turning knowledge into practical skills"
π‘ Made with β€οΈ for the TikTok Clone community
β¬οΈ Back to Top β’ π Report Bug β’ β¨ Request Feature
π Star this repo if you found it helpful!