A self-managed bike sharing system like alternative to socio-spatial inequalities.
├── public/ - Contains the main page that will handle the react build and the font imports.
├── src/ - Contains main web app.
| ├── assets/ - Images and icons that are rendered inside the app.
| ├── components/ - Contains all the components that are used separately from page contexts.
| ├── pages/ - Contains the pages files and styles.
| ├───── components/ - Contains all components related to a specific page.
| ├── routes/ - Router configurations for pages
| ├── services/ - Firebase connection functions and external handling tools
| ├── styles/ - Holds the main global styles.
| ├── utils/ - Contains funtions and variable attributions that works with the components.
| ├── App.js - File that holds all pages and driver data together.
| ├── index.js - Render the App component.
├── .editorconfig - Editor compatible configurations.
├── .gitignore - Git config to exclude folders that don't need to be in git.
├── LICENSE - MIT license.
├── package.json - NPM file that scructure project dependencies.
- ReactJS
- Typescript
- Material UI
- Firebase Realtime Database
- Jest
- React Testing Library
- Node 14 or above
- NPM Package manager
- Clone this repository:
git clone git@github.com:Ameciclo/botaprarodar-web.git - Have the Node 14 installed on your machine (Using brew:
brew install node@14) - Put the node command on your bashrc:
echo 'export PATH="/usr/local/opt/node@14/bin:$PATH"' >> ~/.zshrc - On project root folder install packages:
npm install - Using the
.sample-envas template ask the team for environment variables. - You are ready to go.
- Every feature or change should go through a pull request and point to
main. Every PR will trigger the CI to Test and Build the PR. Once the CI is finished and the PR approved, it can be merged into main. IMPORTANT: Always squash your commits. - When merged into
mainthe GitHub Action will trigger the CI/CD to deploy on the DEV environment(see link below). - If the team consider that there are enough code to justify a production deploy, a new PR should be created from
maintoproduction. The last commit for this PR - integratingmainintoproduction- should have the changelogs updated. A merge commit should be created inproductionfor this PR. DO NOT SQUASH COMMITS ON THIS PR. - Once this PR is merged GitHub Actions will begin the deploy on PROD environment.(see link below)
- After the merge between
mainintoproductiona new tag should be created on the commit created from the step 3 using the following commands:
git checkout production && git pull && git tag <version_number> && git push --tags
Once this whole process is finished the admin can create a release from the tag on the tag button above.
npm run build- Builds the applicationnpm start- Start applicationsnpm test- Runs unit testsnpm run test-coverage- Create coverage report [file path:Users/<user_name>/<project_path>/botaprarodar-web/coverage/lcov-report/index.html]
- Run tests
npm test - Commit to local
- Add files to git stage
git add <filename> -Aorgit add -p - Commit files
git commit -m "Your commit message"
- Add files to git stage
- Check Git Actions
- Pull recent changes
git pull --rebase- Fix files if there are merge conflicts
git add <fixed files>git rebase --continue
- Re-run tests if there are new changes
npm test
- Fix files if there are merge conflicts
- Push
git push - Check Git Action
- RED? Fix immediately or git revert
main branch ├── DEV Environment
production branch ├── PROD Environment