- π Browse top stories from Hacker News
- π¬ Read comments in a threaded view
- π Dark/Light mode support
- πΌοΈ Story preview images (when available)
- β‘ Fast and responsive UI
- π Real-time updates with React Query
- π― Edge runtime for optimal performance
- Next.js - React framework
- React Query - Data fetching and caching
- TailwindCSS - Styling
- Hono - Edge API routes
- TypeScript
- Clone the repository:
git clone https://github.com/yourusername/pure-hn.git
cd pure-hn- Install dependencies:
npm install
# or
yarn install
# or
pnpm install
# or
bun install- Run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev- Open http://localhost:3000 with your browser to see the result.
src/
βββ app/ # Next.js app router
β βββ api/ # API routes using Hono
β βββ page.tsx # Main page component
βββ components/ # React components
β βββ comment/ # Comment-related components
β βββ story/ # Story-related components
β βββ ui/ # Shared UI components
βββ lib/ # Utility functions and types
β βββ api/ # API client and types
The project uses the official Hacker News API through edge functions:
/api/topstories- Get IDs of top stories/api/item/[id]- Get item details (story/comment)/api/og- Get Open Graph metadata for story URLs
