A SvelteKit application that helps you manage multiple GitHub repositories at once. View repository stats, batch update privacy settings, and delete repositories with ease.
- 🔐 OAuth authentication with GitHub
- 📊 View repository statistics
- Stars and forks
- Last commit information
- Programming language
- 🔍 Filter repositories by:
- Visibility (Public/Private)
- Type (Source/Forked)
- 📝 Batch actions:
- Make repositories private
- Delete repositories
- 📈 Real-time repository stats
- 🎨 UI with Tailwind CSS
- Node.js
- A GitHub account
- A GitHub OAuth App (for authentication)
- Clone the repository:
git clone https://github.com/naimulh247/github-repo-manager.git
cd github-repo-manager- Install dependencies:
pnpm install-
Register a new OAuth application in GitHub:
- Go to GitHub Settings > Developer Settings > OAuth Apps > New OAuth App
- Set Homepage URL to
http://localhost:5173 - Set Authorization callback URL to
http://localhost:5173/api/auth/callback - Copy the Client ID and Client Secret
-
Create a
.envfile in the project root:
GITHUB_CLIENT_ID="your_client_id_here"
GITHUB_CLIENT_SECRET="your_client_secret_here"
PUBLIC_URL="http://localhost:5173"- Start the development server:
npm run devThe application will be available at http://localhost:5173.
github-repo-manager/
├── src/
│ ├── routes/
│ │ ├── +page.svelte # Main application page
│ │ └── api/ # API endpoints
│ │ ├── auth/ # Authentication endpoints
│ │ │ ├── github/ # GitHub OAuth initiation
│ │ │ ├── callback/ # OAuth callback handling
│ │ │ ├── status/ # Session status
│ │ │ └── logout/ # Logout handling
│ │ └── github/
│ │ ├── repos/ # Repository management
│ │ └── batch-action/ # Batch operations
│ ├── app.html # Base HTML template
│ └── app.css # Global styles
├── static/ # Static assets
├── .env # Environment variables
├── package.json
├── postcss.config.js
├── tailwind.config.ts
└── vite.config.js
GET /api/auth/github- Initiates GitHub OAuth flowGET /api/auth/callback- Handles OAuth callbackGET /api/auth/status- Checks authentication statusPOST /api/auth/logout- Logs out user
GET /api/github/repos- Fetches user's repositories with statsPOST /api/github/batch-action- Performs batch operations on repositories
pnpm buildpnpm previewThis application can be deployed to any platform that supports Node.js. Make sure to:
- Set up the environment variables
- Update the OAuth callback URL in your GitHub OAuth App settings
- Configure CORS if needed
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with SvelteKit
- Styled with Tailwind CSS
- GitHub API v3