{"id":16616768,"url":"https://github.com/yinnx/plainly-rusty","last_synced_at":"2026-04-18T23:03:03.652Z","repository":{"id":210011664,"uuid":"719694247","full_name":"YiNNx/plainly-rusty","owner":"YiNNx","description":"Plainly a blog back-end with dynamic GraphQL","archived":false,"fork":false,"pushed_at":"2023-12-08T13:38:51.000Z","size":106,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-17T19:43:26.165Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://just-plain.fun","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/YiNNx.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-11-16T17:52:33.000Z","updated_at":"2024-08-22T03:20:56.000Z","dependencies_parsed_at":"2024-11-17T00:39:42.394Z","dependency_job_id":"e52900bc-9914-4fca-936a-9407d2c526b5","html_url":"https://github.com/YiNNx/plainly-rusty","commit_stats":null,"previous_names":["yinnx/plainly-rusty"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YiNNx%2Fplainly-rusty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YiNNx%2Fplainly-rusty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YiNNx%2Fplainly-rusty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YiNNx%2Fplainly-rusty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/YiNNx","download_url":"https://codeload.github.com/YiNNx/plainly-rusty/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242967742,"owners_count":20214281,"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":[],"created_at":"2024-10-12T02:14:10.343Z","updated_at":"2026-04-18T23:03:03.519Z","avatar_url":"https://github.com/YiNNx.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# plainly-rusty\n\nIt originally started as a straightforward, almost boring backend rewrite project, for my old blog [backend](https://github.com/YiNNx/Blog-BE). However, as I delved into learning Rust and explored Rust crates associated with web development, it turned to an exploratory venture.\n\n## Features\n\n- The whole project is based on the [Seaography](https://www.sea-ql.org/Seaography/) and the code framework generated from its cli, with dynamic-schema [async-graphql](https://github.com/async-graphql/async-graphql) as the GraghQL library, Actix as the web framework, and SeaORM \u0026 Postgres as the ORM \u0026 database, providing rich and flexible GraphQL query (nested relation, pagination, filtering, ordering, etc.)\n- Implement permission control through a custom guard system and a custom resolver registration system. \n- Use GitHub OAuth2 for authentication, and avoid the burden of building any user system while designing data schema, just using stateless JWT.\n\n## How to Run\n\n1. Set the postgres and import the schema with `scripts/plainly_rusty_create.sql`\n\n   ```shell\n   psql -q {postgres_url} \u003c scripts/plainly-rusty-schema.sql\n   ```\n\n2. Modify or replace the default configuration file, `configs/default.toml`.\n\n3. Run with env variables:\n\n   ```shell\n   RUST_LOG={log_level} CONFIG_FILE={file_path} cargo run\n   ```\n   \n   Or use Docker:\n   \n   ```shell\n   export POSTGRES_PASSWORD={pwd} RUST_LOG={level} CONFIG_FILE={file_path} IMAGE_VERSION={version} \n   \n   cargo build --release --target x86_64-unknown-linux-musl\n   \n   docker build -f deploy/build/Dockerfile . -t plainlyrusty:${IMAGE_VERSION} \n   docker compose -f deploy/docker-compose.yml up\n   ```\n   \n\n## Query Sample\n\n```text\nquery Posts {\n  posts(\n    filters: { status: { eq: PUBLIC } }\n    orderBy: { time: ASC }\n    pagination: { offset: { limit: 10, offset: 0 } }\n  ) {\n    nodes {\n      id\n      title\n      time\n      content\n      summary\n      comments(\n        orderBy: { time: ASC }\n        pagination: { offset: { limit: 2, offset: 0 } }\n      ) {\n        nodes {\n          parentId\n          githubId\n          time\n          content\n        }\n      }\n      tags(orderBy: { name: ASC }) {\n        nodes {\n          name\n        }\n      }\n    }\n  }\n}\n\n```\n\nOn the GraphQL Playground:\n\n![screenshot](https://cdn.just-plain.fun/img/image-20231123130247544.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyinnx%2Fplainly-rusty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyinnx%2Fplainly-rusty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyinnx%2Fplainly-rusty/lists"}