Spaces:
Sleeping
Sleeping
A newer version of the Streamlit SDK is available:
1.48.1
metadata
title: GitHub Activity Feed
emoji: π
colorFrom: blue
colorTo: purple
sdk: streamlit
sdk_version: 1.28.1
app_file: main.py
pinned: false
license: mit
π GitHub Activity Feed
A beautiful real-time dashboard to monitor your GitHub repository activities! This app combines FastAPI for webhook handling with Streamlit for an elegant user interface.
β¨ What This App Does
- π Real-time Dashboard: Beautiful interface showing your GitHub activities
- π€ Push Tracking: Monitor code pushes to your repositories
- π Pull Request Monitor: Track PR submissions and merges
- π Activity Statistics: View daily and total activity counts
- π¨ Modern UI: Gradient cards, animations, and responsive design
- π Auto-refresh: Updates every 30 seconds automatically
π― Perfect For
- Developers who want to monitor their repository activity
- Teams tracking project progress and contributions
- Project Managers overseeing development workflows
- Open Source Maintainers monitoring community contributions
π How to Use
Step 1: Set Up Your MongoDB Database
- Create a free MongoDB Atlas account
- Create a new cluster and get your connection string
- Add the connection string as
MONGODB_URI
in the Spaces secrets
Step 2: Configure GitHub Webhook
- Go to your GitHub repository β Settings β Webhooks
- Click Add webhook
- Set Payload URL to:
https://huggingface.co/spaces/YOUR_USERNAME/YOUR_SPACE_NAME/webhook
- Set Content type to:
application/json
- Select events: Pushes and Pull requests
- Click Add webhook
Step 3: Watch the Magic! β¨
- Push some code or create a pull request
- Visit your dashboard to see activities appear in real-time
- Enjoy the beautiful interface with statistics and activity cards
π οΈ Technical Details
This Space runs two services simultaneously:
- FastAPI Server (Port 7861): Handles GitHub webhooks
- Streamlit Dashboard (Port 8501): Provides the user interface
Features Include:
- Modern Design: Gradient backgrounds, smooth animations
- Activity Icons: Different icons for pushes, PRs, and merges
- Statistics Cards: Total events, daily activities, recent counts
- Responsive Layout: Works great on desktop and mobile
- Error Handling: Graceful handling of connection issues
- Auto-refresh: No need to manually refresh the page
π§ Environment Variables
To run this Space, you need to configure:
Variable | Description | Required |
---|---|---|
MONGODB_URI |
Your MongoDB Atlas connection string | β Yes |
Setting Up Secrets in Hugging Face Spaces:
- Go to your Space settings
- Click on "Repository secrets"
- Add
MONGODB_URI
with your MongoDB connection string
π¨ Screenshots & Features
Dashboard Overview
- Clean, modern interface with gradient design
- Real-time activity feed with beautiful cards
- Statistics overview showing key metrics
Activity Types Supported
- π€ Code Pushes: When you push code to any branch
- π Pull Requests: When PRs are opened or updated
- β Merges: When branches are successfully merged
Visual Design Elements
- Gradient Cards: Beautiful purple-to-blue gradient backgrounds
- Activity Icons: Contextual icons for different event types
- Smooth Animations: Hover effects and transitions
- Statistics Dashboard: Clean metrics display
- Responsive Design: Looks great on any screen size
π Related Links
- Source Code: GitHub Repository
- MongoDB Atlas: Get Free Database
- GitHub Webhooks: Documentation
πββοΈ Support
Having issues? Here are some common solutions:
Database Connection Issues:
- Verify your MongoDB URI is correct
- Check if your IP is whitelisted in MongoDB Atlas
- Ensure your database user has read/write permissions
Webhook Not Working:
- Double-check the webhook URL in your GitHub repository
- Verify the webhook is set to send JSON payloads
- Check that events are selected (Pushes and Pull requests)
No Activities Showing:
- Make sure you've pushed code or created PRs after setting up the webhook
- Check the webhook delivery logs in your GitHub repository settings
- Verify your MongoDB database is accessible
π Try It Now!
- Duplicate this Space to get your own copy
- Add your MongoDB URI in the secrets
- Set up your GitHub webhook
- Start monitoring your repository activities!
Enjoy tracking your development workflow with this beautiful dashboard! πβ¨