Ralgun / prototype

Hive prototype, lihive meets rust backend

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

prototype

Hive prototype, lihive meets rust backend

Requirements

  • rust/cargo
  • nodejs
  • a Firebase project w/ Authentication setup
    • Sign-in providers enabled:
      • Google
      • Anonymous
  • a Postgres database

Running locally

  1. Setup a Firebase project as defined above, making note of its Web API key, project ID, and project auth domain
  2. Create an .env.local file for the frontend:

js/frontend/.env.local

NEXT_PUBLIC_FIREBASE_API_KEY=
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=
NEXT_PUBLIC_FIREBASE_PROJECT_ID="
  1. Build the static frontend files:
$ npm install
$ npm run --workspace js/frontend build
  1. Create a .env file for the backend:

backend/.env

DATABASE_URL=              # whatever the connection string for your Postgres database is
FIREBASE_JWT_ISSUER=       # this should be the same as your Firebase auth domain
STATIC_FILES_PATH=./dist   # we'll set this up in a moment
  1. Run the Diesel migrations, if you haven't already:
$ cd backend
$ diesel migration run
  1. Run the backend server:
$ cd backend
$ cargo run

Previous works

lihive frontend by atdyer

hive rust backend by klautcomputing

About

Hive prototype, lihive meets rust backend

License:GNU Affero General Public License v3.0


Languages

Language:TypeScript 73.6%Language:Rust 25.1%Language:JavaScript 0.5%Language:Shell 0.3%Language:PLpgSQL 0.3%Language:Dockerfile 0.1%Language:Nix 0.1%Language:CSS 0.0%