/shipment-tracker

A web app and API to coordinate aid shipments around the world

Primary LanguageTypeScriptGNU Affero General Public License v3.0AGPL-3.0

CI status

Distribute Aid Shipment Tracker

The goal of this project is to provide a system for collecting aid offers and organizing them into pallets appropriate for a shipment. Using the system, Distribute Aid administrators can create shipments, aid donors can organize their aid for donation into offers for a shipment and provide the information necessary for a Distribute Aid hub coordinator and logistics coordinator to process it for international shipping to refugees.

Key documents:

Deployments

Staging

The main saga branch is deployed automatically to Heroku by CI. Staging can be accessed here: https://shipment-tracker-dev.herokuapp.com

Devopment process

Code of conduct

First, please read our code of conduct.

Issue tracking

Development tasks are managed in the github issues for this repository. The issues themselves are fairly light on detail in favor of a simple description of scope (i.e. the conditions for the task being considered "done"). For specifics on task requirements, please reference the project requirements document early and often.

Issues tagged front end will also be tagged with either needs UI mock, indicating the task still needs design work to be ready for development, or has UI mock indicating it's ready for dev work.

When you begin working on an issue, please self-assign or comment on it indicating you're beginning work to avoid duplicate effort.

Pull requests

When you're ready to submit your code, open a pull request with "Closes #X" to link the relevant issue. When your PR is approved by at least one maintainer it is ready to submit.

It's easy for the intention of code review comments to be unclear or get misinterpreted. To help with communication, reviewers are encouraged to use conventional comments and explicitly indicate that comments are (blocking), where the discussion must be resolved for PR to be merged, or (non-blocking) where resolving the discussion is optional for the implementer.

Approval and merging

Reviewers should grant approval if they do not feel additional review is necessary before merging. This does not necessarily mean no more changes are required before merging, but that any further changes are expected to be minor enough to not require review.

If the pull request does not require additional changes, the reviewer should merge it immediately after approving. Otherwise, the pull request author should merge (if able) once they have addressed all comments marked (blocking) or nit. Contributors are encouraged to at least reply to (non-blocking) and (if-minor) comments if they do not address them with code changes.

Dev setup

Install node.js v14:

Run the setup script:

$ script/dev_setup

Run the dev server:

$ yarn dev

And then view graphql sandbox at http://localhost:3000/graphql

If you run into problems setting up your development environment please create an issue describing any errors you encounter.

See the README in the frontend directory for instructions on setting up for front end development.

Technical documentation

Type definitions

We want to maintain a single source of truth defining types used on both the API server and browser client. We use GraphQL Codegen for that purpose.

Types are defined in schema.graphql. Type code for TypeScript is generated from that schema file using the command yarn codegen. This will update the type definition files at

  • ./src/server-internal-types.ts for the server
  • ./frontend/src/types/api-types.ts for the browser client

You can use yarn codegen to generate the code, or you can use yarn dev to generate and watch changes to the schema.

Technologies

Shipment Tracker is a full stack TypeScript web app backed by a PostgreSQL database.

General tools:

Back end:

Front end: