Skip to content

Development

auhc99 edited this page Mar 26, 2024 · 10 revisions

Setup

  1. Fork the Repository: Start by forking the CRISP repository to your own GitHub account.

  2. Clone Your Fork: Clone your fork to your local machine:

    git clone https://github.com/<your-username>/CRISP.git
  3. Install Dependencies: Navigate to both the frontend and backend directories and install the necessary packages using npm

    cd CRISP/multi-git-dashboard
    npm install
    
    cd ../backend
    npm install
  4. Environment Setup: Set up your local environment by creating .env files in the frontend and backend directories. Use the .env.example as a template.

  5. Run the Development Servers: For the frontend and backend, run the development servers:

    // For multi-git-dashboard
    npm run dev
    
    // For backend
    npm run dev

Commit Guideline

Write clear and detailed commit messages. A commit message consists of a header, a body, and a footer. The header has a special format that includes a type, a scope, and a subject:

<type>(<scope>): <short summary>

<body>

<footer>

Example commit message:

feat(authentication): implement OAuth2 login flow

Implemented the OAuth2 login flow using the passport library. This includes
routes for redirecting to the OAuth provider, callback routes, and user session
management.

Resolves #123

Pull Request (PR) Guideline

Once you're ready to share your contributions, follow these steps to submit a Pull Request using the forking workflow:

  1. Create a New Branch: Create a new branch for your changes based on the main branch on your GitHub fork.

    git checkout -b feature/my-new-feature main
  2. Make Your Changes: Implement your feature or fix and commit your changes using the provided format.

  3. Keep Your Branch Updated: Regularly pull the latest changes from the upstream repository and merge them into your branch to keep it up to date.

    git fetch upstream
    git rebase upstream/main
  4. Run the code formatter: Run the Prettier script in both the frontend and the backend

    cd multi-git-dashboard
    npm run prettier-format
    cd ../backend
    npm run prettier-format
  5. Push Your Changes: Push your branch and changes to your GitHub fork.

    git push origin feature/my-new-feature
  6. Open a Pull Request (PR): Go to your fork on GitHub and create a new Pull Request against the staging branch of the upstream repository. Make sure to fill out the PR template with the necessary details.

Clone this wiki locally