{"id":19581238,"url":"https://github.com/basedcount/flair","last_synced_at":"2025-04-27T09:33:04.351Z","repository":{"id":193049150,"uuid":"668925649","full_name":"basedcount/flair","owner":"basedcount","description":"Flair is a microservice designed to parse and store flair information as an addition to Lemmy instances.","archived":false,"fork":false,"pushed_at":"2023-11-03T16:25:57.000Z","size":80,"stargazers_count":4,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-04-02T05:52:21.266Z","etag":null,"topics":["fediverse","flair","lemmy","lemmy-ui"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/basedcount.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-20T23:47:50.000Z","updated_at":"2023-10-02T16:24:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"37acbd09-d8ce-419e-ba16-a937b4269991","html_url":"https://github.com/basedcount/flair","commit_stats":null,"previous_names":["basedcount/flair"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basedcount%2Fflair","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basedcount%2Fflair/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basedcount%2Fflair/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basedcount%2Fflair/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/basedcount","download_url":"https://codeload.github.com/basedcount/flair/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251118939,"owners_count":21539190,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fediverse","flair","lemmy","lemmy-ui"],"created_at":"2024-11-11T07:34:24.186Z","updated_at":"2025-04-27T09:33:04.050Z","avatar_url":"https://github.com/basedcount.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flair\n\nFlair is an augmentation for [Lemmy](https://join-lemmy.org) that adds user flair support to the backend. It can run both as a REST API microservice, as well as an importable Rust crate. \n\n## Features\n- 🚩 Users can pick a user flair among those created by the mods\n- 🔃 Users can change or remove their user flair whenever they want to\n- ➕ Mods can create and remove user flairs in communities they moderate\n- 👮‍♂️ Mods can change or remove other users' flairs\n\n## API Reference\n~~The full API documentation is available on our [documentation page](https://lemmy-flair.readme.io/) or in the `swagger.json` file.~~\n\nAt the present date the documentation is not yet available.\n\nAs detailed by the docs, some requests will require an `Authorization` header. This should be a Lemmy JWT owned by the user making the request. \n\nNo token is required for read only operations such as seeing other people's flairs or seeing the list of a community's flairs.\n\n## Deploy\nFlair is designed to be ran adjacently to the Lemmy backend. In its current state, it is only possible to run the microservice from the same server where a Lemmy deployment is running.\n\nFlair only includes a REST API supporting the microservice. If you are looking to add this feature on your Lemmy instance, you should also adopt a new UI. We recommend you check out [kaleidoscope](https://github.com/basedcount/kaleidoscope), a fork of the Lemmy UI built by us to be 100% integrated with Flair.\n### Docker\nIt is recommended to deploy the microservice with Docker, by pulling the latest version of the [image](https://hub.docker.com/repository/docker/ornatot/flair/general) and adding it to the Lemmy docker-compose file.\n### Bare metal (Cargo)\nAlternatively, it is also possible to run the server with Cargo, using the following command:  \n`cargo run -- serve`\n\nIf you choose this deployment method, make sure to set the `DOCKER` environment variable to `false`, as detailed in the next paragraph.\n\n## Environment variables\nFlair can be configured by modifying the following environment variables:\n| `ENV_VAR`                      | type     | default          | description                                                                         |\n| ------------------------------ | -------- | ---------------- | ----------------------------------------------------------------------------------- |\n| `FLAIRS_PORT`                | `int` | `6969`   | Port where the service will be ran.               |\n| `LEMMY_PORT` | `int` | `8536`   | Port where the associated Lemmy instance is running |\n| `FLAIR_DB_URL` | `string` | `flairs.db`   | Path where the SQLite DB file will be saved                 |\n| `DOCKER` | `bool` | `true`   | `true` if the service is running on Docker, `false` if the service is running on bare metal                 |\n\n\n## Test\nIt is possible to test the application by running the `test.ts` script. A local Lemmy instance is required to test PUT and DELETE requests.\n\nThe script is developed for Bun but should also run with different Javascript runtimes.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasedcount%2Fflair","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbasedcount%2Fflair","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasedcount%2Fflair/lists"}