Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
williamtran10 committed Oct 2, 2023
0 parents commit 1f3378d
Show file tree
Hide file tree
Showing 152 changed files with 28,320 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
db-init/create-multiple-dbs.sh eol=lf
36 changes: 36 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Severity**
<!--Low: there's an easy workaround that your team has already implemented, bug does not impact your project timeline--->
<!--Moderate: there is a workaround that your team can implement but it may be less than optimal, your project timeline is being impacted by this issue--->
<!--Critical: the bug is a blocker and must be addressed immediately--->
- [ ] Low
- [ ] Moderate
- [ ] Critical

**Describe the bug**
<!--A clear and concise description of what the bug is and how it differs from expected behaviour. Please include screenshots if applicable --->

**Additional context**
<!--Add any other context about the problem here.--->

**To reproduce**
<!--Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
--->

**Device information**
<!-- Type: desktop or mobile? Please include versions of the OS and browser as well --->
Type:
OS:
Browser:
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
<!--A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]--->

**Describe the solution you'd like**
<!--A clear and concise description of what you want to happen.--->

**Describe alternatives you've considered**
<!--A clear and concise description of any alternative solutions or features you've considered.--->

**Additional context**
<!--Add any other context or screenshots about the feature request here.--->
25 changes: 25 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
## Notion ticket link
<!-- Please replace with your ticket's URL -->
[Ticket Name](https://www.notion.so/uwblueprintexecs/Task-Board-db95cd7b93f245f78ee85e3a8a6a316d)


<!-- Give a quick summary of the implementation details, provide design justifications if necessary -->
## Implementation description
*


<!-- What should the reviewer do to verify your changes? Describe expected results and include screenshots when appropriate -->
## Steps to test
1.


<!-- Draw attention to the substantial parts of your PR or anything you'd like a second opinion on -->
## What should reviewers focus on?
*


## Checklist
- [ ] My PR name is descriptive and in imperative tense
- [ ] My commit messages are descriptive and in imperative tense. My commits are atomic and trivial commits are squashed or fixup'd into non-trivial commits
- [ ] I have run the appropriate linter(s)
- [ ] I have requested a review from the PL, as well as other devs who have background knowledge on this PR or who will be building on top of this PR
33 changes: 33 additions & 0 deletions .github/workflows/firebase-hosting-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools

name: Deploy frontend to Firebase Hosting

on:
push:
branches:
- main
paths:
- "frontend/**"

defaults:
run:
working-directory: frontend

jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: echo "REACT_APP_BACKEND_URL=${{ secrets.DEV_BACKEND_URL }}" > .env
auth {
- run: echo "REACT_APP_OAUTH_CLIENT_ID=${{ secrets.DEV_OAUTH_CLIENT_ID }}" >> .env
} auth
- run: rm -rf node_modules && yarn install --frozen-lockfile && yarn build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_UW_BLUEPRINT_STARTER_CODE }}"
channelId: live
projectId: "${{ secrets.DEV_PROJECT_ID }}"
entryPoint: ./frontend
31 changes: 31 additions & 0 deletions .github/workflows/firebase-hosting-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools

name: Deploy frontend to Firebase Hosting preview

on:
pull_request:
paths:
- "frontend/**"

defaults:
run:
working-directory: frontend

jobs:
build_and_preview:
if: "${{ github.event.pull_request.head.repo.full_name == github.repository && github.base_ref == 'main' }}"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: echo "REACT_APP_BACKEND_URL=${{ secrets.PREVIEW_BACKEND_URL }}" > .env
auth {
- run: echo "REACT_APP_OAUTH_CLIENT_ID=${{ secrets.DEV_OAUTH_CLIENT_ID }}" >> .env
} auth
- run: rm -rf node_modules && yarn install --frozen-lockfile && yarn build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_UW_BLUEPRINT_STARTER_CODE }}"
projectId: "${{ secrets.DEV_PROJECT_ID }}"
entryPoint: ./frontend
69 changes: 69 additions & 0 deletions .github/workflows/heroku-deploy-dev-ts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Deploy backend to Heroku dev environment

on:
push:
branches:
- main
paths:
- "backend/typescript/**"

