diff --git a/README.md b/README.md index 6d2b5b7..e5b4eed 100644 --- a/README.md +++ b/README.md @@ -1,32 +1,28 @@ -# starhaven.dev v2 +# Star Haven -## Build Instructions -1. Pull Repo. -2. `cargo run` (Install Rust if not available.) -3. Success! +https://starhaven.dev -## Database Instructions -`sqlx-cli` is provided by the nix devShell for authoring new migrations: -`sqlx migrate add `. +Star Haven [AppView](https://atproto.com/guides/glossary#app-view). -## Quick-Start Contribution Guide +## Development -We're using HARM! (HTMX, Axum, Rust, Maud). +To build and run the AppView locally, you will need [Nix](https://nixos.org/download.html) installed. +If you are on Windows, install Nix inside [WSL](https://learn.microsoft.com/en-us/windows/wsl/install). -TO-DO: +Enter the devShell with - ### PHASE 1 - - SQLite Database w/ SQLX - - Routes w/ HTMX - - OAuth Login +```bash +nix --extra-experimental-features 'nix-command flakes' develop +``` - ### PHASE 2 - - AT-PROTO / Firehose / PDS Integration +and start the server: - ### PHASE 3 - - Design w/ CSS - - Mod Filtering - - Moderation Tools +```bash +just start +``` - ### PHASE 4 - - Forum +Then open . It rebuilds and restarts when you save. + +## Contributing + +PRs are welcome! But please [file a proposal for bigger changes](https://tangled.org/starhaven.dev/rfcs). diff --git a/flake.nix b/flake.nix index 80af8e7..00766ff 100644 --- a/flake.nix +++ b/flake.nix @@ -96,6 +96,8 @@ nativeBuildInputs = [ devToolchain pkgs.sqlx-cli + pkgs.just + pkgs.watchexec ] ++ lib.optionals useMold [ pkgs.mold ]; shellHook = '' diff --git a/justfile b/justfile new file mode 100644 index 0000000..dd82ce6 --- /dev/null +++ b/justfile @@ -0,0 +1,24 @@ +default: + @just --list + +# Run the server, restarting on source changes +start *ARGS: + watchexec -r -e rs,toml,sql -- cargo run -- {{ ARGS }} + +# Run the server once +run *ARGS: + cargo run -- {{ ARGS }} + +# Run under the full-debuginfo profile, for a debugger +debug *ARGS: + cargo run --profile debugging -- {{ ARGS }} + +test: + cargo test + +check: + cargo clippy --all-targets + +fmt: + cargo fmt + nix fmt