ujwal55 commited on
Commit
78b67b8
Β·
verified Β·
1 Parent(s): 1fcc153

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +126 -10
README.md CHANGED
@@ -1,18 +1,134 @@
1
  ---
2
  title: GitHub Activity Feed
3
  emoji: πŸš€
4
- colorFrom: red
5
- colorTo: red
6
- sdk: docker
7
- app_port: 8501
8
- tags:
9
- - streamlit
10
  pinned: false
11
- short_description: The UI will keep pulling data from MongoDB every 15 seconds
12
  ---
13
 
14
- # GitHub Activity Feed πŸš€
15
 
16
- This app shows real-time GitHub events (Push, PR, Merge) using Streamlit and MongoDB.
17
 
18
- Edit `app.py` to customize the UI. The webhook endpoint can be added using FastAPI or Flask on a secondary port.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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! πŸš€βœ¨