|
1 | 1 | # GitHub Toolkit |
2 | 2 |
|
3 | | -A comprehensive GitHub toolkit built with Next.js frontend and Flask api. Analyze GitHub profiles, view detailed metrics, visualize data with charts, and compare profiles side-by-side. |
4 | | - |
5 | | -## Features |
6 | | - |
7 | | -### 🎯 **Dashboard Interface** |
8 | | -- **Tool Dashboard**: Clean landing page with feature cards for all available tools |
9 | | -- **Easy Navigation**: Intuitive interface to access different GitHub analysis tools |
10 | | -- **Scalable Design**: Ready for future tool additions with consistent card layout |
11 | | - |
12 | | -### 🔍 **Available Tools** |
13 | | -- **Profile Analyzer**: Get detailed insights into any GitHub user's profile, repositories, and activity metrics |
14 | | -- **Compare Profiles**: Compare two GitHub profiles side-by-side for hiring decisions and team analysis |
15 | | -- **Repository Insights**: Deep dive into repository statistics, contributors, and project health metrics (Coming Soon) |
16 | | -- **Team Analytics**: Analyze team performance, collaboration patterns, and productivity metrics (Coming Soon) |
17 | | - |
18 | | -### 🚀 **Core Capabilities** |
19 | | -- **Repository Statistics**: View stars, forks, languages, and repository metrics |
20 | | -- **Data Visualization**: Interactive charts showing language distribution and other metrics |
21 | | -- **Modern UI**: Beautiful, responsive interface built with Tailwind CSS |
22 | | -- **Real-time Data**: Live data from GitHub API |
23 | | -- **Lean Architecture**: Clean, efficient codebase with minimal dependencies |
24 | | - |
25 | | -## Tech Stack |
26 | | - |
27 | | -### Frontend |
28 | | -- **Next.js 14** - React framework with App Router |
29 | | -- **TypeScript** - Type-safe development |
30 | | -- **Tailwind CSS** - Utility-first CSS framework |
31 | | -- **Chart.js** - Data visualization |
32 | | -- **Lucide React** - Beautiful icons |
33 | | - |
34 | | -### Backend |
35 | | -- **Flask** - Lightweight Python web framework |
36 | | -- **requests** - HTTP client for GitHub API |
37 | | -- **Flask-CORS** - Cross-origin resource sharing |
38 | | -- **python-dotenv** - Environment variable management |
39 | | -- **GitHub API** - Official GitHub REST API |
40 | | - |
41 | | -## Setup Instructions |
| 3 | +A comprehensive GitHub toolkit built with Next.js frontend and Flask API. Analyze GitHub profiles, view detailed metrics, visualize data with charts, and compare profiles side-by-side. |
42 | 4 |
|
43 | | -### Prerequisites |
| 5 | +## 📚 Table of Contents |
| 6 | + |
| 7 | +- **[Getting Started](./docs/GETTING_STARTED.md)** - Installation, setup, and troubleshooting guide |
| 8 | +- **[Features](./docs/FEATURES.md)** - Detailed feature descriptions and capabilities |
| 9 | +- **[Technical Details](./docs/TECHNICAL_DETAILS.md)** - Tech stack, architecture, and deployment |
| 10 | +- **[GitHub API Integration](./docs/GITHUB_API_INTEGRATION.md)** - API endpoints and integration details |
| 11 | + |
| 12 | +## 🚀 Quick Start |
44 | 13 |
|
| 14 | +### Prerequisites |
45 | 15 | - Node.js 18+ and yarn |
46 | 16 | - Python 3.8+ |
47 | 17 | - Git |
48 | 18 | - GitHub Personal Access Token (recommended) |
49 | 19 |
|
50 | | -### 1. Clone the Repository |
| 20 | +### Setup |
51 | 21 |
|
| 22 | +**1. Clone the repository:** |
52 | 23 | ```bash |
53 | 24 | git clone <repository-url> |
54 | 25 | cd github-toolkit |
55 | 26 | ``` |
56 | 27 |
|
57 | | -### 2. Backend Setup |
58 | | - |
| 28 | +**2. Backend setup:** |
59 | 29 | ```bash |
60 | | -# Install Python dependencies |
61 | 30 | pip install -r requirements.txt |
62 | | - |
63 | | -# Set up environment variables |
64 | | -# Create .env file in root directory |
65 | | -echo "GITHUB_TOKEN=your_github_token_here" > .env |
66 | | - |
67 | | -# Run the Flask API server |
| 31 | +cp .env.example .env |
| 32 | +# Edit .env and add your GitHub token |
| 33 | +# GITHUB_TOKEN=your_token_here |
68 | 34 | python -m flask --app api/index run -p 5328 |
69 | 35 | ``` |
70 | 36 |
|
71 | | -### 3. Frontend Setup |
72 | | - |
| 37 | +**3. Frontend setup (new terminal):** |
73 | 38 | ```bash |
74 | | -# Install dependencies |
75 | 39 | yarn |
76 | | - |
77 | | -# Run the development server |
78 | 40 | yarn next-dev |
79 | 41 | ``` |
80 | 42 |
|
81 | | -### 4. Access the Application |
82 | | - |
| 43 | +**4. Access the application:** |
83 | 44 | - Frontend: http://localhost:3000 |
84 | 45 | - Backend API: http://localhost:5328 |
85 | 46 |
|
86 | | -## GitHub API Token Setup |
87 | | - |
88 | | -To use the GitHub API effectively, you'll need a personal access token: |
89 | | - |
90 | | -1. Go to GitHub Settings → Developer settings → Personal access tokens |
91 | | -2. Generate a new token with the following scopes: |
92 | | - - `public_repo` (for public repository access) |
93 | | - - `user` (for user profile information) |
94 | | -3. Add the token to your api `.env` file: |
95 | | - ``` |
96 | | - GITHUB_TOKEN=your_token_here |
97 | | - ``` |
98 | | - |
99 | | -**Note**: Without a token, you'll be limited to 60 requests per hour. With a token, you get 5,000 requests per hour. |
100 | | - |
101 | | -## API Endpoints |
102 | | - |
103 | | -### Base URL |
104 | | -All API endpoints are prefixed with `/api` |
105 | | - |
106 | | -### Profile Analysis |
107 | | -- `GET /api/profile/{username}` - Get complete profile analysis |
108 | | -- `GET /api/repositories/{username}` - Get user repositories |
109 | | - |
110 | | -### Profile Comparison |
111 | | -- `GET /api/compare/{username1}/{username2}` - Compare two profiles |
112 | | - |
113 | | -### Root Endpoint |
114 | | -- `GET /api/` - API health check |
| 47 | +## 🎯 Available Tools |
115 | 48 |
|
116 | | -## Usage |
| 49 | +- **Profile Analyzer** (`/profile-analyzer`) - Analyze individual GitHub profiles with detailed metrics |
| 50 | +- **Compare Profiles** (`/compare-profiles`) - Compare two GitHub users side-by-side |
117 | 51 |
|
118 | | -### 🏠 **Dashboard Navigation** |
119 | | -1. **Landing Page**: Access the main dashboard with all available tools |
120 | | -2. **Tool Selection**: Click on any feature card to access specific tools |
121 | | -3. **Navigation**: Use back buttons to return to the dashboard |
| 52 | +## 💻 Development |
122 | 53 |
|
123 | | -### 🔍 **Profile Analysis** |
124 | | -1. Click on "Profile Analyzer" from the dashboard |
125 | | -2. Enter a GitHub username in the search field |
126 | | -3. Click "Analyze Profile" to get detailed insights |
127 | | -4. View profile information, statistics, language distribution, and repositories |
128 | | - |
129 | | -### 👥 **Profile Comparison** |
130 | | -1. Click on "Compare Profiles" from the dashboard |
131 | | -2. Enter two GitHub usernames in the respective fields |
132 | | -3. Click "Compare Profiles" to see side-by-side comparison |
133 | | -4. View metrics comparison with winner indicators |
134 | | - |
135 | | -## Features in Detail |
136 | | - |
137 | | -### 🎯 **Dashboard Interface** |
138 | | -- **Tool Cards**: Beautiful feature cards with icons, descriptions, and feature lists |
139 | | -- **Navigation**: Easy access to all tools with back button navigation |
140 | | -- **Scalability**: Ready for future tool additions with consistent design |
141 | | -- **Responsive Design**: Works perfectly on desktop, tablet, and mobile devices |
142 | | - |
143 | | -### 🔍 **Profile Analysis** |
144 | | -- **Profile Information**: Avatar, bio, location, company, social links |
145 | | -- **Statistics**: Followers, following, stars, forks, repository count |
146 | | -- **Language Distribution**: Pie chart showing programming languages used |
147 | | -- **Repository List**: Recent repositories with details |
148 | | -- **Metrics**: Average stars/forks per repo, top language, etc. |
149 | | - |
150 | | -### 👥 **Profile Comparison** |
151 | | -- **Side-by-side Metrics**: Compare followers, repositories, stars, forks |
152 | | -- **Winner Indicators**: Visual indicators showing which user leads in each metric |
153 | | -- **Comprehensive Analysis**: All key metrics compared in one view |
154 | | - |
155 | | -### 🚀 **Future Tools** (Planned) |
156 | | -- **Repository Insights**: Deep dive into individual repository statistics |
157 | | -- **Team Analytics**: Team performance and collaboration analysis |
158 | | -- **Advanced Metrics**: More sophisticated GitHub data analysis tools |
159 | | - |
160 | | -## Development |
161 | | - |
162 | | -### Running in Development Mode |
163 | | - |
164 | | -**Option 1: Concurrent Development (Recommended)** |
| 54 | +**Run both frontend and backend concurrently:** |
165 | 55 | ```bash |
166 | | -# Run both frontend and backend simultaneously |
167 | 56 | yarn dev |
168 | 57 | ``` |
169 | 58 |
|
170 | | -**Option 2: Manual Commands** |
| 59 | +Or run them separately: |
171 | 60 | ```bash |
172 | | -# Terminal 1 - Backend |
| 61 | +# Terminal 1 |
173 | 62 | python -m flask --app api/index run -p 5328 |
174 | 63 |
|
175 | | -# Terminal 2 - Frontend |
| 64 | +# Terminal 2 |
176 | 65 | yarn next-dev |
177 | 66 | ``` |
178 | 67 |
|
179 | | -**Option 3: Individual Services** |
| 68 | +**Build for production:** |
180 | 69 | ```bash |
181 | | -# Backend only |
182 | | -yarn flask-dev |
183 | | - |
184 | | -# Frontend only |
185 | | -yarn next-dev |
186 | | -``` |
187 | | - |
188 | | -### Building for Production |
189 | | - |
190 | | -```bash |
191 | | -# Build frontend |
192 | 70 | yarn build |
193 | | - |
194 | | -# Start production server |
195 | 71 | yarn start |
196 | 72 | ``` |
197 | 73 |
|
198 | | -## Customization |
| 74 | +## 📖 Learn More |
199 | 75 |
|
200 | | -### Adding New Metrics |
201 | | -1. Update the API routes in `api/routes/common_routes.py` |
202 | | -2. Add new fields to the TypeScript types in `types/index.ts` |
203 | | -3. Update the frontend components to display the new metrics |
| 76 | +- For detailed setup and troubleshooting, see [Getting Started](./docs/GETTING_STARTED.md) |
| 77 | +- For feature descriptions, see [Features](./docs/FEATURES.md) |
| 78 | +- For technical architecture, see [Technical Details](./docs/TECHNICAL_DETAILS.md) |
| 79 | +- For API integration details, see [GitHub API Integration](./docs/GITHUB_API_INTEGRATION.md) |
204 | 80 |
|
205 | | -### Styling |
206 | | -- Modify `tailwind.config.js` for theme customization |
207 | | -- Update `app/globals.css` for global styles |
208 | | -- Component-specific styles can be added using Tailwind classes |
| 81 | +## 🤝 Contributing |
209 | 82 |
|
210 | | -## Troubleshooting |
| 83 | +We welcome contributions! Please follow these steps: |
211 | 84 |
|
212 | | -### Common Issues |
| 85 | +1. Fork the repository |
| 86 | +2. Create a feature branch (`git checkout -b feature/amazing-feature`) |
| 87 | +3. Make your changes and commit (`git commit -m 'Add amazing feature'`) |
| 88 | +4. Push to the branch (`git push origin feature/amazing-feature`) |
| 89 | +5. Open a Pull Request |
213 | 90 |
|
214 | | -1. **CORS Errors**: Make sure the api is running on port 5328 and frontend on port 3000 |
215 | | -2. **API Rate Limits**: Add a GitHub token to increase rate limits |
216 | | -3. **User Not Found**: Verify the GitHub username exists and is public |
217 | | -4. **Build Errors**: Ensure all dependencies are installed correctly |
| 91 | +### Code Standards |
| 92 | +- Use TypeScript for frontend code |
| 93 | +- Maintain clean, readable code with proper comments |
| 94 | +- Test your changes thoroughly before submitting |
| 95 | +- Follow the existing code style and conventions |
218 | 96 |
|
219 | | -## Contributing |
| 97 | +## 📄 License |
220 | 98 |
|
221 | | -1. Fork the repository |
222 | | -2. Create a feature branch |
223 | | -3. Make your changes |
224 | | -4. Test thoroughly |
225 | | -5. Submit a pull request |
| 99 | +This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. |
226 | 100 |
|
227 | | -## License |
| 101 | +--- |
228 | 102 |
|
229 | | -This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. |
| 103 | +**Made with ❤️ by Vishwajeet Kondi** |
0 commit comments