{"id":15711893,"url":"https://github.com/petrenkovitaliy/wiki_engine","last_synced_at":"2026-05-18T14:33:18.492Z","repository":{"id":167748022,"uuid":"643373719","full_name":"petrenkoVitaliy/wiki_engine","owner":"petrenkoVitaliy","description":"Rust-based wiki engine server","archived":false,"fork":false,"pushed_at":"2024-03-12T01:17:50.000Z","size":396,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-02T19:42:37.509Z","etag":null,"topics":["rocket","rust","version-control","wiki"],"latest_commit_sha":null,"homepage":"https://www.fella.wiki/main/en","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/petrenkoVitaliy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-05-21T00:25:48.000Z","updated_at":"2024-06-17T23:53:05.000Z","dependencies_parsed_at":"2024-03-12T02:44:09.577Z","dependency_job_id":null,"html_url":"https://github.com/petrenkoVitaliy/wiki_engine","commit_stats":null,"previous_names":["petrenkovitaliy/wiki_engine"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/petrenkoVitaliy/wiki_engine","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petrenkoVitaliy%2Fwiki_engine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petrenkoVitaliy%2Fwiki_engine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petrenkoVitaliy%2Fwiki_engine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petrenkoVitaliy%2Fwiki_engine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/petrenkoVitaliy","download_url":"https://codeload.github.com/petrenkoVitaliy/wiki_engine/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petrenkoVitaliy%2Fwiki_engine/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273847122,"owners_count":25178633,"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","status":"online","status_checked_at":"2025-09-05T02:00:09.113Z","response_time":402,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["rocket","rust","version-control","wiki"],"created_at":"2024-10-03T21:14:12.341Z","updated_at":"2026-05-18T14:33:18.434Z","avatar_url":"https://github.com/petrenkoVitaliy.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wiki_engine\n\n[![github actions](https://img.shields.io/github/actions/workflow/status/petrenkoVitaliy/wiki_engine/rust.yml?branch=main\u0026style=flat-square\u0026logo=github)](https://github.com/petrenkoVitaliy/wiki_engine/actions)\n\n\u003cb\u003eWiki_engine\u003c/b\u003e is a Rust-based application designed to serve as a flexible wiki engine. It offers comprehensive features for managing articles, including creation, reading, updating, and deletion. The system implements version control for articles/versions, user authentication, and authorization.\n\nAdditionally, it seamlessly integrates with external services such as a mail provider for user sign-up and password reset functionalities, as well as Google Cloud for image storage. The core of the application is built on the Rocket framework, and it connects to a PostgreSQL database for robust and scalable data storage.\n\n**Table of Contents:**\n\n- [Installation](#installation)\n  - [Prerequisites](#prerequisites)\n  - [Setup](#setup)\n- [Entities](#entities)\n  - [DB Schema](#db-schema)\n- [Structure](#structure)\n- [Swagger](#swagger)\n- [Testing](#testing)\n\n## Installation\n\n### Prerequisites\n\n- Rust: [Install Rust](https://www.rust-lang.org/tools/install)\n- Docker: [Install Docker](https://docs.docker.com/get-docker/)\n- Diesel CLI: [Install Diesel CLI](https://diesel.rs/guides/getting-started)\n- cargo-llvm-cov (optionally - for tests' coverage): [Git -\u003e cargo-llvm-cov ](https://github.com/taiki-e/cargo-llvm-cov)\n- cargo-watch (optionally): [crates.io -\u003e cargo-watch](https://crates.io/crates/cargo-watch)\n\n### Setup\n\nThere are bash scripts to use:\n\n- [launch_postgres.sh](scripts/launch_postgres.sh)\n  builds and runs PG docker container (with default configs)\n- [reroll_postgres.sh](scripts/reroll_postgres.sh)\n  drops all PG schemas and runs migrations\n- [run_migrations.sh](scripts/run_migrations.sh)\n  runs migrations with diesel cli (for `main` schema)\n- [watch.sh](scripts/watch.sh)\n  starts server in `watch` mode (with [cargo-watch](https://crates.io/crates/cargo-watch))\n- [test.sh](scripts/test.sh)\n  runs tests\n\n  - possible options:\n    - [-f] -\u003e flushes DB\n    - [-c] -\u003e runs in coverage mode (\u0026 generates report)\n\n#### So, to launch server:\n\n0. Can be launched with [Dockerfile](Dockerfile)\n\n1. Launch DB (skip if remote):\n   ```sh\n   sh scripts/launch_postgres.sh\n   sh scripts/run_migrations.sh\n   ```\n2. Configure .env file according to [example](.env.example)\n3. Launch server\n\n   ```sh\n   sh scripts/watch.sh\n   ```\n\n   ```sh\n   \u003e\u003e\u003e 🚀 Rocket has launched from http://0.0.0.0:8000\n   ```\n\n## Entities\n\n- Main \"central\" entity is `article`\n- `article` can contain multiple `article_language`s (at least one)\n  - -\u003e connects article's content with `language`\n- `language`\n- `article_version`\n  - -\u003e article language's versions\n- `version_content`\n\n  - -\u003e article versions's content\n  - can be in one of two formats:\n    - [according to field `content_type` =\u003e ENUM ('full', 'diff')]:\n      - `full` =\u003e raw json format (for last - actual version)\n      - `diff` =\u003e (bytea format) bytes difference between current version and next one (all article versions, except actual one)\n\n- And users' records - `user_account`, with: `user_role`, `user_password`, `user_otp`\n\n### DB schema\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\".github/images/db_schema.png\" alt=\"DB schema\"/\u003e\n\u003c/p\u003e\n\n## Structure\n\n1. `/router`\n\n2. `/service` =\u003e entities flow logic\n3. `/repository` =\u003e DB interface\n\n   3.1. `/entity` =\u003e DB table model + service\n\n   3.2. `/db_schema` =\u003e full db schema description\n\n4. `/aggregation` =\u003e response aggregation models\n   \u003c/br\u003e\n   \u003c/br\u003e\n\n- `/test`\n- `/authorization` =\u003e auth flows (JWT generation, validation, roles\u0026permissions validation)\n- `/diff_handler` =\u003e module to handle difference bw strings (delta, patch)\n- `/dtm` =\u003e request models (dtos, bodies)\n- `/dtm_common` =\u003e inner dtm models (jwt, user_role...)\n- `/emailer` =\u003e send emails templates\n- `/error` =\u003e formatted error module\n- `/hasher` =\u003e argon (pwd) hasher\n- `/jwt_handler`\n\n## Swagger\n\nUI -\u003e http://0.0.0.0:8000/swagger\n\nvia [rocket_okapi](https://crates.io/crates/rocket_okapi)\n\n## Testing\n\n`/tests/entities` contains tests for each entity \u0026 flow separately.\n\nEach test uses `TestSetup` module to bypass single `Client` instance and DB connection mutex.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpetrenkovitaliy%2Fwiki_engine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpetrenkovitaliy%2Fwiki_engine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpetrenkovitaliy%2Fwiki_engine/lists"}