A full-stack, production-grade web crawler built with Next.js 16, TypeScript, Prisma, and Redis. ThunderCrawler lets you submit URLs, track crawl jobs in real time via WebSockets, and persist results to a serverless PostgreSQL database — all from a clean, modern UI.
- 🕷️ Async web crawling — submit URLs and crawl them in the background via dedicated workers
- 🔴 Real-time progress updates powered by WebSockets (
ws) - 🔐 Authentication with NextAuth v5 — credential-based login with bcrypt password hashing
- 🗄️ Database persistence via Prisma ORM + Neon (serverless PostgreSQL)
- ⚡ Redis-backed job queue — workers pull crawl jobs from a Redis queue (Docker Compose included)
- 🛡️ Input validation with Zod schemas
- 🎨 Modern UI built with Tailwind CSS v4, Radix UI, and shadcn/ui components
- 🧪 Tests directory included for unit/integration coverage
| Category | Technology |
|---|---|
| Framework | Next.js 16 (App Router) |
| Language | TypeScript 5 |
| Auth | NextAuth v5 (Prisma Adapter) + bcryptjs |
| Database | PostgreSQL via Neon (serverless) + Prisma ORM v7 |
| Job Queue | Redis 7 (Docker) |
| Real-time | WebSockets (ws) |
| UI | Tailwind CSS v4, Radix UI, shadcn/ui, Lucide React |
| Validation | Zod |
| Package Manager | Bun / npm |
ThunderCrawler/
├── app/ # Next.js App Router — pages & API routes
├── actions/ # Next.js Server Actions
├── components/ # Reusable React UI components (shadcn/ui)
├── config/ # App-wide configuration
├── generated/prisma/ # Auto-generated Prisma client
├── hooks/ # Custom React hooks
├── lib/ # Shared utilities (Prisma client, helpers)
├── prisma/ # Prisma schema & migrations
├── public/ # Static assets
├── tests/ # Unit & integration tests
├── types/ # Global TypeScript type definitions
├── workers/ # Background crawl worker processes
├── docker-compose.yml # Redis service for local development
├── index.ts # Standalone Prisma entry point / seed script
├── middleware.ts # Next.js middleware (auth guards, routing)
├── next.config.ts # Next.js configuration
└── prisma.config.ts # Prisma configuration
git clone https://github.com/THUNDERBLD/ThunderCrawler.git
cd ThunderCrawlernpm install
# or
bun installCreate a .env file in the project root:
# Database (Neon / PostgreSQL)
DATABASE_URL="postgresql://user:password@host/dbname?sslmode=require"
# NextAuth
NEXTAUTH_SECRET="your_nextauth_secret"
NEXTAUTH_URL="http://localhost:3000"
# Redis
REDIS_URL="redis://localhost:6379"docker-compose up -dThis starts a Redis 7 instance on port 6379 with persistence enabled.
# Push the Prisma schema to your database
npx prisma db push
# (Optional) Open Prisma Studio to inspect data
npx prisma studionpm run dev
# or
bun devOpen http://localhost:3000 in your browser.
In a separate terminal, start the crawl worker:
# Adjust the path to your worker entry point
npx ts-node workers/index.ts
# or
bun workers/index.tsBrowser ──(HTTP/WS)──► Next.js App
│
Server Actions
│
┌───────────┴────────────┐
▼ ▼
Prisma ORM Redis Queue
│ │
Neon PostgreSQL Crawl Workers
(persist results) (fetch & crawl URLs)
- A user submits a URL through the UI.
- A Server Action validates the input (Zod) and enqueues a job in Redis.
- A background worker dequeues the job, performs the HTTP crawl, and saves results to PostgreSQL via Prisma.
- The client receives live progress updates over a WebSocket connection.
| Script | Description |
|---|---|
npm run dev |
Start the Next.js development server |
npm run build |
Build for production |
npm run start |
Start the production server |
npm run lint |
Run ESLint |
The easiest way to deploy ThunderCrawler is with Vercel:
- Push your repository to GitHub.
- Import it on vercel.com/new.
- Set all environment variables from your
.envfile in the Vercel dashboard. - Deploy!
Note: The Redis-backed worker process needs to run separately (e.g., on a VPS, Railway, or Render) since Vercel is serverless and cannot run persistent background processes.
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature - Commit your changes:
git commit -m "feat: add your feature" - Push and open a Pull Request
This project is open source and available under the MIT License.
THUNDERBLD — @THUNDERBLD