Go to file
sam 55479ae8da
fix eslint errors
2023-12-30 15:33:03 +01:00
.woodpecker add backend CI 2023-12-30 04:30:19 +01:00
backend fix: let users select the Google account to log in with every time 2023-12-30 04:41:22 +01:00
docs add snowflake IDs to docs 2023-10-13 23:24:39 +02:00
frontend fix eslint errors 2023-12-30 15:33:03 +01:00
prns fix(prns): url encode unicode 2023-08-12 15:00:26 +02:00
pronounslib fix(prns): url encode unicode 2023-08-12 15:00:26 +02:00
scripts don't ignore errors in tx.Rollback() 2023-12-30 04:30:32 +01:00
.air.toml update README + air config 2023-09-13 16:27:05 +02:00
.env.example fix: typo 2023-06-15 23:31:15 -04:00
.gitignore add database seed from file 2023-09-10 16:49:16 +02:00
Cargo.lock fix(prns): url encode unicode 2023-08-12 15:00:26 +02:00
Cargo.toml fix(prns): url encode unicode 2023-08-12 15:00:26 +02:00
LICENSE initial commit 2022-05-02 17:19:37 +02:00
Makefile add frontend CI 2023-12-30 02:52:31 +01:00
README.md update README + air config 2023-09-13 16:27:05 +02:00
go.mod chore: update go dependencies 2023-10-28 01:04:20 +02:00
go.sum chore: update go dependencies 2023-10-28 01:04:20 +02:00
main.go feat(backend): add snowflake IDs 2023-08-17 18:49:32 +02:00
package.json make more member routes accept snowflakes + make flag routes accept snowflakes 2023-09-07 01:43:05 +02:00
pnpm-lock.yaml chore: upgrade sveltekit to 2.0.0, upgrade svelte to 4.0.0 2023-12-26 01:34:53 +01:00
pnpm-workspace.yaml make more member routes accept snowflakes + make flag routes accept snowflakes 2023-09-07 01:43:05 +02:00
seed.example.yaml add database seed from file 2023-09-10 16:49:16 +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)
  • Air for live reloading the backend

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. Copy frontend/.env.example to frontend/env and fill out the required options.
  4. Run go run -v . database migrate to initialize the database, then optionally go run -v . database seed to insert a test user.
  5. Run pnpm dev. Alternatively, if you don't want the backend to live reload, run go run -v . web, then change to the frontend/ directory and run pnpm dev.

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

Seeding

To seed the database with some data, create a seed.yaml file, then use go run -v . database seed. For the file format, refer to the Seed struct in scripts/seeddb.

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/>.