{"id":21847085,"url":"https://github.com/duyet/glossary-rs","last_synced_at":"2025-07-05T12:33:14.654Z","repository":{"id":37023883,"uuid":"453398616","full_name":"duyet/glossary-rs","owner":"duyet","description":"Glossary API Service written in Rust, powered by actix.rs and diesel.rs.","archived":false,"fork":false,"pushed_at":"2025-04-14T01:14:10.000Z","size":371,"stargazers_count":6,"open_issues_count":4,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-14T02:25:53.078Z","etag":null,"topics":["actix","actix-web","diesel-rs","hacktoberfest","postgres","postgresql","rust"],"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/duyet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"duyet","ko_fi":"duyet"}},"created_at":"2022-01-29T13:01:21.000Z","updated_at":"2025-04-14T01:14:13.000Z","dependencies_parsed_at":"2024-01-19T19:49:48.885Z","dependency_job_id":"f6e08bbb-5e69-4712-bf7b-16d0b0d0fc08","html_url":"https://github.com/duyet/glossary-rs","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duyet%2Fglossary-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duyet%2Fglossary-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duyet%2Fglossary-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duyet%2Fglossary-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/duyet","download_url":"https://codeload.github.com/duyet/glossary-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248888902,"owners_count":21178126,"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":["actix","actix-web","diesel-rs","hacktoberfest","postgres","postgresql","rust"],"created_at":"2024-11-27T23:16:41.876Z","updated_at":"2025-04-14T13:33:23.637Z","avatar_url":"https://github.com/duyet.png","language":"Rust","funding_links":["https://github.com/sponsors/duyet","https://ko-fi.com/duyet"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\".github/logo.png\" alt=\"Glossary Logo\" width=\"100\" /\u003e\n  \u003ch1\u003eGlossary API\u003c/h1\u003e\n  \u003cp\u003e\n    Open-Source Glossary API Service written in Rust, \n    powered by https://actix.rs and https://diesel.rs.\n  \u003c/p\u003e\n  \u003cp\u003e\n    \u003ca href=\"https://github.com/duyet/glossary-rs/actions/workflows/build-test.yaml\"\u003e\n      \u003cimg src=\"https://github.com/duyet/glossary-rs/actions/workflows/build-test.yaml/badge.svg\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/duyet/glossary-rs/graphs/contributors\" alt=\"Contributors\"\u003e\n      \u003cimg src=\"https://img.shields.io/github/contributors/duyet/glossary-rs\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/duyet/glossary-rs/pulse\" alt=\"Activity\"\u003e\n      \u003cimg src=\"https://img.shields.io/github/commit-activity/m/duyet/glossary-rs\" /\u003e\n    \u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n# Endpoints\n\n| Method | Endpoint | What it does |\n| ------ | -------- | -------------|\n| GET | ```/api/v1/glossary``` | Returns a dictionary of glossary with key is the first character of glossary terms.\n| GET | ```/api/v1/glossary-popular``` | Returns an array of most popular terms by likes.\n| GET |  ```/api/v1/glossary/{id}``` | Return the glossary term and defintion.\n| POST | ```/api/v1/glossary``` | Create a new glossary with `term` and `defintion`.\n| PUT | ```/api/v1/glossary/{id}``` | Update a glossary.\n| DELETE | ```/api/v1/glossary/{id}``` | Delete a glossary.\n| GET | ```/api/v1/glossary/{id}/likes``` | Return an array of likes for a glossary.\n| POST | ```/api/v1/glossary/{id}/likes``` | Create a like for a glossary.\n| DELETE | ```/api/v1/glossary/{id}/likes``` | Delete a like from a glossary.\n\n\n# Development\n\n## Prerequisites\n\n- Rust \u003e= 1.26\n- PostgreSQL \u003e= 9.5\n\n## Set up the database\n\nInstall the diesel command-line tool including the postgres feature\n\n```bash\ncargo install diesel_cli --no-default-features --features postgres\n```\n\nCheck the contents of the `.env` file. \nIf your database requires a password, update `DATABASE_URL` to be of the form:\n\n```bash\nDATABASE_URL=postgres://username:password@localhost/glossary\n```\n\nTip: on MacOS, please prefer to use https://postgres.app\n\nThen to create and set-up the database run:\n\n```bash\ndiesel database setup\n```\n\nMigrate database schema:\n\n```bash\ndiesel migration run\n```\n\n## Run the application\n\nTo run the application execute:\n\n```bash\ncargo run\n```\n\nThen open in your browser: http://localhost:8080\n\n## Tests\n\nTo run the unittest, make sure to have Postgres installed in your machine.\nPlease export ```TEST_DATABASE_URL=postgres://localhost:5432``` to your Postgres instance.\n\n- On the MacOS, the easiest way is install https://postgres.app\n- Otherwise, you can start Postgres by Docker Compose:\n   ```\n   docker-compose up -d\n   ```\n\nTo run the unittest:\n\n```\ncargo test\n```\n\n# Deployment\n\n## Using Docker image\n\nDeploy using docker image from https://github.com/duyet/glossary/pkgs/container/glossary\n\n```bash\ndocker run -it \\\n  -e DATABASE_URL=postgres://postgres:5432/glossary \\\n  -p 8080:8080 \\\n  ghcr.io/duyet/glossary:0.1.0\n```\n\n## Using Helm chart\n\nTBU\n\n## Building Docker image from source\n\nBuild and deploy by using docker:\n\n```bash\ndocker build -t glossary .\n```\n\n```bash\ndocker run -it \\\n  -e DATABASE_URL=postgres://postgres:5432/glossary \\\n  -p 8080:8080 \\\n  glossary \n```\n\n# License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduyet%2Fglossary-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fduyet%2Fglossary-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduyet%2Fglossary-rs/lists"}