- Initialize Git repository with main branch - Create .gitignore for web application (Node.js) - Setup docs/ directory for project documentation - Add README.md with project overview and setup instructions - Add CONTRIBUTING.md with contribution guidelines - Add LICENSE with MIT license text - Configure pre-push hooks for code quality checks BREAKING CHANGE: Repository structure established for team collaboration
4.4 KiB
Contributing to newzy
First off, thank you for considering contributing to newzy! It's people like you that make newzy such a great tool.
Table of Contents
Code of Conduct
This project and everyone participating in it is expected to abide by the following code of conduct:
- Be respectful and considerate
- Focus on what is best for the community
- Accept constructive criticism gracefully
Please read our Code of Conduct before contributing.
How Can I Contribute?
Reporting Bugs
Before creating bug reports, please check existing issues to avoid duplicates. When you are creating a bug report, please include as many details as possible:
- Use a clear and descriptive title
- Describe the exact steps to reproduce the bug
- Provide specific examples to demonstrate the steps (include links to files or projects that demonstrate the issue)
- Describe the behavior you observed after following the steps
- Describe the behavior you expected after following the steps
Suggesting Enhancements
Enhancement suggestions are tracked as GitHub issues. Create an issue and clearly describe:
- Is your feature request related to a problem? Please describe it.
- Describe the solution you'd like
- Describe alternatives you've considered
- Provide additional context (e.g., motivation for this feature)
Pull Requests
- Fork the repo and create your branch from
develop. - If you've added code that should be tested, add tests.
- Ensure the test suite passes.
- Update documentation if needed.
- Make sure your code lints.
- Issue that pull request!
Pull Request Guidelines: Use one of the following prefixes to categorize your PR:
feat:- A new featurefix:- A bug fixdocs:- Documentation changesstyle:- Formatting, missing semicolons, etc; no code changerefactor:- Code change that neither fixes a bug nor adds a featureperf:- A code change that improves performancetest:- Adding missing testschore:- Changes to the build process or auxiliary tools
Development Setup
Requirements
- Node.js (v18+)
- npm or yarn
Installation
git clone https://github.com/daniel/newzy.git
cd newzy
npm install
cp .env.example .env
# Edit .env with your configuration
npm run dev
Coding Standards
We use modern JavaScript (ES6+). Follow these guidelines:
- Use consistent indentation (2 spaces)
- Single quotes instead of double quotes (unless using template literals)
- Semicolons at the end of each statement
- No trailing whitespace
- One function per file when possible
- Meaningful variable and function names
Example:
// Good
const users = getUserData();
if (users.length > 0) {
return users[0];
}
// Bad
const user = get_data();
if(user.length > 0){
return user[0]
}
Git Workflow
Branching Strategy
We follow a GitFlow-inspired workflow:
main- Production-ready codedevelop- Integration branch for feature developmentfeature/*- New features and enhancements (branch from develop)bugfix/*- Bug fixes from develophotfix/*- Critical fixes from main
Making a Commit
When making commits, use the following format:
<type>(<scope>): <subject>
<body>
<footer>
Types:
feat:- A new featurefix:- A bug fixdocs:- Documentation changesstyle:- Formatting changesrefactor:- Code refactoringperf:- Performance improvementstest:- Test additions/changeschore:- Maintenance tasks
Examples:
feat(auth): add OAuth2 authentication flow
Implement OAuth2 login with Google, GitHub, and Microsoft providers.
Added user session management with refresh token support.
Closes #123
Pre-Push Hooks
Pre-push hooks are configured to run linting and tests before pushing to the remote repository.
Style Guides
- Follow Airbnb JavaScript Style Guide
- Use ESLint for code linting
- Follow Prettier formatting rules
Thank you for contributing to newzy! 🎉