Skip to content

Commit

Permalink
supabase-js-rs
Browse files Browse the repository at this point in the history
  • Loading branch information
CharlesTaylor7 committed May 9, 2024
1 parent 568bf1e commit e90bf5e
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 45 deletions.
34 changes: 34 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ mime = "0.3.17"
serde_with = "3.5.0"
tracing-subscriber = { version ="0.3.18", features = ["fmt"], default-features = false }
tracing = "0.1.40"
supabase-js-rs = "0.1.3"

[features]
dev = []
Expand Down
73 changes: 29 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,6 @@
## Citadels
This is a web app for playing the card game [Citadels](https://boardgamegeek.com/boardgame/478/citadels).

## Goals
- Support all characters and roles
- Learn htmx, practice web dev


## Feature set
- All 30 unique districts
- All 27 game characters.
- Game config for picking roles and districts.


## Dev commands
For most commands: use mprocs.

## Logging
The logger offers five levels:
- error
- warn
- info
- debug
- trace

This is excessive, and I will try to stick to 3:
- error
- debug
- info

## Tech Stack
Tech Stack:
- Frontend:
- htmx
- hyperscript (as needed)
- interactjs for drag 'n drop
- Backend
- Rust, stable compiler. No nightly features
- axum
- Askama for templating. (Jinja clone for Rust)

Evaluating:
- sqlite for two use cases:
- game backups via action logs
- saving preferred game configuration

## Releases & monitoring
Github handles publishing a docker image on every push to `main`.
Deployments are done manually with the `deploy.sh` script.
Expand All @@ -66,8 +23,36 @@ To release:
gh run watch && ./deploy.sh
```

## Secret management
## Tech Stack
Tech Stack:
- Frontend:
- htmx
- hyperscript (as needed)
- interactjs for drag 'n drop
- Backend
- Rust, stable compiler. No nightly features
- axum
- Askama for templating. (Jinja clone for Rust)

Evaluating:
- sqlite for two use cases:
- game backups via action logs
- saving preferred game configuration

## Logging
The Rust logger offers five levels:
- error
- warn
- info
- debug
- trace

This is excessive, and I will try to stick to 3:
- error
- debug
- info

## Secret management
Script to generate a new signing key:
```bash
node -e "console.log(require('crypto').randomBytes(64).toString('hex'))"
Expand Down
2 changes: 1 addition & 1 deletion TODO.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Work
- [ ] Auth via Supabase
- [ ] signin via Supabase
- [ ] Game host with elevated permissions
- [ ] Prevent tracing subscriber from overwriting the env_logger
- [ ] Multi room support
Expand Down

0 comments on commit e90bf5e

Please sign in to comment.