Prerequisites
Before you begin, ensure you have:- Node.js 18.x or higher
- Bun 1.2.5 or higher (recommended) or npm/yarn/pnpm
- PostgreSQL 14 or higher
- Redis 7 or higher (for job queues)
- A TikTok API key or Apify account (for scraping)
Quick Start with Docker
The fastest way to get started is using Docker Compose:Clone and Configure
Clone the repository and set up your environment:Edit
.env and configure your credentials:Start Services
Launch all services with Docker Compose:This will start:
- PostgreSQL database (port 5432)
- Redis queue (port 6379)
- TikTok Miner app (port 3000)
- Discovery pipeline worker
The first startup may take a few minutes to build the containers and run database migrations.
Verify Installation
Check that all services are running:You should see all services with status “Up”. Access the web interface at:
Run Your First Search
Open the TikTok Miner interface and navigate to the Scraper page.
-
Enter keywords (one per line):
- Click “Run Pipeline”
-
Watch the real-time terminal output as TikTok Miner:
- Discovers creator profiles
- Scrapes 30-day engagement metrics
- Calculates engagement rates
- Stores results in the database
Quick Start with Local Installation
Prefer to run locally? Follow these steps:Configure Environment
Copy the example environment file:Update the following required variables:
.env
Set Up Database
Generate Prisma client and run migrations:Or with npm:
Make sure PostgreSQL is running and accessible with the credentials in your
DATABASE_URL.Start Development Server
Launch the development server:Or with npm:The app will be available at
http://localhost:3000Understanding the Results
After your first search completes, you’ll see creators with:- Profile Information: Username, nickname, bio, follower count
- 30-Day Metrics: Posts, total likes, comments, views, shares
- Engagement Rate: Calculated as
(likes + comments) / (views * followers) - Average Performance: Average likes, comments, views per post
Next Steps
Analytics Dashboard
Learn how to filter, sort, and analyze discovered creators
Discovery Pipeline
Deep dive into how the discovery pipeline works
API Reference
Integrate TikTok Miner into your applications
CLI Tools
Use command-line tools for automation
Troubleshooting
Database connection failed
Database connection failed
Check that:
- PostgreSQL is running
- DATABASE_URL and DIRECT_URL are correctly formatted
- Database user has proper permissions
- Port 5432 is not blocked by firewall
Pipeline fails to start
Pipeline fails to start
Verify:
- Redis is running (if using job queues)
- All required API keys are set
- Network connectivity to TikTok/Apify
No creators found
No creators found
Try:
- Using more specific keywords
- Checking if keywords exist on TikTok
- Verifying API rate limits haven’t been exceeded
- Using different keyword variations
Authentication errors
Authentication errors
Ensure:
- NEXT_PUBLIC_SUPABASE_URL is set correctly
- NEXT_PUBLIC_SUPABASE_ANON_KEY is valid
- Supabase project is active
- NEXT_PUBLIC_APP_URL matches your domain
Need Help?
If you encounter issues:- Check the Installation Guide for detailed setup instructions
- Review Environment Variables for configuration details
- See Docker Deployment for container-specific issues
- Check Database Setup for database connection problems