Skip to content

Coffee Chat ‐ Version Control and Standards

Anthony Shellman edited this page Jan 25, 2024 · 1 revision

Coffee Chat - Version Control and Standards

Table of Contents


1. Introduction

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.

2. Version Control Importance

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.

3. Team-Specific Context

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.

4. Version Control Tools

We use Git as our version control system and GitHub as our collaboration platform. Familiarity with these tools is crucial for our development process.

5. Branching Strategy

5.1 Feature Branches

  • We create feature branches for new development tasks or features using this format: ticket_number-frontend/backend-task
    • Example feature branch: LC23-FE-header

5.2 Bugfix Branches

  • Bugfix branches are used to address and fix bugs. Branch names should be descriptive and follow the format:
    • bugfix-issue-description

5.3 Release Branches

  • Release branches are used for preparing code for production releases. Naming convention:
    • release-version-number.

5.4 Main Branch

The main branch is our primary development branch. We avoid pushing directly to main.

5.5 Develop Branch

The develop branch is used to create feature branches and work on.

6. Commit Guidelines

  • 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."

7. Code Review Process

  • 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.

8. Collaborative Workflow

  • 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.

9. Best Practices

Avoid force pushes, which can disrupt the history of shared branches.

10. Security and Confidentiality

Do not include sensitive information like passwords or API keys in code repositories.

11. Tech Stack Overview

  • 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.

12. Tools and Resources

13. Version Control with GitHub

Version control is essential for tracking changes in code and collaborating effectively. Follow these steps to get started with GitHub:

13.1. Forking a Repository

  1. Visit the project's GitHub repository.
  2. Click the "<> Code" button in the top-right corner of the repository page.
  3. This will give you options to clone the repo; choose HTTPS or SSH and then copy the link.

13.2. Cloning the Repository

  1. Open your terminal.
  2. Navigate to your preferred directory to store the project.
  3. Clone the forked repository using the following command, replacing [repository-url] with the repository's URL:
  • bash git clone [repository-url]

13.3 Creating a Branch

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]

13.4 Making, Committing & Pushing Changes

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]

13.5 Creating a Pull Request (PR)

  1. Visit your team repository on GitHub.
  2. Click the "New Pull Request" button.
  3. Compare the changes in your branch to the develop project repository.
  4. Submit the PR with a clear title and description.

14. Project Configuration and package.json

14.1 package.json File:

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.

14.2 Version Control Standards:

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.

14.3 Dependency Management:

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.

14.4 Scripts:

  • The package.json file 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.

14.5 Linting and Code Style:

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.

14.6 Browserslist:

The browserslist configuration defines the list of supported browsers for our project. This is important for ensuring cross-browser compatibility.

14.7 Documentation Maintenance:

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.

15. Documentation Maintenance

This document should be regularly updated to reflect changes in best practices, tools, or team procedures.

16. Conclusion

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.

Clone this wiki locally