-
Notifications
You must be signed in to change notification settings - Fork 2
Coffee Chat ‐ Version Control and Standards
- 1. Introduction
- 2. Version Control Importance
- 3. Team-Specific Context
- 4. Version Control Tools
- 5. Branching Strategy
- 6. Commit Guidelines
- 7. Code Review Process
- 8. Collaborative Workflow
- 9. Best Practices
- 10. Security and Confidentiality
- 11. Tech Stack Overview
- 12. Tools and Resources
- 13. Version Control with GitHub
-
14. Project Configuration and
package.json - 15. Documentation Maintenance
- 16. Conclusion
Welcome to the Version Control and Standards Document for the Coffee Chat Team. This document outlines best practices, guidelines, and standards for effective version control and collaboration within our development projects.
Version control is a critical aspect of software development. It allows us to track changes, collaborate efficiently, and maintain the quality and integrity of our codebase. By following the standards outlined in this document, we aim to streamline our development process and enhance code quality.
Our development team comprises developers, designers, and project managers working together on the Coffee Chat project within the Launch Academy program. Effective version control is essential for ensuring smooth collaboration and project success.
We use Git as our version control system and GitHub as our collaboration platform. Familiarity with these tools is crucial for our development process.
- We create feature branches for new development tasks or features using this format:
ticket_number-frontend/backend-task- Example feature branch:
LC23-FE-header
- Example feature branch:
- Bugfix branches are used to address and fix bugs. Branch names should be descriptive and follow the format:
bugfix-issue-description
- Release branches are used for preparing code for production releases. Naming convention:
-
release-version-number.
-
The main branch is our primary development branch. We avoid pushing directly to main.
The develop branch is used to create feature branches and work on.
- Each commit should have a clear and descriptive message.
- Commit messages should be in the present tense and briefly describe the changes made.
- Use the imperative mood, e.g., "Fix bug" rather than "Fixed bug."
- Code reviews are mandatory for all changes.
- Developers should create pull requests (PRs) and assign a team member for review.
- Reviewers should provide constructive feedback.
- We may review PRs during our meetings with the other developers on the team.
- Collaborative development relies on branching, creating PRs, and merging changes.
- Consistently keep local branches up to date with the main branch to minimize conflicts.
- Please ensure you are pulling from main/develop branch to ensure there are less merge conflicts.
Avoid force pushes, which can disrupt the history of shared branches.
Do not include sensitive information like passwords or API keys in code repositories.
- React: A JavaScript library for building user interfaces.
- JavaScript: The programming language for web development.
- GitHub: A platform for version control and collaboration.
- Jira: A platform for issue tracking and project management.
- Firebase: A cloud-based platform for building web and mobile apps.
- Firestore: A NoSQL database provided by Firebase for storing and syncing data.
- Git
- GitHub Guides
- Firebase Documentation
- React Documentation
- Jira Guides
- Jira Board
- Coffee Chat Repo
- Firebase Console
Version control is essential for tracking changes in code and collaborating effectively. Follow these steps to get started with GitHub:
- Visit the project's GitHub repository.
- Click the "<> Code" button in the top-right corner of the repository page.
- This will give you options to clone the repo; choose HTTPS or SSH and then copy the link.
- Open your terminal.
- Navigate to your preferred directory to store the project.
- Clone the forked repository using the following command, replacing
[repository-url]with the repository's URL:
bash git clone [repository-url]
Change to project directory:
cd [repository-name]
Create a new branch, replacing [branch name] with a descriptive name of the component or feature you are working on:
git checkout-b [branch-name]
In the terminal, stage your changes:
git add .
Commit your changes with a descriptive message:
git commit -m "Your commit message here"
Push your changes to the repo:
git push origin [branch-name]
- Visit your team repository on GitHub.
- Click the "New Pull Request" button.
- Compare the changes in your branch to the develop project repository.
- Submit the PR with a clear title and description.
The package.json file is a crucial component of our project's configuration. It defines project metadata, dependencies, scripts, and other essential settings. This file is fundamental to the success of our project.
The package.json file should be under version control, just like the rest of our project's source code. All changes to this file should be tracked and committed, and the file should be kept up to date with the project's requirements.
Regularly review and update the dependencies listed in the package.json file. Outdated dependencies can lead to security vulnerabilities and compatibility issues. Team members should be proactive in identifying and addressing outdated dependencies.
Use npm audit or similar tools to identify and address vulnerabilities in project dependencies. Security is a shared responsibility, and addressing vulnerabilities promptly is essential.
- The
package.jsonfile includes scripts that are essential for local development, testing, and building the project for production. All team members should understand the purpose of these scripts and how to use them.- "start": This script typically launches the development server.
- "build": This script typically creates a production-ready build of the project.
- "test": This script typically runs tests for the project.
- Make sure to run tests and the build process before pushing code to the repository.
The package.json file may contain configuration related to linting and code style. These configurations help maintain code consistency and quality. Explain how the team should adhere to these configurations and run linting checks.
The browserslist configuration defines the list of supported browsers for our project. This is important for ensuring cross-browser compatibility.
Stress the importance of keeping the package.json file up to date and aligned with the project's requirements. Any changes to dependencies or scripts should be documented so that team members are aware of them.
This document should be regularly updated to reflect changes in best practices, tools, or team procedures.
Effective version control is essential to our development process. By adhering to these standards, we can maintain code quality, streamline collaboration, and successfully deliver our projects.