Skip to content

ravigothwal05/teraplay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

TeraPlay - Online TeraBox Player

TeraPlay is a free, open-source web application that enables users to play TeraBox videos directly in their browser without requiring the official TeraBox app. Built with Next.js 14, TypeScript, and Tailwind CSS.

Features

  • πŸŽ₯ Direct Video Playback - Play TeraBox videos in your browser using HTML5 video player
  • 🎬 Quality Selection - Choose from multiple video quality options when available
  • πŸ“‹ Copy Direct Links - Copy video URLs to clipboard with one click
  • ⬇️ Download Support - Download videos directly from the player
  • πŸ“± Mobile-First Design - Fully responsive interface optimized for all devices
  • πŸ”’ Privacy-Focused - No tracking, no data storage, no user accounts required
  • ⚑ Fast & Lightweight - Minimal dependencies, optimized bundle size
  • 🎨 Modern UI - Clean, dark-themed interface with smooth animations

Tech Stack

Prerequisites

  • Node.js 18.x or higher
  • npm or yarn package manager

Quick Start

TeraPlay includes a custom backend that directly resolves TeraBox links - no external APIs required!

  1. Install dependencies
npm install
  1. Run the development server
npm run dev
  1. Open the app

Navigate to http://localhost:3000 and paste a TeraBox URL like:

https://terabox.com/s/1abc123
https://1024terabox.com/s/1eBHBOzcEI-VpUGA_xIcGQg

That's it! The backend automatically resolves TeraBox links without any configuration.

Configuration

No Configuration Required! πŸŽ‰

TeraPlay works out of the box with no environment variables or external APIs needed. The backend directly communicates with TeraBox's public API to resolve video links.

How It Works

The custom backend:

  1. Parses the TeraBox share URL
  2. Calls TeraBox's public API to get file information
  3. Finds video files in the share
  4. Generates direct download links
  5. Returns video data to the frontend

All of this happens automatically without any setup!

Development Commands

# Start development server
npm run dev

# Build for production
npm run build

# Start production server
npm start

# Run linter
npm run lint

# Run type checking
npm run type-check

# Run tests (if implemented)
npm test

Project Structure

teraplay/
β”œβ”€β”€ app/                      # Next.js App Router pages
β”‚   β”œβ”€β”€ api/
β”‚   β”‚   └── resolve/
β”‚   β”‚       └── route.ts      # Video resolution API endpoint
β”‚   β”œβ”€β”€ how-it-works/
β”‚   β”‚   └── page.tsx          # How it works page
β”‚   β”œβ”€β”€ privacy/
β”‚   β”‚   └── page.tsx          # Privacy policy page
β”‚   β”œβ”€β”€ layout.tsx            # Root layout with metadata
β”‚   β”œβ”€β”€ page.tsx              # Home page
β”‚   └── globals.css           # Global styles
β”œβ”€β”€ components/               # React components
β”‚   β”œβ”€β”€ AdSlot.tsx           # Ad placeholder component
β”‚   β”œβ”€β”€ ErrorAlert.tsx       # Error message component
β”‚   β”œβ”€β”€ Footer.tsx           # Footer component
β”‚   β”œβ”€β”€ Header.tsx           # Navigation header
β”‚   β”œβ”€β”€ LoadingSpinner.tsx   # Loading indicator
β”‚   β”œβ”€β”€ UrlInputForm.tsx     # URL input form
β”‚   └── VideoPlayer.tsx      # Video player with controls
β”œβ”€β”€ lib/                     # Utility functions and types
β”‚   β”œβ”€β”€ api.ts              # API client functions
β”‚   β”œβ”€β”€ types.ts            # TypeScript type definitions
β”‚   └── utils.ts            # Helper functions
β”œβ”€β”€ public/                  # Static assets
β”œβ”€β”€ .env.example            # Environment variable template
β”œβ”€β”€ .env.local              # Local environment (gitignored)
β”œβ”€β”€ next.config.js          # Next.js configuration
β”œβ”€β”€ tailwind.config.ts      # Tailwind CSS configuration
β”œβ”€β”€ tsconfig.json           # TypeScript configuration
└── package.json            # Dependencies and scripts

Architecture Overview

Request Flow

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   User Browser  β”‚
β”‚   (Next.js UI)  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚ 1. User submits TeraBox URL
         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  UrlInputForm   β”‚
β”‚   Component     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚ 2. POST /api/resolve
         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Next.js API    β”‚
β”‚  Route Handler  β”‚
β”‚  (Custom Backend)β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚ 3. Direct TeraBox API calls
         β”‚    - Get share info
         β”‚    - Find video files
         β”‚    - Generate download links
         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  TeraBox API    β”‚
β”‚  (Public)       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚ 4. Returns video metadata
         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  VideoPlayer    β”‚
β”‚   Component     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Component Hierarchy

RootLayout
β”œβ”€β”€ Header
β”œβ”€β”€ Page (Home)
β”‚   β”œβ”€β”€ UrlInputForm
β”‚   β”‚   └── LoadingSpinner
β”‚   β”œβ”€β”€ ErrorAlert
β”‚   β”œβ”€β”€ VideoPlayer
β”‚   └── AdSlot (multiple)
└── Footer

Deployment

Deploy to Vercel

  1. Push your code to GitHub

  2. Import project in Vercel

    • Go to vercel.com
    • Click "New Project"
    • Import your GitHub repository
  3. Deploy

    • Vercel will automatically build and deploy your application
    • No environment variables needed!
    • Every push to main branch triggers a new deployment

Manual Deployment

# Build the application
npm run build

# Start the production server
npm start

The application will be available at http://localhost:3000.

API Documentation

POST /api/resolve

Resolves a TeraBox share link to direct video URLs.

Request:

{
  "url": "https://terabox.com/s/abc123"
}

Response (Success):

{
  "success": true,
  "fileName": "video.mp4",
  "size": "750 MB",
  "thumbnail": "https://cdn.example.com/thumb.jpg",
  "directUrl": "https://cdn.example.com/video.mp4",
  "qualities": [
    { "label": "360p", "url": "https://cdn.example.com/video-360p.mp4" },
    { "label": "720p", "url": "https://cdn.example.com/video-720p.mp4" }
  ]
}

Response (Error):

{
  "success": false,
  "message": "Unable to resolve this TeraBox link"
}

Status Codes:

  • 200 - Successful resolution
  • 400 - Invalid request (missing URL, invalid format)
  • 500 - Server misconfiguration
  • 502 - Resolver API error

Contributing

Contributions are welcome! Please follow these guidelines:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Code Style

  • Use TypeScript for all new code
  • Follow the existing code style (enforced by ESLint)
  • Add comments for complex logic
  • Ensure all tests pass before submitting PR

License

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

Disclaimer

Important: TeraPlay does not host, store, or upload any video files. This application is a tool that helps users access publicly shared TeraBox links through a third-party resolver API. All videos remain on TeraBox's servers.

Users are responsible for ensuring they have the right to access any content they view. We do not control, verify, or endorse any content accessed through our service.

Privacy

TeraPlay is designed with privacy in mind:

  • βœ… No user tracking or analytics
  • βœ… No data storage or logging of URLs
  • βœ… No cookies or local storage for user identification
  • βœ… No personal information collection

For more details, see our Privacy Policy.

Support

If you encounter any issues or have questions:

  1. Check the FAQ on our website
  2. Search existing GitHub Issues
  3. Open a new issue with detailed information

Acknowledgments


Made with ❀️ by the TeraPlay team

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

No contributors

Languages