Thank you for considering contributing to CommitGoblin! This document outlines how to set up the project, submit improvements, and follow best practices.
- Node.js 18+
- npm or yarn
- A Discord bot token
- A test Discord server for development
- (Optional) SQLite/Postgres if working on DB features
git clone https://github.com/<your-org>/commitgoblin.git
cd commitgoblinnpm installDISCORD_TOKEN=your-bot-token-here
COMMITGOBLIN_CHANNEL_ID=optional-channel-id
node index.jscommitgoblin/
│
├── index.js # Main bot logic
├── data.json # Persistent storage (temporary)
├── assets/ # Images, icons, etc.
├── docs/ # Documentation files (README, IDEA, VISION)
└── package.json
- Keep code modular and readable
- Write pure functions when possible
- Avoid hardcoding values (use config)
- Preserve backward compatibility
- Use async/await consistently
- Validate user input to avoid crashes
- Test commands on a private server before pushing
Use clear, descriptive commit messages:
feat: add team leaderboard
fix: resolve role expiration bug
refactor: move shop logic into module
docs: update README with new commands
Before starting work on large features:
- Open an issue describing your idea
- Wait for discussion/approval
- Follow the project architecture
- Submit a pull request (PR)
- Clear description of your change
- Testing steps
- Updated docs (if applicable)
While CommitGoblin currently has a single-file structure, contributors should progressively move toward:
- Smaller modules
- Clear separation of concerns
- Data helper functions
- Command objects / handler patterns
We aim for readability and maintainability over clever one-liners.
- Never hardcode tokens
- Validate role permissions
- Sanitize user input
- Do not allow untrusted file writes
- Avoid dangerous permissions (like Administrator)
Recommended workflow:
-
Run the bot locally
-
Use a separate Discord “dev bot”
-
Test on a private test server
-
Verify:
- Correct ephemeral/public behavior
- Error handling
- Role assignment
- Leaderboard accuracy
- Data persistence
For questions or ideas:
- Open a GitHub issue
- Contact maintainers on Discord
- Join the discussion thread under
#dev-tools
We’re happy to help you get started contributing!
CommitGoblin grows through community input — both technical and creative. Your ideas, code, and improvements directly shape the learning experience of many students.
Let’s build something meaningful together.