Skip to content

Architecture

Jacob Smith edited this page Jan 12, 2021 · 3 revisions

Excalidraw Architecture Diagram

A very high level architecture diagram. Things are aren't 100% accurate and the true relationships are more complex. This simplified version should help you understand how data flows from users to the different Firebase services.

Offline First

TODO

Structure

As you can see, this is a monorepo. All packages are located in different folders and all contain their own package.json file.

app

This is the web application deployed at https://relar.app and the mobile app that is yet to be deployed to App Stores. snowpack along with Capacitor are used for the Dev environment and to package the app into iOS and Android formats.

functions

These are the cloud functions deployed in Google Cloud. There is a mixture of functions that run when things happen (e.g. when a new DB entry is created/deleted) and classic backend express servers. Instead of running these like a normal backend, you can test them and deploy them to the staging server when you're ready.

scripts

This is where admin scripts can be found (ie. sending out a beta invitation, performing data migrations/fixes).

shared

This folder contains all of the shared code between app, functions, and scripts. Within this folder, the shared code is further divided into node (code that can only run in NodeJS), web (code that can only be run on the web), and universal (code that can be run in both environments). This code is symlinked (using relative symlinks) into each of the four folders listed above.

*

The other files/folders in this repo are a mixture of documentation and configuration.

Clone this wiki locally