A full-stack web application that generates comprehensive weekly activity reports from GitHub. The application fetches user activity, commits, pull requests, and repository data, then uses AI-powered summarization to create readable weekly summaries.
- Weekly Activity Tracking: View your GitHub activity for any date range
- User Reports: Generate detailed reports for any GitHub user
- Repository Filtering: Filter activities by specific repositories
- Activity Type Filtering: Filter by commits, pull requests, or all activities
- AI-Powered Summarization: Automatically summarize commit messages and pull request descriptions using Hugging Face's Pegasus model
- Multiple Display Modes: Switch between "My Activity" and "User Report" modes
- Date Range Selection: Customize the time period for activity reports
- Responsive UI: Modern, clean interface built with Tailwind CSS
- React 18 - UI library
- TypeScript - Type safety
- Vite - Build tool and dev server
- Tailwind CSS - Styling
- Lucide React - Icons
- Express.js - Web server
- TypeScript - Type safety
- Node.js - Runtime
- GitHub API - Fetch user activity and repository data
- Hugging Face Inference API - AI-powered text summarization
- Node.js (v18 or higher)
- npm or yarn
- GitHub Personal Access Token
- (Optional) Hugging Face API Key for AI summarization
Create a .env file in the root directory with the following variables:
# Required
GITHUB_TOKEN=your_github_personal_access_token
# Optional - for AI summarization
HUGGINGFACE_API_KEY=your_huggingface_api_key
# Optional - server port (defaults to 3001)
PORT=3001- Go to GitHub Settings → Developer settings → Personal access tokens → Tokens (classic)
- Click "Generate new token (classic)"
- Select scopes:
repo,read:user,read:org(if needed) - Copy the token and add it to your
.envfile
- Sign up at Hugging Face
- Go to Settings → Access Tokens
- Create a new token
- Add it to your
.envfile
- Clone the repository:
git clone <repository-url>
cd githubsummary- Install dependencies:
npm install- Create a
.envfile with your environment variables (see above)
Run both the frontend and backend servers concurrently:
npm run devThis will start:
- Frontend:
http://localhost:5173(Vite dev server) - Backend:
http://localhost:3001(Express server)
You can also run them separately:
# Frontend only
npm run dev:client
# Backend only
npm run dev:serverBuild the application for production:
npm run buildThis will:
- Compile TypeScript
- Build the frontend with Vite
- Output to
dist/directory
Preview the production build locally:
npm run previewRun ESLint to check code quality:
npm run lintgithubsummary/
├── src/ # Frontend source code
│ ├── components/ # React components
│ │ ├── ActivityTypeFilter.tsx
│ │ ├── CommitItem.tsx
│ │ ├── DateRangeInput.tsx
│ │ ├── DisplayFilter.tsx
│ │ ├── EmptyState.tsx
│ │ ├── ErrorState.tsx
│ │ ├── FetchForm.tsx
│ │ ├── LoadingState.tsx
│ │ ├── ModeToggle.tsx
│ │ ├── PullRequestItem.tsx
│ │ ├── ReportHeader.tsx
│ │ ├── RepoSearch.tsx
│ │ ├── RepositoryCard.tsx
│ │ ├── RepositoryList.tsx
│ │ ├── StatsCard.tsx
│ │ ├── SummaryCard.tsx
│ │ ├── UserCard.tsx
│ │ ├── UsernameInput.tsx
│ │ └── summary.tsx # Main summary component
│ ├── services/ # API service functions
│ │ └── github.ts
│ ├── types/ # TypeScript type definitions
│ │ ├── github.ts
│ │ └── summary.ts
│ ├── utils/ # Utility functions
│ │ └── github.ts
│ ├── App.tsx # Main App component
│ ├── main.tsx # Entry point
│ ├── index.css # Global styles
│ └── constant.ts # Constants
├── server/ # Backend source code
│ ├── controllers/ # Request handlers
│ │ └── githubController.ts
│ ├── models/ # Data models
│ │ └── github.ts
│ ├── routes/ # API routes
│ │ └── github.ts
│ ├── services/ # Business logic
│ │ ├── githubService.ts
│ │ └── huggingFaceService.ts
│ └── index.ts # Server entry point
├── package.json
├── tsconfig.json # TypeScript config for frontend
├── tsconfig.server.json # TypeScript config for backend
├── vite.config.ts # Vite configuration
└── tailwind.config.js # Tailwind CSS configuration
GET /health- Server health status
GET /api/github/user- Get authenticated user informationGET /api/github/user/events- Get authenticated user's eventsGET /api/github/repos/:owner/:repo/commits- Get commits for a repositoryGET /api/github/repos/:owner/:repo/pulls- Get pull requests for a repositoryGET /api/github/weekly-activity- Get weekly activity for authenticated user- Query params:
repoName,activityType,startDate,endDate
- Query params:
GET /api/github/users/:username/weekly-report- Get weekly report for a user- Query params:
startDate,endDate
- Query params:
GET /api/github/users/:username/pull-request-messages- Get PR messages for a userGET /api/github/users/:username/commit-messages- Get commit messages for a userGET /api/github/users/:username/summarize- Get AI summary for a user's activity- Query params:
startDate,endDate
- Query params:
POST /api/github/summarize- Generate AI summary from provided data- Body:
{ text: string }
- Body:
- Start the development servers with
npm run dev - Open
http://localhost:5173in your browser - Choose between "My Activity" or "User Report" mode
- For "My Activity": Optionally filter by repository, activity type, and date range
- For "User Report": Enter a GitHub username and optionally set date range
- Click "Fetch Activity" to retrieve and display the data
- Use "Generate AI Summary" to create an AI-powered summary of the activity
This project is private and proprietary.