gregsadetsky / rctv

Home Page:https://rctv.recurse.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RCTV

what is this

an IRL tv dashboard at the Recurse Center with "tv apps" to bridge the physical-virtual schism

how to dev (backend)

  • you need a local postgres db

first time:

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

create a new postgres database for rctv

# macOS (adapt for your OS)
initdb -A trust /usr/local/var/postgres
# Connect to default DB
psql -U $USER -d -d postgres
# Create a new postgres user for RCTV
# SQL
CREATE USER rctv;
CREATE DATABASE rctv WITH OWNER="rctv";
quit;

# Connection string will be postgres://rctv@localhost:5432/rctv

define an .env file. Copy from .env.example and fill in the values inside "" quotes:

cp .env.example .env

create a Zulip Bot (choose Outgoing Webhook Bot), download its zuliprc file, and move it to the root of this repository + rename it to .zuliprc (with a dot at the beginning)

cp ~/Downloads/zuliprc .zuliprc

also! create a django super user for yourself!

python manage.py createsuperuser
# answer admin (username), a@a.ca, admin (password) and 'y' to confirm the bad password

every time:

source venv/bin/activate
python manage.py runserver

how to dev (sdk / frontend app javascript) - short version

  1. make sure that bun is installed, see sdk/README.md for more details

from repo dir:

cd sdk
bun watch
  1. you will also need to run the vite bundler in parallel for app.html frontend scripts

first time:

cd core/static_src
npm install

then every time - from repo dir:

cd core/static_src
npm run dev
  1. we're not done...
  • you'll want to run ngrok and go through these steps so that rctv-dev.recurse.com works & points to your local django localhost:8000
  • we might have even more terminals/servers to run simultaneously (when we introduce websockets??), stay tuned.........

raspi things

deployment

https://rctv.recurse.com

  • hosted on greg's render account
  • site is automatically deployed upon git pushing to this repo

TODO/docs

  • see TODO
  • and HOWTODEV-OAUTH
  • while you're here, read a little bit about the development process for RCTV here.

About

https://rctv.recurse.com


Languages

Language:Python 67.2%Language:HTML 17.9%Language:TypeScript 8.4%Language:JavaScript 3.3%Language:CSS 2.4%Language:Shell 0.8%