Skip to content

Commit 8e72aed

Browse files
committed
✨ Create New GitHub stats dashboard with user statistics and customizable SVG cards
- Implement GitHubClient to fetch user stats including stars, commits, PRs, and issues. - Create index.ts for the Express server to serve the dashboard and handle API requests. - Add themes for card customization in themes.ts. - Define types for GitHub stats and card options in types.ts. - Configure TypeScript settings in tsconfig.json.
0 parents  commit 8e72aed

File tree

18 files changed

+3725
-0
lines changed

18 files changed

+3725
-0
lines changed

.env.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
GITHUB_TOKEN=your_github_personal_access_token_here
2+
PORT=3000

.github/workflows/waka.yaml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# name: Daily Workflow
2+
3+
# on:
4+
# schedule:
5+
# - cron: '* */6 * * *'
6+
# push:
7+
# branches:
8+
# - main
9+
10+
# permissions:
11+
# contents: write
12+
13+
# jobs:
14+
# run-script:
15+
# runs-on: ubuntu-latest
16+
17+
# steps:
18+
# - name: Checkout repository
19+
# uses: actions/checkout@v2
20+
# with:
21+
# ref: main
22+
23+
# - name: Set up Python
24+
# uses: actions/setup-python@v2
25+
# with:
26+
# python-version: '3.x'
27+
28+
# - name: Install dependencies
29+
# run: |
30+
# cp .env.example .env
31+
# echo "GITHUB_TOKEN=${{ secrets.GH_TOKEN }}" >> .env
32+
# echo "WAKA_TOKEN=${{ secrets.WAKA_KEY }}" >> .env
33+
# cat .env
34+
# # pip install -r requirements.txt
35+
# # pip install python-dotenv
36+
37+
# - name: Load environment variables
38+
# run: |
39+
# echo "Loading environment variables from .env"
40+
# set -o allexport; source .env; set +o allexport
41+
42+
# - name: Run main.py
43+
# run: python src/main.py
44+
45+
# - name: Commit and push changes
46+
# run: |
47+
# git config --global user.name 'pphatdev'
48+
# git config --global user.email 'pphat.kits@gmail.com'
49+
# git add .
50+
# git commit -m "Runs every 5 minutes, between 08:00 and 12:59. Actions schedules run at most every 5 minutes using UTC time. $(date +'%Y-%m-%d %H:%M:%S')" || echo "No changes to commit"
51+
# git push
52+
53+

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules/
2+
dist/
3+
.env
4+
*.log
5+
.DS_Store

.vscode/launch.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"type": "node",
6+
"request": "launch",
7+
"name": "Debug TypeScript",
8+
"preLaunchTask": "npm: build",
9+
"program": "${workspaceFolder}/dist/index.js",
10+
"cwd": "${workspaceFolder}",
11+
"outFiles": ["${workspaceFolder}/dist/**/*.js"],
12+
"envFile": "${workspaceFolder}/.env"
13+
},
14+
{
15+
"type": "node",
16+
"request": "launch",
17+
"name": "Debug with ts-node",
18+
"runtimeArgs": ["-r", "ts-node/register"],
19+
"args": ["${workspaceFolder}/src/index.ts"],
20+
"cwd": "${workspaceFolder}",
21+
"envFile": "${workspaceFolder}/.env"
22+
}
23+
]
24+
}

CODE_OF_CONDUCT.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity
10+
and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to a positive environment:
15+
16+
* Using welcoming and inclusive language
17+
* Being respectful of differing viewpoints and experiences
18+
* Gracefully accepting constructive criticism
19+
* Focusing on what is best for the community
20+
* Showing empathy towards other community members
21+
22+
Examples of unacceptable behavior:
23+
24+
* The use of sexualized language or imagery
25+
* Trolling, insulting/derogatory comments, and personal or political attacks
26+
* Public or private harassment
27+
* Publishing others' private information without explicit permission
28+
* Other conduct which could reasonably be considered inappropriate
29+
30+
## Enforcement
31+
32+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
33+
reported to the community leaders responsible for enforcement.
34+
35+
All complaints will be reviewed and investigated promptly and fairly.
36+
37+
## Attribution
38+
39+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
40+
version 2.0, available at
41+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
42+
43+
[homepage]: https://www.contributor-covenant.org

CONTRIBUTING.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Contributing to GitHub Stats
2+
3+
Thank you for your interest in contributing to GitHub Stats! 🎉
4+
5+
## How to Contribute
6+
7+
### Reporting Bugs
8+
9+
If you find a bug, please create an issue with:
10+
- A clear title and description
11+
- Steps to reproduce the issue
12+
- Expected behavior
13+
- Actual behavior
14+
- Screenshots (if applicable)
15+
16+
### Suggesting Features
17+
18+
We welcome feature suggestions! Please create an issue with:
19+
- A clear title and description
20+
- Use case and benefits
21+
- Example implementation (if you have ideas)
22+
23+
### Pull Requests
24+
25+
1. Fork the repository
26+
2. Create a new branch (`git checkout -b feature/your-feature`)
27+
3. Make your changes
28+
4. Ensure code follows the existing style
29+
5. Test your changes
30+
6. Commit with clear messages (`git commit -m 'Add: feature description'`)
31+
7. Push to your branch (`git push origin feature/your-feature`)
32+
8. Open a Pull Request
33+
34+
### Adding New Themes
35+
36+
To add a new theme:
37+
38+
1. Edit `src/themes.ts`
39+
2. Test the theme with `?theme=yourtheme`
40+
3. Submit a PR with a screenshot
41+
42+
## Development Setup
43+
44+
```bash
45+
# Install dependencies
46+
npm install
47+
48+
# Run in development mode
49+
npm run dev
50+
51+
# Build
52+
npm run build
53+
54+
# Run production build
55+
npm start
56+
```
57+
58+
## Code Style
59+
60+
- Use TypeScript
61+
- Follow existing naming conventions
62+
- Add comments for complex logic
63+
- Keep functions focused and small
64+
65+
## Questions?
66+
67+
Feel free to open an issue for any questions!
68+
69+
Thank you for contributing! 🙌

0 commit comments

Comments
 (0)