Secure GitHub Actions-powered project analytics with triple storage modes.
Track project usage, downloads, API calls, or any events through simple webhook pings. Choose from GitHub Variables, Database, or Repository storage based on your needs.
# Fork this repository on GitHub, then:
git clone https://github.com/YOUR_USERNAME/ActionsCounter.git
cd ActionsCounterRequired scopes:
- β
repo- Full repository access - β
workflow- Update workflows and trigger actions - β
admin:repo_hook- Repository webhook access - β
read:org- Read organization data
Replace {YOUR_USERNAME} with your GitHub username, then add:
ADMIN_PASSWORD = your_secure_password
PAT_TOKEN = your_personal_access_token_from_step_2
STORAGE_MODE = 1
Storage Options:
1= GitHub Variables (48KB, fast, recommended)2= Database (unlimited, requires PostgreSQL setup)3= Repository Commits (unlimited, creates git commits)
Edit frontend/src/main.ts:
const REPO_OWNER = "YOUR_USERNAME";
const REPO_NAME = "ActionsCounter";Set source to: Deploy from main branch
- Click "Run workflow"
- Action:
stats - Click "Run workflow" again
Replace {YOUR_USERNAME} with your actual GitHub username in all URLs above.
- Actions tab β Handle Projects (Dual Mode)
- Choose action (
increment,add,list, etc.) - Enter project name and password
- Run workflow
curl -X POST \
-H "Authorization: token YOUR_PAT_TOKEN" \
-H "Accept: application/vnd.github.v3+json" \
-H "Content-Type: application/json" \
https://api.github.com/repos/YOUR_USERNAME/ActionsCounter/dispatches \
-d '{
"event_type": "increment",
"client_payload": {
"project_name": "my-project"
}
}'β Secure: No admin password in request - uses repository secrets automatically!
increment- Add 1 to project countdecrement- Subtract 1 from project countadd- Create new projectremove- Delete projectset- Set specific count valueget- View project detailslist- Show all projectsstats- Display analytics
| Mode | Best For | Capacity | Speed | Setup |
|---|---|---|---|---|
| GitHub Variables | Most projects | 48KB | Very Fast | 5 min |
| Database | High volume | Unlimited | Fast | 15 min |
| Repository Commits | Demos/audit | Unlimited | Slow | 10 min |
Recommended: Start with GitHub Variables (mode 1), upgrade to Database (mode 2) if you need more capacity.
- Password Protection: All operations require admin password
- Repository Secrets: Sensitive data stored securely in GitHub
- Token Validation: GitHub token authentication
- No Browser Storage: Zero sensitive data in localStorage
- π Complete Documentation - Comprehensive guides and references
- π Fork Setup Guide - Fork-specific setup instructions
- π― Usage Examples - Detailed usage examples and patterns
- π GitHub Token Scopes - Required Token permissions
- β‘ Quick Setup - Detailed setup walkthrough
- π API Reference - All actions and webhook examples
- ποΈ Storage Modes - Choose the right storage mode
For Database mode, add these secrets:
DB_HOST = your_postgres_host
DB_NAME = your_database_name
DB_PORT = 5432
DB_USER = your_username
DB_PASS = your_password
DB_SCHEMA = myschema
Free PostgreSQL Providers:
- Download Tracking: Monitor software/file downloads
- API Analytics: Track API endpoint usage
- Website Metrics: Count page views and interactions
- Project Usage: Monitor tool/library adoption
- Event Tracking: Log application events
- π Complete Setup Guide - Comprehensive documentation
- β FAQ - Quick answers to common questions
- π οΈ Troubleshooting - Step-by-step problem solving
- π¬ GitHub Discussions - Ask questions, share ideas
- π Report Bug - Found an issue? Let us know
- β¨ Request Feature - Suggest new features
- π Support Guide - Comprehensive support information
- π€ Contributing Guide - How to contribute to the project
- π₯ Contributors - Meet our amazing contributors
Quick Help:
- "Invalid password" error: Check
ADMIN_PASSWORDsecret is set correctly - Analytics not showing: Run any action to generate initial data & verify GitHub Pages is enabled
- Need immediate help? Check our FAQ first!
Apache 2.0 License - see LICENSE.md
π Ready to start tracking? Fork this repo and follow the Quick Start guide above!