Quickstart
Run CreatorIQ locally in about five minutes.
1. Install
git clone https://github.com/Aymenjdily/creatoriq.git
cd creatoriq
npm install2. Environment variables
Copy .env.example to .env.local and fill in your keys:
NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key
NEXT_PUBLIC_SITE_URL=http://localhost:3000
SCRAPECREATORS_API_KEY=your-scrapecreators-key
CRON_SECRET=any-random-string- Supabase keys: Project Settings → API in your Supabase dashboard.
- ScrapeCreators key: app.scrapecreators.com (100 free credits).
- The service role key is server-only — never expose it to the browser.
3. Database setup
Run every file in supabase/migrations/ in the Supabase SQL Editor, in order:
20260731000000_init.sql # videos + scrape_runs
alter table ... add niche # one-liner, see README
20260801000000_saved_ideas.sql # saved ideas
20260802000000_credits.sql # credit system
20260803000000_folders.sql # folders + shares
20260804000000_fix_folder_policies.sql
20260805000000_fix_share_recursion.sql4. Auth providers
In Supabase → Authentication:
- Enable the Email provider (disable "Confirm email" for instant signup).
- Enable Google and add
https://<project-ref>.supabase.co/auth/v1/callbackto the OAuth client's redirect URIs in Google Cloud Console. - Add
http://localhost:3000/auth/callbackto Redirect URLs in URL Configuration.
5. Run
npm run devOpen http://localhost:3000, sign up, then hit POST /api/scrape/run to pull your first viral videos into the database.
First scrape
curl -X POST http://localhost:3000/api/scrape/run \
-H "Content-Type: application/json" \
-d '{"platforms":["tiktok","instagram","youtube"]}'