Skip to content

Commit a9e2ade

Browse files
authored
Merge pull request #1 from vkondi/feat/feature_enhancement
feat: UI Enhancements
2 parents bf57521 + 244c25f commit a9e2ade

38 files changed

Lines changed: 1468 additions & 651 deletions

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Dependencies
22
node_modules/
33
api/venv/
4-
api/__pycache__/
5-
api/*.pyc
4+
**/__pycache__/
5+
**/*.pyc
66

77
# Environment variables
88
.env

README.md

Lines changed: 48 additions & 174 deletions
Original file line numberDiff line numberDiff line change
@@ -1,229 +1,103 @@
11
# GitHub Toolkit
22

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.
424

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
4413

14+
### Prerequisites
4515
- Node.js 18+ and yarn
4616
- Python 3.8+
4717
- Git
4818
- GitHub Personal Access Token (recommended)
4919

50-
### 1. Clone the Repository
20+
### Setup
5121

22+
**1. Clone the repository:**
5223
```bash
5324
git clone <repository-url>
5425
cd github-toolkit
5526
```
5627

57-
### 2. Backend Setup
58-
28+
**2. Backend setup:**
5929
```bash
60-
# Install Python dependencies
6130
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
6834
python -m flask --app api/index run -p 5328
6935
```
7036

71-
### 3. Frontend Setup
72-
37+
**3. Frontend setup (new terminal):**
7338
```bash
74-
# Install dependencies
7539
yarn
76-
77-
# Run the development server
7840
yarn next-dev
7941
```
8042

81-
### 4. Access the Application
82-
43+
**4. Access the application:**
8344
- Frontend: http://localhost:3000
8445
- Backend API: http://localhost:5328
8546

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
11548

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
11751

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
12253

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:**
16555
```bash
166-
# Run both frontend and backend simultaneously
16756
yarn dev
16857
```
16958

170-
**Option 2: Manual Commands**
59+
Or run them separately:
17160
```bash
172-
# Terminal 1 - Backend
61+
# Terminal 1
17362
python -m flask --app api/index run -p 5328
17463

175-
# Terminal 2 - Frontend
64+
# Terminal 2
17665
yarn next-dev
17766
```
17867

179-
**Option 3: Individual Services**
68+
**Build for production:**
18069
```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
19270
yarn build
193-
194-
# Start production server
19571
yarn start
19672
```
19773

198-
## Customization
74+
## 📖 Learn More
19975

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)
20480

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
20982

210-
## Troubleshooting
83+
We welcome contributions! Please follow these steps:
21184

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
21390

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
21896

219-
## Contributing
97+
## 📄 License
22098

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.
226100

227-
## License
101+
---
228102

229-
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
103+
**Made with ❤️ by Vishwajeet Kondi**

api/config.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
import logging
22
import os
3+
from dotenv import load_dotenv
4+
5+
# Load environment variables from .env file
6+
load_dotenv()
37

48
# Configure logging
59
logging.basicConfig(level=logging.INFO)

0 commit comments

Comments
 (0)