A modern React application for browsing Hacker News stories with a clean, responsive interface. Built with TypeScript, Vite, and TanStack Router for optimal performance and developer experience.
- Browse the latest Hacker News stories
- View individual story details and comments
- Responsive design for all devices
- Fast loading with React Query for data fetching
- Component library with Storybook integration
- TypeScript for type safety
- Vite for fast development and building
- React 19 - UI library
- TypeScript - Type safety
- Vite - Build tool and dev server
- TanStack Router - File-based routing
- TanStack Query - Data fetching and caching
- Storybook - Component development and documentation
- Zod - Schema validation
- CSS Modules - Scoped styling
- Node.js (version 22 or higher)
- pnpm (recommended) or npm
git clone <repository-url>
cd hacker-lenspnpm installpnpm devThe application will be available at http://localhost:5173
pnpm buildpnpm previewpnpm dev- Start the development serverpnpm build- Build the application for productionpnpm preview- Preview the production build locallypnpm lint- Run ESLint to check for code issuespnpm storybook- Start Storybook for component developmentpnpm build-storybook- Build Storybook for deployment
The application fetches data from the official Hacker News API:
- Base URL:
https://hacker-news.firebaseio.com/v0 - Stories endpoint:
/newstories.json - Individual items:
/item/{id}.json
This project uses Storybook for component development and documentation. Start Storybook with:
pnpm storybookThe project includes:
- ESLint for code linting
- TypeScript for type checking
- Prettier for code formatting
Run linting with:
pnpm lint