A simple application that allows users to download TikTok videos using a web server and a mobile app built with React Native. The server fetches the video from TikTok and serves it to the mobile app, which allows users to save the video to their device.
- Download TikTok videos by providing the video URL.
- Save downloaded videos to the device's media library.
- User-friendly interface for easy interaction.
- Automatically cleans up downloaded files after a specified time.
- Server: Node.js, Express, Node-fetch, dotenv
- Mobile App: React Native, Expo, Axios
- Database: None (files are stored temporarily on the server)
- Version Control: Git
-
Clone the repository:
git clone https://github.com/DVHcoding/tiktok-video-downloader.git cd tiktok-video-downloader/server -
Install dependencies:
npm install
-
Create a
.envfile in theserverdirectory and add the following:PORT=3000 HOST=http://localhost:3000 -
Start the server:
npm start
-
Navigate to the mobile app directory:
cd tiktok-video-downloader/mobile-app -
Install dependencies:
npm install
-
Start the Expo project:
expo start
- Open the mobile app on your device or emulator.
- Enter the TikTok video URL in the input field.
- Press the "Download TikTok Video" button to initiate the download.
- The video will be saved to your device's media library.
-
Query Parameters:
url: The TikTok video URL to download.
-
Response:
-
On success:
{ "success": true, "message": "Video đã sẵn sàng", "videoUrl": "http://yourserver/downloads/tiktok_video_1234567890.mp4" } -
On error:
{ "error": "Vui lòng cung cấp URL TikTok" }
-
The mobile app is built using React Native and Expo. It allows users to input a TikTok video URL, request the video download, and save it to their device. The app also includes a feature to paste the URL from the clipboard.
- TextInput: For entering the TikTok video URL.
- Button: To trigger the download process.
- Alert: To notify users of success or error messages.
Contributions are welcome! Please feel free to submit a pull request or open an issue for any bugs or feature requests.
This project is licensed under the MIT License. See the LICENSE file for details.
