- TypeScript 54.5%
- Rust 43.2%
- CSS 2%
- Dockerfile 0.3%
This PR restricts the group of people who can access a microclimate server from anyone with an Atmosphere identity to only individuals invited to the server. To support this, it also adds a Server Administration page to the settings route, with a page for adding/removing users from the server. There were new components created to support this, like the Account button for the settings sidebar, and the Atproto Typeahead as suggested previously for #9. They have not been integrated into their original sites yet, pending review. Closes #75 Closes #73 Reviewed-on: #79 Reviewed-by: seb <sebastiancbenjamin@gmail.com> Co-authored-by: Graham Barber <green.cheese8030@fastmail.com> Co-committed-by: Graham Barber <green.cheese8030@fastmail.com> |
||
|---|---|---|
| .cargo | ||
| .storybook | ||
| .vscode | ||
| .zed | ||
| app | ||
| proto | ||
| public | ||
| server | ||
| src-tauri | ||
| stories/ui | ||
| .dockerignore | ||
| .gitattributes | ||
| .gitignore | ||
| components.json | ||
| deno.jsonc | ||
| deno.lock | ||
| Dockerfile | ||
| package.json | ||
| react-router.config.ts | ||
| README.md | ||
| tsconfig.json | ||
| tsconfig.node.json | ||
| vite.config.ts | ||
| vitest.shims.d.ts | ||
microclimate
A LiveKit-based alternative to Mumble and Discord.
Requires
- Rust
- Deno
protoc, the protobuffer compiler- A
server/.envfile, seeserver/.env.examplefor required values
Project structure
The server and Tauri client are separate Cargo workspaces. Most server-side
Cargo commands should be run from the server/ directory; most client-side
commands are run from the project root (via Deno tasks) or src-tauri/.
Setup
Server
The server uses SQLx compile-time query verification, which requires either a
live database or a pre-generated query cache. The cache is already committed to
the repository under server/.sqlx/, so a live database is only needed when
you change the schema.
# Copy and fill in the environment file
cp server/.env.example server/.env
# JWT_SECRET is required — the server uses it to sign session tokens issued
# after a successful ATProto OAuth login. Use a long random value, e.g.:
# openssl rand -base64 32
# (First time only, or after changing migrations) Install sqlx-cli and
# run migrations to set up the database
cargo install sqlx-cli --no-default-features --features sqlite
cd server && sqlx migrate run
# (After changing migrations) Regenerate the SQLx query cache and commit it
cd server && cargo sqlx prepare
Note: In production, migrations run automatically when the server starts.
Client
No additional setup is required beyond what Deno installs automatically.
Running
# Start the gRPC server (from server/)
cd server && cargo run
# Start the Tauri desktop app (from project root, use cmd.exe on Windows)
deno task tauri dev
Note: cargo build from the project root only builds the Tauri client.
To build the server, run cargo build from server/.
Tips
- If you're developing on Windows, I've observed that the Tauri app will not render when executing
deno task tauri devfrom Powershell. Usingcmdseems to work just fine, though. - I recommend using Yaak for testing gRPC features without a client
- Use
cargo test export_bindingsfromsrc-tauri/to generate TypeScript types from structs using ts-rs