- pull the repository
- run
npm install
- run
npm run start
- never push to main
- make descriptive branch names with the number of the issue you are working on
- ex: if we want to add a login page
- create an issue describing what you want to do, git will assign it a number, ex: #10 Add Login Page
- Start from master (
git pull master
) - Checkout a branch in the following format
git checkout -b #10-add-login-page
- When committing add issue number (must include # sign) to begging of the commit add initials to end of commit message ex:
git commit -m "[#10]this is my message [cf]
- Putting the issue number in the commit will allow git to automatically link it to the issue
- pull new updates
git pull
- add an issue for the feature your working on in github issues
- be sure to assign a participant and tag
- checkout new branch
git checkout -b #100-my-new-feature
- complete and test branch
- commit and push updates to
#100-my-new-feature
branch - checkout and pull main
git checkout main
andgit pull
- checkout previous branch
git checkout #100-my-new-feature
- no '-b' this time - merge
main
into#100-my-new-feature
branchgit merge main
( can always abort withgit merge --abort
) - commit and push merge to
#100-my-new-feature
branch - on github create a pull request merging
#100-my-new-feature
intomain
- request a code review from another member of the team
- More about trunk based development
- When you pickup and issue there make sure to assign it to yourself (or a group)
- add the Doing tag
- when the issue is complete and has been merged in main then add the completed tag and close the issue
- indent rainbow
- rainbow brackets
- prettier typescript errors
- prettier code formatter
- colorize
- indent rainbow
- rainbow brackets
- Install cli -
npm i -g firebase-cli
- Login -
firebase login
- If not a project already
firebase init
- To deploy run
firebase deploy
- Navigate to Google Cloud console
- Go to Navigation menu --> APIs & Services --> Credentials
- Click Create Credentials --> API Key
- Go to Navigation menu --> APIs & Services --> Enabled APIs & Services --> Click on Enable APIs and Services button
- Search for Civic Information API and click Enable
- Go to APIs & Services --> Credentials
- Under API restrictions, click on Restrict key
- Search for Google Civic Information API and check the box
- Click Save button
- create a
.env
file in the root directory - Add the following line
- Never expose or
git push
your API key!
VITE_CIVICS_API_KEY=[Your API key goes here]
- env must be prepended with VITE, or it will not be picked up.
- Use it in the application
- Responsive/Advanced design
- React router with different pages
- Api querying, data mapping and error handling
- React state/context handling to share data with different components
- Chart integration
- Complete linter, hosting, build scripts and testing libraries with typescript
- Git repo using user stories/issue and trunk based development