Skip to content

Self-Hosting the Backend

The only external dependency is a tiny OAuth backend for Google sign-in. It's a single Express file with no database.

Deploy on Render (Free)

  1. Fork the repo.
  2. dashboard.render.com → New Web Service.
  3. Root dir: SlasshyVault-Backend.
  4. Build: npm install | Start: npm start.
  5. Set env vars: GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, REDIRECT_URI.
  6. Add redirect URI to Google Cloud Console: https://your-app.onrender.com/auth/callback.

Environment Variables

VariableRequiredDefaultDescription
GOOGLE_CLIENT_IDFrom Google Cloud Console
GOOGLE_CLIENT_SECRETFrom Google Cloud Console
REDIRECT_URIMust match Google's authorized redirect URIs
PORT3001Server port
OAUTH_CALLBACK_URLhttp://localhost:8085/callbackRedirect target for the Tauri app

Pointing the App to Your Backend

On the login screen, click the "Self-hosted backend?" link, enter your backend URL (e.g. https://your-app.onrender.com), and click Save. The app will use your backend for OAuth instead of the default.

This URL is stored in config as dev_backend_url. The Rust backend reads it from media_config.json at startup — no rebuild needed.

Endpoints

EndpointMethodPurpose
/GETService info
/healthGETHealth check
/auth/googleGETRedirect to Google consent
/auth/callbackGETGoogle's OAuth callback
/auth/session/:idGETApp fetches tokens after callback
/auth/refreshPOSTRefresh access token

MIT License · Open Source