Discover GitHub repositories in style! A modern web app built with Svelte 5's bleeding-edge Runes reactivity system, TypeScript, and Tailwind CSS 4. Search any GitHub user, browse their public repos, and star favorites locally ⭐ – all with buttery-smooth interactions!
- ⚡ Blazing Fast UI: Svelte 5's optimized reactivity + Vite's instant HMR
- 🌓 Dark/Light Mode: Automatic system preference detection with Tailwind
- 🔍 Smart Search: GitHub API integration with rate limit handling
- 📱 Responsive Grid: Clean card layout adapting to all screen sizes
- ✨ Local Star System: Toggle starred repos persisted via Svelte stores
- 🚦 UI States: Loading spinners, error handling, and empty states
- 🛠 Type-Safe: Full TypeScript integration for robust development
- ⚛️ Svelte 5 (With Runes reactivity)
- 🎨 Tailwind CSS 4 +
tailwind-merge
for utility-first styling - 📦 Vite (Build tooling with lightning-fast HMR)
- 🔮 TypeScript (Type-safe development)
- 🗃️ Reactive State Management: Svelte stores + Runes
$state
/$derived
synergy - 🔗 Immutable Patterns: Set-based operations for predictable state updates
- 📡 GitHub REST API (Repository data fetching)
- 🧩 Component Architecture (Reusable, self-contained components)
- Node.js 22+
- pnpm 10.x
git clone https://github.com/handylim/github-repo-preview.git
cd github-repo-preview
pnpm install
pnpm dev
Visit http://localhost:3000
pnpm build
pnpm preview
Leverage the new reactivity primitives ($state
, $derived
) for granular control over component updates while maintaining minimal boilerplate.
Utility-first styling with dark mode support out of the box. The cn
utility (src/lib/utils/tailwind.ts) combines clsx
and tailwind-merge
for conditional classes.
Full type safety from API responses (github.ts) to component props, catching errors at compile time.
Instant hot module replacement and optimized production builds via Rollup.
📦 src
├── 📂 lib
│ ├── 📂 components # Reusable Svelte components
│ ├── 📂 store # Svelte store for local starring
│ └── 📂 utils # Tailwind/helper functions
├── App.svelte # Root component
└── main.ts # App mount point
-
Progressive Enhancement:
Graceful degradation for slow networks (loading states, error boundaries) -
Accessibility First:
Semantic HTML, ARIA labels, and keyboard navigation support -
Reactive Patterns:
Svelte 5's$derived
for computed states, store synchronization -
Modern CSS:
Tailwind 4 is used to style the Svelte components -
Performance First:
Set
operations ensure efficient starred ID lookups even with 1000+ repos
- Rate Limiting: GitHub API allows ~60 requests/hour unauthenticated
- Local Storage: Starred repos persist only in current browser session
- Svelte 5: Using experimental Runes syntax (future-proof but bleeding-edge)
- Volatile State: Starred repos reset on page refresh (intentional - see Future Improvements)
- Add OAuth for higher API rate limits
- Persist stars in localStorage
- Repository filtering/sorting
- GitHub Actions CI/CD pipeline
- Unit tests with Vitest
- Add store hydration from localStorage
- Implement store middleware for API sync
- Benchmark large
Set
performance
Built using the create-vite
template, supercharged with:
- Svelte 5's new reactivity system
- Tailwind CSS 4's new features
- GitHub's REST API v3
🌟 Star this repo (both here and locally in the app🌟) if you find it useful!😉
🐛 Issues/PRs welcome! Let's build something awesome together! 🚀
Crafted with ❤️ by Handy