Contributing Guide
Help improve rblx-user-info-fetcher by contributing code, documentation, or bug reports.
Setup
To contribute to this project, you'll need to set up a local development environment.
Prerequisites
- Node.js 18+ (for Cloudflare Workers development)
- Git
- A Cloudflare account (for testing Workers)
- Basic knowledge of JavaScript/TypeScript
Getting Started
Step 1: Fork and Clone
# Fork the repository on GitHub, then clone your fork
git clone https://github.com/YOUR_USERNAME/rbx-group-fetcher.git
cd rbx-group-fetcher
# Add the original repository as upstream
git remote add upstream https://github.com/IdkWhatAmIDoin/rbx-group-fetcher.git
Step 2: Install Dependencies
npm install
Step 3: Set Up Environment
# Copy example environment file (if exists)
cp .env.example .env
# Configure your Cloudflare Workers settings
# Add your Cloudflare account ID and API token
Step 4: Run Locally
# Start development server
npm run dev
# Or use Wrangler CLI directly
npx wrangler dev
Project Structure
src/– Main source codedocs/– Documentation filestests/– Test fileswrangler.toml– Cloudflare Workers configurationpackage.json– Dependencies and scripts
Pull Requests
Before submitting a pull request, please follow these guidelines:
Before You Start
Check existing issues and pull requests to avoid duplicates
Open an issue first for major changes to discuss the approach
Make sure your code follows the project's code style
Creating a Pull Request
1. Create a Branch
# Create a new branch from main
git checkout -b feature/your-feature-name
# or
git checkout -b fix/your-bug-fix
2. Make Your Changes
- Write clean, readable code
- Add comments for complex logic
- Update documentation if needed
- Test your changes thoroughly
3. Commit Your Changes
# Stage your changes
git add .
# Commit with a descriptive message
git commit -m "feat: add new feature description"
# or
git commit -m "fix: fix bug description"
Use conventional commit messages:
feat:– New featurefix:– Bug fixdocs:– Documentation changesstyle:– Code style changes (formatting)refactor:– Code refactoringtest:– Adding or updating tests
4. Push and Create PR
# Push to your fork
git push origin feature/your-feature-name
# Then create a pull request on GitHub
PR Description Template
When creating a pull request, include:
- Description – What changes you made and why
- Type – Feature, bug fix, documentation, etc.
- Testing – How you tested your changes
- Checklist – Confirm you've followed guidelines
Example PR Description:
## Description
Adds support for fetching user badges in the API response.
## Type
- [x] Feature
- [ ] Bug fix
- [ ] Documentation
- [ ] Refactor
## Testing
- Tested with multiple usernames
- Verified badges are returned correctly
- Checked error handling for users without badges
## Checklist
- [x] Code follows project style guidelines
- [x] Documentation updated
- [x] No breaking changes (or documented if needed)
- [x] Tests pass (if applicable)
Code Style
Please follow these coding standards to maintain consistency:
General Guidelines
- Use meaningful variable and function names
- Keep functions small and focused on a single task
- Add comments for complex logic or non-obvious code
- Remove commented-out code before committing
- Handle errors gracefully with proper error messages
JavaScript/TypeScript
- Use
constby default,letwhen reassignment is needed - Avoid
var - Use async/await instead of promises when possible
- Use template literals for string interpolation
- Follow existing code formatting (2 spaces, semicolons, etc.)
Error Handling
Always handle errors properly:
// Good
try {
const data = await fetchUserData(username);
return { success: true, data };
} catch (error) {
console.error('Error fetching user:', error);
return { success: false, error: error.message };
}
// Bad
const data = await fetchUserData(username); // No error handling
Documentation
- Update README.md if adding new features
- Add JSDoc comments for public functions
- Update API documentation if endpoints change
- Include examples in documentation when helpful
Example JSDoc Comment:
/**
* Fetches user information from Roblox API
* @param {string} username - Roblox username
* @param {Object} options - Optional parameters
* @param {boolean} options.includeAvatar - Include avatar URL
* @returns {Promise
Ways to Contribute
You don't need to write code to contribute! Here are other ways to help:
- Report bugs – Open issues with detailed bug reports
- Suggest features – Share your ideas for improvements
- Improve documentation – Fix typos, clarify instructions, add examples
- Answer questions – Help others in issues and discussions
- Write tests – Improve test coverage
- Review PRs – Help review and test pull requests
Thank you for contributing! 🙏
Every contribution, no matter how small, helps make this project better for everyone.