Skip to content

hackclub/search

Hack Club Search

A Brave Search API proxy for Hack Club members.

Features

  • Web search with news, videos, discussions, and more
  • Image search
  • Request logging and usage statistics
  • OAuth authentication via Hack Club

Setup

  1. Clone the repository
  2. Install dependencies: bun install
  3. Copy .env.example to .env and fill in the values
  4. Run database migrations: bun run db:push
  5. Start the development server: bun run dev

Environment Variables

DATABASE_URL=postgresql://...
BASE_URL=http://localhost:3000
PORT=3000

HACK_CLUB_CLIENT_ID=...
HACK_CLUB_CLIENT_SECRET=...

BRAVE_SEARCH_API_KEY=...

NODE_ENV=development
ENFORCE_IDV=false

API Endpoints

  • GET /res/v1/web/search?q=... - Web search
  • GET /res/v1/images/search?q=... - Image search
  • GET /res/v1/stats - Usage statistics
  • GET /res/v1/openapi.json - OpenAPI specification

Development

bun run dev      # Start dev server
bun run typecheck # Run TypeScript checks
bun run lint     # Run linter

License

MIT

About

Free Search API

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published