Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
@@ -1,18 +1,134 @@
|
|
1 |
---
|
2 |
title: GitHub Activity Feed
|
3 |
emoji: π
|
4 |
-
colorFrom:
|
5 |
-
colorTo:
|
6 |
-
sdk:
|
7 |
-
|
8 |
-
|
9 |
-
- streamlit
|
10 |
pinned: false
|
11 |
-
|
12 |
---
|
13 |
|
14 |
-
# GitHub Activity Feed
|
15 |
|
16 |
-
|
17 |
|
18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
title: GitHub Activity Feed
|
3 |
emoji: π
|
4 |
+
colorFrom: blue
|
5 |
+
colorTo: purple
|
6 |
+
sdk: streamlit
|
7 |
+
sdk_version: 1.28.1
|
8 |
+
app_file: main.py
|
|
|
9 |
pinned: false
|
10 |
+
license: mit
|
11 |
---
|
12 |
|
13 |
+
# π GitHub Activity Feed
|
14 |
|
15 |
+
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.
|
16 |
|
17 |
+
## β¨ What This App Does
|
18 |
+
|
19 |
+
- **π Real-time Dashboard**: Beautiful interface showing your GitHub activities
|
20 |
+
- **π€ Push Tracking**: Monitor code pushes to your repositories
|
21 |
+
- **π Pull Request Monitor**: Track PR submissions and merges
|
22 |
+
- **π Activity Statistics**: View daily and total activity counts
|
23 |
+
- **π¨ Modern UI**: Gradient cards, animations, and responsive design
|
24 |
+
- **π Auto-refresh**: Updates every 30 seconds automatically
|
25 |
+
|
26 |
+
## π― Perfect For
|
27 |
+
|
28 |
+
- **Developers** who want to monitor their repository activity
|
29 |
+
- **Teams** tracking project progress and contributions
|
30 |
+
- **Project Managers** overseeing development workflows
|
31 |
+
- **Open Source Maintainers** monitoring community contributions
|
32 |
+
|
33 |
+
## π How to Use
|
34 |
+
|
35 |
+
### Step 1: Set Up Your MongoDB Database
|
36 |
+
1. Create a free [MongoDB Atlas](https://www.mongodb.com/atlas) account
|
37 |
+
2. Create a new cluster and get your connection string
|
38 |
+
3. Add the connection string as `MONGODB_URI` in the Spaces secrets
|
39 |
+
|
40 |
+
### Step 2: Configure GitHub Webhook
|
41 |
+
1. Go to your GitHub repository β **Settings** β **Webhooks**
|
42 |
+
2. Click **Add webhook**
|
43 |
+
3. Set **Payload URL** to: `https://huggingface.co/spaces/YOUR_USERNAME/YOUR_SPACE_NAME/webhook`
|
44 |
+
4. Set **Content type** to: `application/json`
|
45 |
+
5. Select events: **Pushes** and **Pull requests**
|
46 |
+
6. Click **Add webhook**
|
47 |
+
|
48 |
+
### Step 3: Watch the Magic! β¨
|
49 |
+
- Push some code or create a pull request
|
50 |
+
- Visit your dashboard to see activities appear in real-time
|
51 |
+
- Enjoy the beautiful interface with statistics and activity cards
|
52 |
+
|
53 |
+
## π οΈ Technical Details
|
54 |
+
|
55 |
+
This Space runs two services simultaneously:
|
56 |
+
- **FastAPI Server** (Port 7861): Handles GitHub webhooks
|
57 |
+
- **Streamlit Dashboard** (Port 8501): Provides the user interface
|
58 |
+
|
59 |
+
### Features Include:
|
60 |
+
- **Modern Design**: Gradient backgrounds, smooth animations
|
61 |
+
- **Activity Icons**: Different icons for pushes, PRs, and merges
|
62 |
+
- **Statistics Cards**: Total events, daily activities, recent counts
|
63 |
+
- **Responsive Layout**: Works great on desktop and mobile
|
64 |
+
- **Error Handling**: Graceful handling of connection issues
|
65 |
+
- **Auto-refresh**: No need to manually refresh the page
|
66 |
+
|
67 |
+
## π§ Environment Variables
|
68 |
+
|
69 |
+
To run this Space, you need to configure:
|
70 |
+
|
71 |
+
| Variable | Description | Required |
|
72 |
+
|----------|-------------|----------|
|
73 |
+
| `MONGODB_URI` | Your MongoDB Atlas connection string | β
Yes |
|
74 |
+
|
75 |
+
### Setting Up Secrets in Hugging Face Spaces:
|
76 |
+
1. Go to your Space settings
|
77 |
+
2. Click on "Repository secrets"
|
78 |
+
3. Add `MONGODB_URI` with your MongoDB connection string
|
79 |
+
|
80 |
+
## π¨ Screenshots & Features
|
81 |
+
|
82 |
+
### Dashboard Overview
|
83 |
+
- Clean, modern interface with gradient design
|
84 |
+
- Real-time activity feed with beautiful cards
|
85 |
+
- Statistics overview showing key metrics
|
86 |
+
|
87 |
+
### Activity Types Supported
|
88 |
+
- **π€ Code Pushes**: When you push code to any branch
|
89 |
+
- **π Pull Requests**: When PRs are opened or updated
|
90 |
+
- **β
Merges**: When branches are successfully merged
|
91 |
+
|
92 |
+
### Visual Design Elements
|
93 |
+
- **Gradient Cards**: Beautiful purple-to-blue gradient backgrounds
|
94 |
+
- **Activity Icons**: Contextual icons for different event types
|
95 |
+
- **Smooth Animations**: Hover effects and transitions
|
96 |
+
- **Statistics Dashboard**: Clean metrics display
|
97 |
+
- **Responsive Design**: Looks great on any screen size
|
98 |
+
|
99 |
+
## π Related Links
|
100 |
+
|
101 |
+
- **Source Code**: [GitHub Repository](https://github.com/Ujwal-5/webhook-repo)
|
102 |
+
- **MongoDB Atlas**: [Get Free Database](https://www.mongodb.com/atlas)
|
103 |
+
- **GitHub Webhooks**: [Documentation](https://docs.github.com/en/developers/webhooks-and-events/webhooks)
|
104 |
+
|
105 |
+
|
106 |
+
## πββοΈ Support
|
107 |
+
|
108 |
+
Having issues? Here are some common solutions:
|
109 |
+
|
110 |
+
**Database Connection Issues:**
|
111 |
+
- Verify your MongoDB URI is correct
|
112 |
+
- Check if your IP is whitelisted in MongoDB Atlas
|
113 |
+
- Ensure your database user has read/write permissions
|
114 |
+
|
115 |
+
**Webhook Not Working:**
|
116 |
+
- Double-check the webhook URL in your GitHub repository
|
117 |
+
- Verify the webhook is set to send JSON payloads
|
118 |
+
- Check that events are selected (Pushes and Pull requests)
|
119 |
+
|
120 |
+
**No Activities Showing:**
|
121 |
+
- Make sure you've pushed code or created PRs after setting up the webhook
|
122 |
+
- Check the webhook delivery logs in your GitHub repository settings
|
123 |
+
- Verify your MongoDB database is accessible
|
124 |
+
|
125 |
+
---
|
126 |
+
|
127 |
+
## π Try It Now!
|
128 |
+
|
129 |
+
1. **Duplicate this Space** to get your own copy
|
130 |
+
2. **Add your MongoDB URI** in the secrets
|
131 |
+
3. **Set up your GitHub webhook**
|
132 |
+
4. **Start monitoring your repository activities!**
|
133 |
+
|
134 |
+
Enjoy tracking your development workflow with this beautiful dashboard! πβ¨
|