- 🚀 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
