Skip to content

🐰 Tooling for the Oakville and Milton Humane Society

Notifications You must be signed in to change notification settings

uwblueprint/humane-society

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

735 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Oakville and Milton Humane Society 🐾

The Oakville and Milton Humane Society is a non-profit organization dedicated to protecting and improving the life of animals within the community and connecting them to the communities that care about them in Oakville and Milton. We will be developing a web application that allows volunteers to sign up for pet-sitting tasks, enabling volunteers to efficiently care for multiple animals.

Winter 2026 Team

  • Akishai Sabaratnasarma (Project Lead)
  • Harry He (Developer)
  • Anne Sun (Developer)
  • Angela Li (Developer)
  • Amanda Xi (Developer)
  • Victor Chan (Developer)
  • Wilson Chen (Developer)
  • Daphne Huang (Developer)

Stack Choices

Backend Language: TypeScript (Express.js on Node.js)
Backend API: REST
Database: PostgreSQL
User Auth: Opt-in
File Storage: Opt-in

Table of Contents

Documentation

Getting Started

Prerequisites

Set up

  1. Clone this repository and cd into the project folder
git clone https://github.com/uwblueprint/humane-society.git
cd humane-society
  1. Follow steps in the Secrets section (below) to ensure that you have the following files added to your repository, with the correct environment variables set:
  • .env
  • frontend/.env
  1. Run the application
docker compose up --build
docker exec -it humane_society_backend /bin/bash -c "node migrate up"

Secrets

  • Ask Project Leads for environment secrets

Useful Commands

Get Names & Statuses of Running Containers

docker ps

Accessing PostgreSQL Database

# run a bash shell in the container
docker exec -it humane_society_db /bin/bash

# in container now
psql -U postgres -d humane_society_dev

# in postgres shell, some common commands:
# display all table names
\dt
# quit
\q
# you can run any SQL query, don't forget the semicolon!
SELECT * FROM <table-name>;

Linting & Formatting

# linting & formatting warnings only
docker exec -it humane_society_backend /bin/bash -c "yarn run lint"
docker exec -it humane_society_frontend /bin/bash -c "yarn run lint"

# linting with fix & formatting
docker exec -it humane_society_backend /bin/bash -c "yarn run fix"
docker exec -it humane_society_frontend /bin/bash -c "yarn run fix"

Running Tests

docker exec -it humane_society_backend /bin/bash -c "yarn test"

Running against Supabase DB

We have deployed our Postgres DB on Supabase which you can connect your local application to, which can be useful for testing.

  1. Ask your Project Lead for the DATABASE_URL environment variable which stores our Supabase connection URL and add it to .env at the root of this project.
    • Optionally, you can also be added to the OMHS organization on Supabase if you need to do some admin work on the deployed DB.
  2. Run the app against the Supabase DB
NODE_ENV=production docker compose up

Note: Currently, the humane_society_db container is also run even when you run against Supabase. You should be able to stop it if the application is correctly connected to Supabase. Additional changes can be made to stop it from running when you want to run against Supabase, involving setting another environment variable (see this PR).

Version Control Guide

Branching

  • Branch off of main for all feature work and bug fixes, creating a "feature branch". Prefix the feature branch name with your name. The branch name should be in kebab case and it should be short and descriptive. E.g. annie/readme-update
  • To integrate changes on main into your feature branch, use rebase instead of merge
# currently working on feature branch, there are new commits on main
git pull origin main --rebase

# if there are conflicts, resolve them and then:
git add .
git rebase --continue

# force push to remote feature branch
git push -f

Commits

  • Commits should be atomic (guideline: the commit is self-contained; a reviewer could make sense of it even if they viewed the commit diff in isolation)
  • Trivial commits (e.g. fixing a typo in the previous commit, formatting changes) should be squashed or fixup'd into the last non-trivial commit
# last commit contained a typo, fixed now
git add .
git commit -m "fixes typo"

# fixup into previous commit through interactive rebase
# x in HEAD~x refers to the last x commits you want to view
git rebase -i HEAD~2
# text editor opens, follow instructions in there to fixup

# force push to remote feature branch
git push -f
  • Commit messages and PR names are descriptive and written in imperative tense1. E.g. "create user REST endpoints", not "created user REST endpoints"
  • PRs can contain multiple commits, they do not need to be squashed together before merging as long as each commit is atomic. Our repo is configured to only allow squash commits to main so the entire PR will appear as 1 commit on main, but the individual commits are preserved when viewing the PR.

About

🐰 Tooling for the Oakville and Milton Humane Society

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 31