A fast and efficient search engine for CTF (Capture The Flag) writeups and solutions, powered by Typesense. Search through a curated collection of 25,000+ CTF writeups with instant results and smart filtering.
View it live here: https://ctfsearch.hackmap.win
- 🚀 Instant search with typo tolerance
- 🏷️ Smart category filtering
- 📱 Mobile-friendly interface
- 🌓 Dark/Light theme support
- ⚡ Fast and responsive UI
This search experience is powered by Typesense, an open-source, typo-tolerant search engine. It's designed as a faster alternative to Elasticsearch and an open-source alternative to Algolia.
The frontend is built with:
- InstantSearch.js
- Typesense Instantsearch Adapter
- Bootstrap 4
- Parcel bundler
The search backend runs on Typesense, which can be self-hosted or used via Typesense Cloud.
src/
- Frontend components and stylesscripts/indexer/
- Python scripts for data indexingscripts/data/
- Sample dataset and transformation scripts
To run this project locally:
- Install dependencies:
yarn
- Start Typesense server (requires Docker):
yarn run typesenseServer
- Set up environment:
cp .env.example .env
- Index the data:
yarn run indexer:transformWriteups
yarn run indexer:importToTypesense
Data must be in the scripts/data/writeups.json
file. In this format:
{
"documents": [
{
"title": "Writeup Title",
"url": "https://example.com/writeup",
"author": "Author Name",
"mirror_url": "https://example2.com/writeup",
"date": "2024-01-01",
"base64_content": "base64_encoded_content"
}
]
}
- Start development server:
yarn start
Open http://localhost:3000 to see the app.
Create a .env
file with the following variables:
TYPESENSE_API_KEY=xyz
TYPESENSE_HOST=localhost
TYPESENSE_PORT=8108
TYPESENSE_PROTOCOL=http
TYPESENSE_SEARCH_ONLY_API_KEY=xyz
The app is designed to be hosted on AWS S3 with CloudFront as CDN:
yarn build
yarn deploy
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - feel free to use this code for your own projects.