An open API service indexing awesome lists of open source software.

https://github.com/hemants1703/hacker-news-api-react-app

Hacker News App that displays search results from the Hacker News Algolia API
https://github.com/hemants1703/hacker-news-api-react-app

api api-rest hacker-news react react-router reactjs vite vitejs

Last synced: 2 months ago
JSON representation

Hacker News App that displays search results from the Hacker News Algolia API

Awesome Lists containing this project

README

          

# Hacker News API React App

[![React](https://img.shields.io/badge/React-18.2.0-blue.svg)](https://reactjs.org/)
[![Vite](https://img.shields.io/badge/Vite-4.4.5-646CFF.svg)](https://vitejs.dev/)
[![Chakra UI](https://img.shields.io/badge/Chakra_UI-2.8.1-319795.svg)](https://chakra-ui.com/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

A modern, responsive Hacker News client built with React, Vite, and Chakra UI. Search and browse Hacker News stories with a clean, intuitive interface.

![Hacker News API React App](https://res.cloudinary.com/dej4ks4wd/image/upload/v1742751980/Screenshot_2025-03-23_at_11.16.13_PM_qhpqsx.png)

## 🚀 Live Demo

Check out the live demo [here](https://hacker-news-api-react-app.vercel.app/)

## ✨ Features

### Home Screen
- 🔍 Search for stories with a prominent search field
- 📋 View search results in a clean, organized list
- ⚡ Real-time search results using the Hacker News Algolia API
- 🎨 Sleek UI with responsive design

### Post Detail Screen
- 📰 View comprehensive post details
- 👍 See points/votes for each post
- 💬 Browse all comments with nested threading
- 👤 View author information with links to profiles

## 🛠️ Technologies Used

- **[Vite](https://vitejs.dev/)** - Fast, modern frontend build tool
- **[React](https://reactjs.org/)** - UI component library
- **[Chakra UI](https://chakra-ui.com/)** - Component library for beautiful UI/UX
- **[Hacker News API](https://github.com/HackerNews/API)** - Data source
- **[Axios](https://axios-http.com/)** - HTTP client for API requests
- **[React Router](https://reactrouter.com/)** - For navigation between pages
- **[React Hooks](https://reactjs.org/docs/hooks-intro.html)** - For state management

## 📋 Development Approach

- Modular architecture for maintainability and code organization
- Separate services for data fetching logic
- Consistent theme using Chakra UI's theming system
- DRY (Don't Repeat Yourself) approach to reduce code duplication
- Responsive design that works on mobile, tablet, and desktop
- Optimized for performance with efficient rendering

## 🚀 Getting Started

### Prerequisites

- Node.js (v14 or higher)
- npm or yarn

### Installation

1. Clone the repository:
```bash
git clone https://github.com/hemants1703/hacker-news-API-react-app.git
cd hacker-news-API-react-app
```
2. Install dependencies:
```bash
pnpm install
```
3. Start the development server:
```bash
pnpm run dev
```
4. Open [http://localhost:3000](http://localhost:3000) in your browser

## Contributing

Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.

1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request

## Connect with Me 🤝

If you have any questions or just want to chat, feel free to reach out to me!
![X (formerly Twitter) Follow](https://img.shields.io/twitter/follow/hemants1703)
[![LinkedIn](https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/in/hemants1703/)

## 📝 License

This project is open source and available under the [MIT License](https://opensource.org/licenses/MIT).