Skip to content

simonayotte/pure-hn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ—žοΈ Pure HN - A Minimal Hacker News Web Client

A clean and minimal web client for browsing Hacker News top stories and comments.

Built with Next.js 14, React, and TailwindCSS.

CleanShot 2024-11-13 at 11 44 48@2x

Features

  • πŸš€ 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

Tech Stack

Getting Started

  1. Clone the repository:
git clone https://github.com/yourusername/pure-hn.git
cd pure-hn
  1. Install dependencies:
npm install
# or
yarn install
# or
pnpm install
# or
bun install
  1. Run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
  1. Open http://localhost:3000 with your browser to see the result.

Project Structure

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

API Routes

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

References

  1. Hacker News API

About

πŸ“° Minimal Hacker News web client made with Next.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages