# flightcard

> Flight Card Management for Model Rocket Launches

Latest version **1.0.0** (published 2022-10-29) · ISC license · 0 weekly downloads

## Install

```sh
npm install flightcard
pnpm add flightcard
yarn add flightcard
bun add flightcard
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2022-10-29 |
| First published | 2022-10-29 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 18 |
| Unpacked size | 5.3 KB |
| Known vulnerabilities | 0 (+5 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Author | robert@broofa.com |
| Maintainers | broofa |
| Keywords | flight, cards, rocketry, model, rockets |

## Links

- npm: https://www.npmjs.com/package/flightcard
- Repository: https://github.com/broofa/flightcard
- Homepage: https://github.com/broofa/flightcard#readme
- Issues: https://github.com/broofa/flightcard/issues
- Funding: https://github.com/sponsors/broofa
- npm.io page: https://npm.io/package/flightcard

## Dependencies (18)

- [react](https://npm.io/package/react.md) ^18.2.0
- [nanoid](https://npm.io/package/nanoid.md) ^4.0.0
- [process](https://npm.io/package/process.md) ^0.11.10
- [simplur](https://npm.io/package/simplur.md) ^3.0.1
- [victory](https://npm.io/package/victory.md) ^36.6.5
- [checkcss](https://npm.io/package/checkcss.md) ^1.3.1
- [firebase](https://npm.io/package/firebase.md) ^9.9.3
- [bootstrap](https://npm.io/package/bootstrap.md) ^5.2.0
- [react-dom](https://npm.io/package/react-dom.md) ^18.2.0
- [firebaseui](https://npm.io/package/firebaseui.md) ^6.0.1
- [@babel/core](https://npm.io/package/@babel/core.md) ^7.18.13
- [blueimp-md5](https://npm.io/package/blueimp-md5.md) ^2.19.0
- [@types/react](https://npm.io/package/@types/react.md) ^18.0.17
- [@popperjs/core](https://npm.io/package/@popperjs/core.md) ^2.11.6
- [thrustcurve-db](https://npm.io/package/thrustcurve-db.md) ^3.0.1
- [react-bootstrap](https://npm.io/package/react-bootstrap.md) ^2.5.0
- [react-router-dom](https://npm.io/package/react-router-dom.md) ^6.3.0
- [react-router-bootstrap](https://npm.io/package/react-router-bootstrap.md) ^0.26.2

## Recent versions

- 1.0.0 (latest) — 2022-10-29

## README

# FlightCard

An application for managing model rocketry launch events.

## Contributing

This project is open source under [ISC License](https://opensource.org/licenses/ISC).   Contributors are welcome.

### Dev Environment

You use VSCode, right?

<img width="200" src="https://i.imgflip.com/rqk1m.jpg" />

(It's not *required* but, boy, will it make your life easier. )

**TODO**:

* [ ] Set up `lefthook` to ensure pre-commit scripts run
* [ ] Configure [recommended extensions](https://code.visualstudio.com/docs/editor/extension-marketplace#_recommended-extensions)
* [ ] `pre-commit` script for code linting
* [ ] `pre-commit` script for tests

### Architecture / Overview

FlightCard is a single-page web app (SPA), with the following architecture:

```mermaid
graph TB
  client[Browser]
  fb["Firebase (auth + db)"]
  cf["Cloudflare (member certification API)"]
  client --> fb
  client --> cf
```
#### Browser

The browser client is a single-page app (SPA), using TypeScript + React.  User authentication is handled using Google's [Firebase `auth` service](https://firebase.google.com/docs/auth).  All app data (launches, attendees, flightcards, etc...) is stored in the [Realtime Database()](https://firebase.google.com/docs/database).

The React components can be found in the `components` directory.

**Note**: Because this app uses the Realtime Database, changes to data are automatically synced cross *all* clients.  This, combined with the realtime React hooks (see `rt` directory) upon which most of the components are built, means that pretty much any change a user may make will appear immediately to all other users. (Cool, right?!?)

#### Google Firebase

There's not a whole lot to say about this.  It's a data store with an API that pushes changes to the backend data out to all clients in realtime.  This, combined with the React hooks in the `rt` directory (used to render backend data into a component) mean any change user makes will be synced to all users, in realtime(!).

 Contributors will need to set up their own Firebase account and configure it accordingly.  (Instructions forthcoming).

**TODO**:

* [ ] Document how to stand up a `dev` database with configured [security rules](https://github.com/broofa/flightcard/blob/main/rules.json).

 #### Cloudflare Worker

 Information about TRA and NAR member certifications (set in the user's profile page) is fetched from a small API implemented in a CloudFlare worker.  The code for this is in the `worker` directory.

Member cert information is actually cached in [CloudFlare's KV Store](https://developers.cloudflare.com/workers/runtime-apis/kv/).  The scripts used to initially seed the store are in `worker/src/publish_*`.  There is also a scheduled event in the worker itself (`worker/src/index.ts#schedule`) that keeps the KV store updated with any new changes to member information.  This runs once per day.  (I.e. It may take up to 24 hours for a member's information to be updated when it changes.)

Much like Firebase, contributors will need to set up their own Cloudflare account and configure a worker.

**TODO**:

* [ ] Document how to stand up a `dev` worker + KV namespace seeded with sample member cert info.

---
_Source: https://npm.io/package/flightcard · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
