Go to file
Sam 4ebc5d5003
feat: add flags to edit profile page
2023-05-29 03:26:55 +02:00
backend fix: don't delete flag *objects* because flags can share hashes 2023-05-29 03:26:55 +02:00
docs add Caddyfile to docs 2023-05-27 23:46:12 +02:00
frontend feat: add flags to edit profile page 2023-05-29 03:26:55 +02:00
scripts feat: GET /users/@me/flags, POST /users/@me/flags 2023-05-29 03:26:53 +02:00
.gitignore chore: merge gitignore files 2023-03-20 16:40:36 +01:00
LICENSE initial commit 2022-05-02 17:19:37 +02:00
Makefile feat: switch to Go libraries for avatar conversion instead of ImageMagick 2023-03-30 14:44:32 +02:00
README.md docs: slightly improve docs 2023-03-23 10:49:49 +01:00
go.mod feat(backend): switch to libvips for avatar resizing 2023-05-17 00:49:35 +02:00
go.sum feat(backend): switch to libvips for avatar resizing 2023-05-17 00:49:35 +02:00
main.go feat: move remaining go scripts to main executable 2023-05-11 01:13:32 +02:00
openapi.yaml feat: add /users/@me/members/{memberRef} route (closes #62) 2023-05-23 16:32:02 +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 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. Create a .env file in the repository root containing at least HMAC_KEY, DATABASE_URL, REDIS, PORT, and MINIO_ENDPOINT keys.
  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. Create frontend/.env with the following content: PUBLIC_BASE_URL=http://localhost:5173
  6. cd into the frontend directory and run pnpm dev to run the frontend.

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