title: Repofinder React description: RepoFinder allows users to search GitHub repositories based on various filters such as topics, languages, stars, sorting order, and result limits. Users can log in to save their search preferences. stack: React, Azure, GitHub Actions, Zustand, TypeScript, Tailwind CSS, Node Express, SQLite, Swagger, Azure Devops, JWT
π Repofinder Live: https://repofinder.abhish3kk.in
Repofinder is a React application that helps users discover GitHub repositories efficiently. It interacts with the GitHub API via a Node.js Express backend, allowing users to search for repositories based on customizable parameters such as topics, programming language, star count, result limit, sorting criteria, and more. Users can configure these filters in the Settings section to refine their search and find repositories that align with their interests.
Repofinder follows a client-server architecture, where the frontend (React) communicates with the backend (Node.js + Express) to fetch repositories via the GitHub API. The application ensures seamless user authentication, state management, and API communication to provide an interactive user experience.
graph LR;
User -->|Requests| ReactApp;
ReactApp -->|API Calls| NodeBackend;
NodeBackend -->|Fetches Data| GitHubAPI;
NodeBackend -->|Response| ReactApp;
ReactApp -->|Displays Data| User;
The diagram above represents the data flow: Users interact with the React frontend, which fetches data from the backend, and the backend queries the GitHub API before returning the results to the client.
src/components
βββ Card.tsx
βββ Combobox.tsx
βββ Darklight.tsx
βββ Error.tsx
βββ Loader.tsx
βββ MainContent.tsx
βββ Nav.tsx
βββ UserDropdown.tsx
The application consists of various reusable and structural components, categorized as follows:
Repofinder uses a combination of Zustand and Context API for efficient state management:
Zustand is used for managing application-wide state while ensuring minimal re-renders. The following stores handle different aspects of the app:
src/store
βββ appStore.ts
βββ authStore.ts
βββ index.ts
βββ settingStore.ts
appStore.ts
β Manages global app settings like theme selection (dark/light mode).authStore.ts
β Stores authentication details, including user session and JWT tokens.settingStore.ts
β Maintains user-defined search filters (topics, language, stars, etc.).Context API is used for handling UI-related transient states that donβt require persistence, such as:
By combining Zustand for persistent, app-wide state and Context API for temporary UI state, Repofinder ensures a smooth and optimized user experience.
src
βββ AppRoutes.tsx
βββ Provider.tsx
βββ api
βΒ Β βββ api.service.ts
βΒ Β βββ axiosInstance.ts
βΒ Β βββ config.ts
βΒ Β βββ endpoints.ts
βΒ Β βββ http.service.ts
βΒ Β βββ index.ts
βββ assets
βΒ Β βββ react.svg
βΒ Β βββ repos.json
βββ auth
βΒ Β βββ ProtectedRoute.tsx
βββ components
βΒ Β βββ Card.tsx
βΒ Β βββ Combobox.tsx
βΒ Β βββ Darklight.tsx
βΒ Β βββ Error.tsx
βΒ Β βββ Loader.tsx
βΒ Β βββ MainContent.tsx
βΒ Β βββ Nav.tsx
βΒ Β βββ UserDropdown.tsx
βββ contexts
βΒ Β βββ authContext.ts
βΒ Β βββ healthContext.ts
βΒ Β βββ index.ts
βΒ Β βββ loaderContext.ts
βββ hooks
βΒ Β βββ index.ts
βΒ Β βββ useAuth.ts
βΒ Β βββ useLoader.ts
βββ index.css
βββ main.tsx
βββ models
βΒ Β βββ api.request.model.ts
βΒ Β βββ api.response.model.ts
βΒ Β βββ app.models.ts
βΒ Β βββ app.types.ts
βΒ Β βββ github.model.ts
βΒ Β βββ github.types.ts
βββ providers
βΒ Β βββ AuthProvider.tsx
βΒ Β βββ HealthProvider.tsx
βΒ Β βββ LoaderProvider.tsx
βΒ Β βββ index.ts
βββ routes
βΒ Β βββ index.tsx
βββ store
βΒ Β βββ appStore.ts
βΒ Β βββ authStore.ts
βΒ Β βββ index.ts
βΒ Β βββ settingStore.ts
βββ utils
βΒ Β βββ enumToArray.ts
βΒ Β βββ getLabelFromOption.ts
βΒ Β βββ index.ts
βββ views
βΒ Β βββ Dashboard.tsx
βΒ Β βββ Login.tsx
βΒ Β βββ Register.tsx
βΒ Β βββ Settings.tsx
βββ vite-env.d.ts