Skip to content

Repository_Structure

CMaytom edited this page Jun 11, 2020 · 5 revisions

Repository Structure

src

Contains all source code for the chrome extension

Structure

We separated components of the extension into separate directories within the src directory. This includes the /src/db/ directory which contains our Realtime FireBase database integration, the /src/api/ directory which contains our ClubHouse Rest API V3 integration, the /src/images/ directory which contains images displayed in the extension, and the src/login/ directory which contains user login components. Directly within the src directory are the components for popup.

test

Contains all source code for testing our project. This includes all our jest and puppeteer tests and two example test files(test.example.js and puppeteer.example.js) to demonstrate how Jest and Puppeteer tests work.

Structure

We separate our tests by typs, unit tests and end-to-end puppeteer tests.

Unit tests can be found in the /test/unit/ directory.

End-to-end puppeteer tests can be found in the /test/puppeteer/ directory.

docs

Contains all markdown documents that appear in our Github Wiki.

Structure

Included images are found in the images/ while all src markdown files are in the root of docs/

Refer to the Documenation_Guide for our teams documentation guidelines.

scripts

Contains all source files used by DevOps which includes js and hbs files used for generating automated documentation.

dist

Contains compiled version of the chrome extension that is built when you run npm run build

Structure

This is a flattened version of our src/ folder which has been compiled using webpack and babel to build unified js files for our extension. Images are in the images/ directory.

.github/workflows

Contains all workflows in our pipeline that are run on Github.

Misc

All other files in the root of the repo are configuration files

Branch Structure

Our team followed a simplified version of GitFlow.

Overall Naming Scheme

  • All lowercase names
  • Separate words with ‘-’

Examples

  • build/automated-documentation
  • feature/honor-feed
  • test/api

Master Branch

This is a protected branch that holds the public production version of our project. This matches the version that is on the Chrome Web Store.

Pipelines Run

On Pull Request

  • Base testing and linting

On Push(occurs after Pull Request is Merged)

  • Deployment

Develop

This is a protected branch that holds the most up to date development version of our project.

Pipelines Run

On Pull Request

  • Base testing and linting

On Push(occurs after Pull Request is Merged)

  • Automated Github Wiki Documentation Update

Feature Branches

Create a feature branch when you want to start working on a new feature.

Naming Scheme:

feature/<feature being added>

DevOps Branches

Create a build branch when you want to improve our pipeline.

Naming Scheme:

build/<devops feature>

QA/Test Branches

Create a test branch when you want to add new tests for a given feature.

Naming Scheme:

test/<feature being tested>

Bug Branches

Create a bug branch when you want to fix a bug/issue that was found.

Naming Scheme:

bug/<feature being fixed>

Documentation Branches

Create a doc branch when you want to add a new Markdown file to our Wiki.

Naming Scheme:

doc/<thing being documented>

Practices

  • Pull requests to develop are to be reviewed by at least 2 people before being merged into develop
  • Pull requests to master are to be reviewed by at least 4 people before being merged into master
  • When reviewing a pull request, pull the branch to your local repository and test it in your own browser to confirm functionality before approving.
  • When a pull request is merged after being reviewed, close the branch that was merged.