A modern web search engine with a crawler backend and a Next.js frontend. This project consists of two main components:
- crawler - A TypeScript-based web crawler and indexer
- demex - A Next.js frontend search interface with modern UI components
search-engine/
├── crawler/ # Backend crawler and indexer service
├── demex/ # Next.js frontend search interface
└── docker-compose.yml # Database configuration
The crawler service is responsible for:
- Crawling websites according to robots.txt rules
- Indexing content for search functionality
- Storing data in a PostgreSQL database
Key technologies:
- TypeScript
- Drizzle ORM
- Node.js
- PostgreSQL
The frontend search interface provides:
- Modern, responsive search UI
- Real-time search results
- Animated components and modern design elements
Key technologies:
- Next.js
- React
- TypeScript
- Tailwind CSS
- Drizzle ORM
- Node.js (v18.x or higher)
- PNPM package manager
- Docker and Docker Compose
- Git
git clone <repository-url>
cd search-engine
docker-compose up -d
This will start a PostgreSQL database accessible at port 5433.
cd crawler
pnpm install
Generate and apply database migrations:
npx drizzle-kit generate
npx drizzle-kit migrate
Run the crawler in development mode:
pnpm dev
Or for production:
pnpm build
pnpm start
Alternatively, use the provided PowerShell script:
./start.ps1
cd ../demex
pnpm install
Apply database migrations:
npx drizzle-kit generate
npx drizzle-kit migrate
Run the development server:
pnpm dev
Access the search interface at: http://localhost:3000
Create .env
files in both the crawler and demex directories with the following settings:
DATABASE_URL=postgres://myuser:mypassword@localhost:5433/mydb
DATABASE_URL=postgres://myuser:mypassword@localhost:5433/mydb
- Run the crawler to populate the database with indexed content
- Develop/run the frontend to access the search functionality
- Make changes to the schema using Drizzle ORM and generate migrations as needed
Below is a demonstration of the search engine in action:
2025-05-12.16-32-33.mp4
The crawler can be deployed as a standalone Node.js service or as a Cloudflare Worker:
cd crawler
pnpm deploy
The Next.js frontend can be deployed to Vercel or other hosting services:
cd demex
pnpm build
Follow platform-specific deployment instructions for your hosting provider