Modern React application to manage your GitHub repositories with Auth0 authentication.
- 🔐 Auth0 Authentication with GitHub
- 📚 List your GitHub repositories
- 🔍 Search through repositories
- ⭐ Save favorite repositories
- 🎨 Material-UI components
- 📱 Responsive design
- 💾 Persistent storage with Zustand
- React + TypeScript
- Material-UI v5
- Auth0 React SDK
- Zustand for state management
- React Router v6
- Axios for API calls
- Node.js >= 20
- GitHub account
- Auth0 account
Create a .env file in the root directory with the following variables:
VITE_AUTH0_DOMAIN=your-auth0-domain
VITE_AUTH0_CLIENT_ID=your-auth0-client-id
VITE_AUTH0_AUDIENCE=your-auth0-audience
VITE_AUTH0_CALLBACK_URL=http://localhost:5173/callback
VITE_API_URL=http://localhost:8080- Clone the repository
- Install dependencies
npm install
# or
yarn- Start the development server
npm run dev
# or
yarn devsrc/
├── auth/ # Auth0 related code
├── components/ # Reusable UI components
├── hooks/ # Custom React hooks
├── pages/ # Page components
├── routes/ # Routes components
├── services/ # API services
├── store/ # Zustand store and slices
├── types/ # TypeScript interfaces
├── main.tsx # Application entry point
└── main.tsx # Application entry point
- User clicks "Login with GitHub"
- Auth0 redirects to GitHub OAuth
- After authorization, redirects to callback URL
- Access token stored in Zustand store
- Token used for API requests
- List all user repositories
- Search functionality
- Favorite/unfavorite repositories
- User information display
- Favorite repositories list
Display repository information with:
- Repository name and description
- Star count and privacy status
- Primary language
- Favorite toggle
- Handles repository fetching and display
- Loading states
- Error handling
- Empty states
- Real-time search functionality
- Debounced search updates
- Integration with Zustand store
Zustand slices:
authSlice: Authentication stateuserSlice: User informationfavoritesSlice: Favorite repositoriessearchSlice: Search functionality
Endpoints used:
/api/github/repositories/api/github/repositories/search/api/favorites
Sébastien Ballen Castaneda
MIT License - see LICENSE file for details