Skip to content

privacy-scaling-explorations/pse-forums

 
 

Repository files navigation

PSE Forum

Client

Freedit New UI dev version
forum.pse.dev forum-blond.vercel.app

Just run the whole thing locally

☑️ Requirements: docker, docker-compose.

  • ▶️ ./up to start everything

    This will:
    1. Start all services (postgres db, vite client, rust server) as docker containers
    2. Opens automatically the frontend in your browser
  • ⏹️ ./down to stop everything

    This will stop all the services (nothing else than `docker compose down`).

Develop

We use mise to manage runtimes, manage environment variables, and run tasks.
Install it and start everything in dev mode with:

curl https://mise.run | sh
mise activate
mise run d
  1. Installs mise
  2. Installs necessary runtimes (bun, rust)
  3. Installs necessary packages (node_modules, cargo deps)
  4. Spins up a postgres database and runs the migrations against it
  5. Generates prisma client and corresponding TS types
  6. Starts the api server in dev mode
  7. Starts the frontend client in dev mode

Inbucket

During local development, we use inbucket to receive confirmation emails.
The mailboxes are available at localhost:9000.

Monitoring

The docker compose setup includes a Grafana, Loki, and Promtail instances to monitor the server logs. The Grafana dashboard is accessible at localhost:3002 during local development.

You will have to add the Loki data source to your grafana instance
  1. Go to localhost:3002

  2. Default credentials are admin:admin

  3. Explore > open advanced data source picker

    capture\

  4. Configure new data source > search for loki

  5. Add connection url

Pay attention to which network you are on, in case loki and grafana runs within the docker network or localhost: http://<loki|localhost>:3100

Freedit

This project started as a fork of Freedit, but has since diverged quite a bit.
forum.pse.dev still runs this original freedit codebase.
Run it with:

mise r freedit

or

cargo run -r --bin freedit

Packages

 
 
 

Languages

  • Rust 53.0%
  • HTML 23.6%
  • TypeScript 20.0%
  • PLpgSQL 1.1%
  • Shell 0.9%
  • JavaScript 0.8%
  • Other 0.6%