jobs:
deploy:
if: ${{ false }}
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set Heroku login credentials
run: |
cat > ~/.netrc <<EOF
machine api.heroku.com
login $HEROKU_EMAIL
password $HEROKU_API_KEY
machine git.heroku.com
login $HEROKU_EMAIL
password $HEROKU_API_KEY
EOF
env:
HEROKU_API_KEY: "${{ secrets.HEROKU_API_KEY }}"
HEROKU_EMAIL: "${{ secrets.HEROKU_EMAIL }}"
- name: Add Heroku git remote
run: heroku git:remote --app $HEROKU_APP_NAME
env:
HEROKU_APP_NAME: "${{ secrets.DEV_PROJECT_ID }}"
- name: Set Heroku config vars
run: |
mongodb {
heroku config:set MG_DATABASE_URL="${{ secrets.DEV_MG_DATABASE_URL }}" -a $HEROKU_APP_NAME && \
} mongodb
auth {
heroku config:set FIREBASE_WEB_API_KEY="${{ secrets.DEV_FIREBASE_WEB_API_KEY }}" -a $HEROKU_APP_NAME && \
heroku config:set FIREBASE_REQUEST_URI="${{ secrets.DEV_FIREBASE_REQUEST_URI }}" -a $HEROKU_APP_NAME && \
file-storage {
heroku config:set FIREBASE_STORAGE_DEFAULT_BUCKET="${{ secrets.DEV_FIREBASE_STORAGE_DEFAULT_BUCKET }}" -a $HEROKU_APP_NAME && \
} file-storage
heroku config:set FIREBASE_PROJECT_ID="${{ secrets.DEV_PROJECT_ID }}" -a $HEROKU_APP_NAME && \
heroku config:set FIREBASE_SVC_ACCOUNT_PRIVATE_KEY="${{ secrets.DEV_FIREBASE_SVC_ACCOUNT_PRIVATE_KEY }}" -a $HEROKU_APP_NAME && \
heroku config:set FIREBASE_SVC_ACCOUNT_CLIENT_EMAIL="${{ secrets.DEV_FIREBASE_SVC_ACCOUNT_CLIENT_EMAIL }}" -a $HEROKU_APP_NAME && \
} auth
no-auth {
file-storage {
heroku config:set FIREBASE_WEB_API_KEY="${{ secrets.DEV_FIREBASE_WEB_API_KEY }}" -a $HEROKU_APP_NAME && \
heroku config:set FIREBASE_REQUEST_URI="${{ secrets.DEV_FIREBASE_REQUEST_URI }}" -a $HEROKU_APP_NAME && \
heroku config:set FIREBASE_STORAGE_DEFAULT_BUCKET="${{ secrets.DEV_FIREBASE_STORAGE_DEFAULT_BUCKET }}" -a $HEROKU_APP_NAME && \
heroku config:set FIREBASE_PROJECT_ID="${{ secrets.DEV_PROJECT_ID }}" -a $HEROKU_APP_NAME && \
heroku config:set FIREBASE_SVC_ACCOUNT_PRIVATE_KEY="${{ secrets.DEV_FIREBASE_SVC_ACCOUNT_PRIVATE_KEY }}" -a $HEROKU_APP_NAME && \
heroku config:set FIREBASE_SVC_ACCOUNT_CLIENT_EMAIL="${{ secrets.DEV_FIREBASE_SVC_ACCOUNT_CLIENT_EMAIL }}" -a $HEROKU_APP_NAME && \
} file-storage
} no-auth
heroku config:set MAILER_USER="${{ secrets.DEV_MAILER_USER }}" -a $HEROKU_APP_NAME && \
heroku config:set MAILER_CLIENT_ID="${{ secrets.DEV_MAILER_CLIENT_ID }}" -a $HEROKU_APP_NAME && \
heroku config:set MAILER_CLIENT_SECRET="${{ secrets.DEV_MAILER_CLIENT_SECRET }}" -a $HEROKU_APP_NAME && \
heroku config:set MAILER_REFRESH_TOKEN="${{ secrets.DEV_MAILER_REFRESH_TOKEN }}" -a $HEROKU_APP_NAME && \
heroku config:set PREVIEW_DEPLOY=true -a $HEROKU_APP_NAME
env:
HEROKU_APP_NAME: "${{ secrets.DEV_PROJECT_ID }}"
- name: Push to Heroku
run: git push heroku `git subtree split --prefix backend/typescript`:main --force
65 changes: 65 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Lint codebase

on:
push:
branches:
- main
paths:
- "frontend/**"
- "backend/typescript/**"
- "backend/python/**"
pull_request:
branches:
- main
paths:
- "frontend/**"
- "backend/typescript/**"
- "backend/python/**"

jobs:
run-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Filter changed files
uses: dorny/paths-filter@v2
id: changes
with:
filters: |
frontend:
- "frontend/**"
typescript-backend:
- "backend/typescript/**"
python-backend:
- "backend/python/**"
- name: Set up Node.js
if: steps.changes.outputs.frontend == 'true' || steps.changes.outputs.typescript-backend == 'true'
uses: actions/setup-node@v2
with:
node-version: "14.15.5"
cache: "yarn"
cache-dependency-path: |
frontend/yarn.lock
backend/typescript/yarn.lock
- name: Install Node.js dependencies
if: steps.changes.outputs.frontend == 'true' || steps.changes.outputs.typescript-backend == 'true'
run: yarn --cwd ./frontend --prefer-offline && yarn --cwd ./backend/typescript --prefer-offline

- name: Lint frontend
if: steps.changes.outputs.frontend == 'true'
working-directory: ./frontend
run: yarn lint

- name: Lint TypeScript backend
if: steps.changes.outputs.typescript-backend == 'true'
working-directory: ./backend/typescript
run: yarn lint

- name: Lint Python backend
if: steps.changes.outputs.python-backend == 'true'
working-directory: ./backend/python
run: pip install black && python -m black --check .
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
**/node_modules
**/.env
**/build
**/venv
**/__pycache__
**/*.log
**/firebaseServiceAccount.json
**/.DS_Store
.vscode
**/*.cache
**/*.egg-info
Loading

0 comments on commit 1f3378d

Please sign in to comment.