{"id":50345287,"url":"https://github.com/devbyray/hackernews-clone","last_synced_at":"2026-05-29T19:30:53.407Z","repository":{"id":335552611,"uuid":"1146245068","full_name":"devbyray/hackernews-clone","owner":"devbyray","description":"A fully functional HackerNews clone built with Vue 3, Tailwind CSS, Vitest, and Storybook. Features 7 tested components, 46 unit tests, and real HN API integration.","archived":false,"fork":false,"pushed_at":"2026-01-30T22:03:37.000Z","size":1067,"stargazers_count":0,"open_issues_count":12,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-31T12:37:51.947Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://hackernews-clone-demo.vercel.app/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devbyray.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-30T20:16:24.000Z","updated_at":"2026-01-31T09:35:40.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/devbyray/hackernews-clone","commit_stats":null,"previous_names":["devbyray/hackernews-clone"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/devbyray/hackernews-clone","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devbyray%2Fhackernews-clone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devbyray%2Fhackernews-clone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devbyray%2Fhackernews-clone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devbyray%2Fhackernews-clone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devbyray","download_url":"https://codeload.github.com/devbyray/hackernews-clone/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devbyray%2Fhackernews-clone/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33668185,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-05-29T19:30:52.636Z","updated_at":"2026-05-29T19:30:53.402Z","avatar_url":"https://github.com/devbyray.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🗞️ HackerNews Clone\n\nA fully functional, read-only HackerNews clone built from scratch with Vue 3, featuring comprehensive testing and documentation.\n\n[![Tests](https://img.shields.io/badge/tests-56%20passing-brightgreen)]()\n[![Components](https://img.shields.io/badge/components-11-blue)]()\n[![Stories](https://img.shields.io/badge/storybook-47%20stories-orange)]()\n\n![](./screenshot.png)\n\n## ✨ Features\n\n- 📰 **Browse Top Stories** - Real-time top 30 stories from HackerNews\n- 💬 **Nested Comments** - Recursive comment threads with collapse/expand\n- 🎨 **Responsive Design** - Beautiful UI with Tailwind CSS v4\n- 🧪 **Fully Tested** - 62 unit tests (56 passing)\n- 📚 **Documented** - Storybook stories for all components\n- ⚡ **Fast \u0026 Modern** - Built with Vite and Vue 3 Composition API\n- ♿ **Accessible** - Semantic HTML and ARIA attributes\n- 🔧 **Reusable Components** - Button and Input components for consistency\n\n## � Design\n\nBuilt from a community Figma design:\n\n- **[HackerNews Website Redesign](https://www.figma.com/design/nZYxyHjSmGpgACq6qC4Wq6/HackerNews-Website-Redesign--Community-?node-id=19-1250\u0026t=UCkFgUKMUAWa1SPp-4)** - Modern redesign with orange branding\n\n## �🎯 Live Demo\n\nRun locally in 2 minutes:\n\n```bash\nnpm install\nnpm run dev\n```\n\nVisit: http://localhost:5173\n\n## 🏗️ Tech Stack\n\n| Technology          | Purpose                        |\n| ------------------- | ------------------------------ |\n| **Vue 3**           | UI Framework (Composition API) |\n| **Vue Router**      | Client-side routing            |\n| **Tailwind CSS v4** | Utility-first styling          |\n| **Vitest**          | Unit testing framework         |\n| **Storybook**       | Component documentation        |\n| **Vite**            | Build tool \u0026 dev server        |\n| **HackerNews API**  | Real data integration          |\n\n## 🚀 Getting Started\n\n### Prerequisites\n\n- Node.js 18+ and npm\n\n### Installation\n\n```bash\n# Install dependencies\nnpm install\n\n# Start development server\nnpm run dev\n```\n\nVisit **http://localhost:5173** to see the app!\n\n### Quick Commands\n\n```bash\n# Development\nnpm run dev              # Start dev server\n\n# Testing\nnpm test                 # Run all tests\nnpm test -- --watch      # Run tests in watch mode\nnpm run coverage         # Generate coverage report\n\n# Storybook\nnpm run storybook        # Start Storybook on port 6006\n\n# Production\nnpm run build            # Build for production\nnpm run preview          # Preview production build\n```\n\n## 📦 Project Structure\n\n```\nsrc/\n├── components/          # 11 components (organized in folders)\n│   ├── Button/\n│   │   ├── Button.vue\n│   │   ├── Button.test.js\n│   │   └── Button.stories.js\n│   ├── Input/\n│   │   ├── Input.vue\n│   │   ├── Input.test.js\n│   │   └── Input.stories.js\n│   ├── Header/\n│   │   ├── Header.vue\n│   │   ├── Header.test.js\n│   │   └── Header.stories.js\n│   ├── Footer/\n│   │   ├── Footer.vue\n│   │   └── Footer.stories.js\n│   ├── LoadingSpinner/\n│   ├── ErrorMessage/\n│   ├── StoryItem/\n│   ├── StoryList/\n│   ├── CommentItem/\n│   ├── CommentList/\n│   └── ReadingList/\n├── pages/               # Application pages\n│   ├── HomePage.vue\n│   └── StoryDetailPage.vue\n├── router/              # Vue Router configuration\n├── services/            # HackerNews API service\n└── style.css            # Tailwind CSS v4\n```\n\n## 🧩 Components\n\nAll 11 components are organized in individual folders with tests and documentation:\n\n| Component          | Purpose                       | Tests | Stories |\n| ------------------ | ----------------------------- | ----- | ------- |\n| **Button**         | Reusable button (4 variants)  | 8     | 8       |\n| **Input**          | Reusable input (5 types)      | 8     | 6       |\n| **Header**         | Navigation header             | 3     | 1       |\n| **Footer**         | Footer with newsletter signup | -     | 1       |\n| **LoadingSpinner** | Loading indicator             | 6     | 5       |\n| **ErrorMessage**   | Error display                 | 8     | 5       |\n| **StoryItem**      | Individual story card         | 7     | 5       |\n| **StoryList**      | List of stories               | 6     | 5       |\n| **CommentItem**    | Recursive comment             | 8     | 5       |\n| **CommentList**    | Comment container             | 8     | 5       |\n| **ReadingList**    | Reading list display          | -     | 1       |\n\n**Total: 62 tests (56 passing), 47 Storybook stories**\n\nSee [COMPONENTS.md](./COMPONENTS.md) for detailed documentation.\n\n## 🧪 Testing\n\nAll components have comprehensive unit tests:\n\n```bash\nnpm test -- --run\n```\n\n**Results:**\n\n- ✅ 9 test files\n- ✅ 56 tests passing (62 total)\n- ✅ Comprehensive component coverage\n- 🎯 New Button and Input components: 16/16 tests passing\n\n## 📚 Documentation\n\n- **[QUICKSTART.md](./QUICKSTART.md)** - Get started in 2 minutes\n- **[COMPONENTS.md](./COMPONENTS.md)** - Detailed component documentation\n- **[PROJECT-SUMMARY.md](./PROJECT-SUMMARY.md)** - Complete project overview\n- **Storybook** - Interactive component examples (run `npm run storybook`)\n\n## 🔌 API Integration\n\nUses the official [HackerNews Firebase API](https://github.com/HackerNews/API):\n\n- **Top Stories:** `/v0/topstories.json`\n- **Item Details:** `/v0/item/{id}.json`\n- **Features:** Real-time data, recursive comment loading, error handling\n\n## 🎨 Customization\n\n### Change Theme Colors\n\nEdit `src/style.css` (Tailwind CSS v4):\n\n```css\n@theme {\n\t--color-hn-orange: #ff6600;\n\t--color-hn-bg: #fafcff;\n\t--color-hn-text: #54575a;\n\t--color-hn-dark: #3f220f;\n}\n```\n\n### Adjust Story Count\n\nEdit `src/pages/HomePage.vue`:\n\n```javascript\nconst storyIds = await getTopStories(30) // Change to any number\n```\n\n## 📸 Screenshots\n\n### Home Page - Top Stories\n\n![](./screenshot.png)\n\nBrowse the latest HackerNews stories with scores, authors, and comment counts.\n\n## 🤝 Contributing\n\nThis is a learning project showcasing:\n\n- Vue 3 Composition API\n- Component-driven development\n- Test-driven development\n- Documentation-first approach\n\nFeel free to explore the code and use it as a reference!\n\n## 📄 License\n\nMIT License - Feel free to use this project for learning and reference.\n\n## 🙏 Credits\n\n- **HackerNews** for the API\n- **Vue.js** team for the amazing framework\n- **Tailwind CSS** for the utility-first CSS framework\n- **Vite** for the blazing-fast build tool\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevbyray%2Fhackernews-clone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevbyray%2Fhackernews-clone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevbyray%2Fhackernews-clone/lists"}