A web application that displays a timeline of your GitHub activity, showing repositories you've worked on over the past few weeks. It provides a backward-looking review of your contribution activity including commits, pull requests, issues, and reviews.
- Timeline View: Shows your GitHub activity in a reverse chronological timeline
- 6-Month Commits View: Displays commits from the last 6 months grouped by repository with pagination
- Project Blog View: Blog-style listing of recent projects with PR comments for context
- Activity Types: Displays commits, pull requests, issues, reviews, and other repository activities
- PR Comments: Shows the last 4-5 pull request comments for each active repository
- Repository Links: Click on repository names to navigate to the GitHub repository
- Real-time Refresh: Fetch the latest activity data with the refresh button
- GitHub-like UI: Dark theme interface resembling GitHub's contribution graph
- 3-Tier Architecture: Go backend, SQLite database, and HTML/CSS/JS frontend
- Go 1.21 or later
- Git
-
Clone the repository:
git clone https://github.com/kristofer/RecentRepos.git cd RecentRepos -
Install dependencies:
go mod tidy
-
Build the application:
go build -o recentrepos .
GITHUB_TOKEN(optional): Your GitHub personal access token for API accessGITHUB_USERNAME(optional): Your GitHub username (defaults to "kristofer")PORT(optional): Port to run the server on (defaults to 8080)
For real GitHub data, create a personal access token:
- Go to GitHub Settings → Developer settings → Personal access tokens
- Generate a new token with
repoanduserscopes - Set the environment variable:
export GITHUB_TOKEN=your_token_here export GITHUB_USERNAME=your_username
./recentreposThen open your browser to http://localhost:8080
- Presentation Tier: HTML/CSS/JavaScript frontend served by the Go web server
- Logic Tier: Go web server with REST API endpoints and GitHub API integration
- Data Tier: SQLite3 database for storing and caching activity data
GET /- Main application pageGET /api/activity- Fetch stored activity data (last 100 items)GET /api/commits?page=N&limit=M- Fetch 6-month commit history grouped by repository with paginationGET /api/projects- Fetch project blog view with PR commentsPOST /api/refresh- Refresh activity data from GitHub APIGET /api/status- Application status and configurationGET /static/*- Static assets (CSS, JS)
- Start the application
- Open
http://localhost:8080in your browser - Click "Refresh Activity" to fetch your GitHub activity
- Browse your timeline using three different views:
- Recent Events: See all activity types in chronological order
- 6-Month Commits: View commits grouped by repository from the last 6 months
- Project Blog: See a blog-style view with recent projects and their PR comments
The application will show sample data if no GitHub token is configured, or fetch real data from the GitHub API if properly configured.
.
├── main.go # Main application and web server
├── github.go # GitHub API integration service
├── go.mod # Go module dependencies
├── static/ # Frontend assets
│ ├── index.html # Main application page
│ ├── style.css # Styling with GitHub-like theme
│ └── script.js # Frontend JavaScript application
└── activity.db # SQLite database (created automatically)
The application uses SQLite with two tables:
github_activity table:
CREATE TABLE github_activity (
id INTEGER PRIMARY KEY AUTOINCREMENT,
date TEXT NOT NULL,
repository TEXT NOT NULL,
activity_type TEXT NOT NULL,
count INTEGER DEFAULT 1,
url TEXT,
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
);pr_comments table:
CREATE TABLE pr_comments (
id INTEGER PRIMARY KEY AUTOINCREMENT,
repository TEXT NOT NULL,
pr_number INTEGER NOT NULL,
pr_title TEXT NOT NULL,
author TEXT NOT NULL,
body TEXT,
created_at TEXT NOT NULL,
pr_url TEXT,
comment_url TEXT,
fetched_at DATETIME DEFAULT CURRENT_TIMESTAMP
);Both tables include indexes for optimal query performance.
MIT License - see LICENSE file for details
