Go to file
sam ca138efc8f
update Cargo.lock
2023-07-28 02:31:11 +02:00
backend fix(backend): invert api token check in /auth/warnings/{id}/ack 2023-07-27 00:55:51 +02:00
docs clarify how to generate HMAC_KEY 2023-06-15 23:13:43 -04:00
frontend fix: don't copy custom preferences to default preferences 2023-07-17 20:35:45 +02:00
prns polish prns.cc code 2023-07-28 02:21:33 +02:00
pronouns feat: port prns.cc to � blazing fast � rust 2023-07-27 23:51:12 +02:00
scripts change import url 2023-06-03 16:18:47 +02:00
.env.example fix: typo 2023-06-15 23:31:15 -04:00
.gitignore start rust exporter 2023-04-09 23:27:40 +02:00
Cargo.lock update Cargo.lock 2023-07-28 02:31:11 +02:00
Cargo.toml polish prns.cc code 2023-07-28 02:21:33 +02:00
LICENSE initial commit 2022-05-02 17:19:37 +02:00
Makefile change import url 2023-06-03 16:18:47 +02:00
README.md Add example env files and fixup setup instructions 2023-06-15 23:12:42 -04:00
go.mod feat(backend): add request latency tracking 2023-06-23 03:27:09 +02:00
go.sum feat(backend): add request latency tracking 2023-06-23 03:27:09 +02:00
main.go change import url 2023-06-03 16:18:47 +02:00
openapi.yaml change import url 2023-06-03 16:18:47 +02:00
update.sh update changelog 2023-06-03 03:11:15 +02:00

README.md

pronouns.cc

A work-in-progress site to share your names, pronouns, and other preferred terms.

Stack

  • API server is written in Go with the chi router
  • Persistent data is stored in PostgreSQL
  • Temporary data is stored in Redis
  • The frontend is written in TypeScript with Svelte, using SvelteKit for server-side rendering
  • Avatars are stored in S3-compatible storage (MinIO for development)

Development

When working on the frontend, run the API and then use pnpm dev in frontend/ for hot reloading.

Note that the Vite dev server assumes that the backend listens on :8080 and MinIO listens on :9000. If these ports differ on your development environment, you must edit vite.config.ts.

Development

Requirements:

  • Go 1.18 or later
  • PostgreSQL (any currently supported version should work)
  • Redis 6.0 or later
  • Node.js (latest version)
  • MinIO if using avatars, flags, or data exports (not required otherwise)

Setup

  1. Create a PostgreSQL user and database (the user should own the database).
    For example: create user pronouns with password 'password'; create database pronouns with owner pronouns;
  2. Copy .env.example in the repository root to a new file named .env and fill out the required options.
  3. Run go run -v . database migrate to initialize the database, then optionally go run -v . database seed to insert a test user.
  4. Run go run -v . web to run the backend.
  5. Copy frontend/.env.example into frontend/.env and tweak as necessary.
  6. cd into the frontend directory and run pnpm dev to run the frontend.

See docs/production.md for more information about keys in the backend and frontend .env files.

License

Copyright (C) 2022  Sam <u1f320>

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.