Skip to content

Commit 7b48f73

Browse files
authored
docs(readme): improve onboarding, FAQ, and structure (JhaSourav07#755)
* docs(readme): improve onboarding, FAQ, and structure Signed-off-by: @Hima451 <himanishah123450@gmail.com> * fix: resolve lint and CI issues --------- Signed-off-by: @Hima451 <himanishah123450@gmail.com>
1 parent b377502 commit 7b48f73

2 files changed

Lines changed: 111 additions & 0 deletions

File tree

CONTRIBUTING.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,59 @@ http://localhost:3000/api/streak?user=YOUR_GITHUB_USERNAME
8888
8989
---
9090

91+
## 🤝 Contributor Onboarding
92+
93+
### 📁 Project Structure
94+
95+
```text
96+
app/api/streak/route.ts → API route for SVG generation
97+
lib/github.ts → GitHub GraphQL API client
98+
lib/calculate.ts → Streak calculation logic
99+
lib/svg/generator.ts → SVG rendering engine
100+
lib/svg/themes.ts → Theme configuration system
101+
utils/time.ts → UTC & timezone utilities
102+
types/index.ts → Shared TypeScript interfaces
103+
```
104+
105+
---
106+
107+
### ⚠️ Local Setup Troubleshooting
108+
109+
Common issues during setup:
110+
111+
- **401 Unauthorized** → Invalid or missing `GITHUB_TOKEN`
112+
- **MongoDB errors**`MONGODB_URI` is optional for local development
113+
- **Empty SVG output** → Ensure the GitHub username exists and has public contributions
114+
115+
---
116+
117+
### 🌱 Beginner-Friendly Contribution Areas
118+
119+
Good first contributions:
120+
121+
- Documentation improvements
122+
- New theme presets
123+
- SVG styling enhancements
124+
- UI polish and accessibility improvements
125+
126+
---
127+
128+
### 🔁 Simplified PR Workflow
129+
130+
```text
131+
Fork Repository
132+
133+
Create Branch
134+
135+
Make Changes
136+
137+
Run Tests & Lint
138+
139+
Open Pull Request
140+
```
141+
142+
---
143+
91144
## 🎯 What to Contribute
92145

93146
We welcome contributions in three focused pillars. Staying within these areas ensures every PR adds clear, compounding value.

README.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,20 @@ URL Parameter > Theme Default > System Fallback
177177

178178
> **`auto` uses CSS `@media (prefers-color-scheme)`** inside the SVG so the badge switches between the `light` and `dark` palettes based on the viewer's OS setting — no JavaScript required. This is ideal for GitHub profile READMEs where visitors may use either mode.
179179
180+
## 🎨 Theme Preview Gallery
181+
182+
Explore some of the built-in CommitPulse themes and quickly copy the style you like.
183+
184+
| Theme | Usage Example |
185+
| ------- | ---------------- |
186+
| Dark | `?theme=dark` |
187+
| Neon | `?theme=neon` |
188+
| Dracula | `?theme=dracula` |
189+
| Gruvbox | `?theme=gruvbox` |
190+
| GitHub | `?theme=github` |
191+
192+
![](https://commitpulse.vercel.app/api/streak?user=jhasourav07&theme=neon)
193+
180194
### Examples
181195

182196
```md
@@ -308,6 +322,23 @@ types/index.ts → TypeScript interfaces (StreakStats, BadgePara
308322

309323
---
310324

325+
🏗️ Architecture Diagram
326+
GitHub GraphQL API
327+
328+
Contribution Processing
329+
330+
Streak Calculation Engine
331+
332+
SVG Geometry Renderer
333+
334+
Animation Layer
335+
336+
Edge Cache/CDN
337+
338+
Generated SVG Badge
339+
340+
---
341+
311342
## 🚀 Self-Hosting in 4 Steps
312343

313344
```bash
@@ -378,6 +409,33 @@ This ensures maintainers aren't bottlenecks and the community moves incredibly f
378409

379410
---
380411

412+
## ❓ FAQ
413+
414+
### Why does my contribution count differ from GitHub?
415+
416+
GitHub calculates contribution data using UTC timestamps. CommitPulse syncs cache invalidation with UTC midnight to ensure consistent results.
417+
418+
### Why are my latest commits not visible immediately?
419+
420+
Data is cached for performance. Use `&refresh=true` to force fresh data.
421+
422+
### Can I use my local timezone?
423+
424+
Yes. Use the `tz` parameter with any valid IANA timezone.
425+
426+
Example:
427+
`?tz=Asia/Kolkata`
428+
429+
### Do private contributions count?
430+
431+
Yes — if private contributions visibility is enabled in your GitHub settings.
432+
433+
### Are there GitHub API rate limits?
434+
435+
Yes, but CommitPulse minimizes API usage using caching and optimized GraphQL queries.
436+
437+
---
438+
381439
## 🤝 Contributing
382440

383441
CommitPulse is an open project built for the Web3 and open-source community. Whether you want to design a new theme, refine the isometric geometry, or improve timezone edge cases — you are welcome here.

0 commit comments

Comments
 (0)