{"id":42908885,"url":"https://github.com/brewpipeline/blog-server","last_synced_at":"2026-05-19T00:12:01.287Z","repository":{"id":174810635,"uuid":"652730511","full_name":"brewpipeline/blog-server","owner":"brewpipeline","description":"Blog Server made with Screw/Hyper/Rbatis/PostgreSQL","archived":false,"fork":false,"pushed_at":"2025-08-28T22:33:55.000Z","size":324,"stargazers_count":3,"open_issues_count":8,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-29T02:48:41.719Z","etag":null,"topics":["hyper","postgresql","rbatis","rust","screw","ssr"],"latest_commit_sha":null,"homepage":"https://github.com/brewpipeline/blog-ui","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/brewpipeline.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-06-12T17:16:27.000Z","updated_at":"2025-08-16T09:41:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"d28a911c-21ea-4b8e-9767-d8f92ae32996","html_url":"https://github.com/brewpipeline/blog-server","commit_stats":null,"previous_names":["tikitko/blog-server","brewpipeline/blog-server"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/brewpipeline/blog-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brewpipeline%2Fblog-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brewpipeline%2Fblog-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brewpipeline%2Fblog-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brewpipeline%2Fblog-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brewpipeline","download_url":"https://codeload.github.com/brewpipeline/blog-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brewpipeline%2Fblog-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28915939,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T16:37:38.804Z","status":"ssl_error","status_checked_at":"2026-01-30T16:37:37.878Z","response_time":66,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["hyper","postgresql","rbatis","rust","screw","ssr"],"created_at":"2026-01-30T16:54:18.072Z","updated_at":"2026-05-19T00:12:01.279Z","avatar_url":"https://github.com/brewpipeline.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# blog-server\n\n[![Deploy on Railway](https://railway.com/button.svg)](https://railway.com/deploy/ft_i14?referralCode=ajW30i\u0026utm_medium=integration\u0026utm_source=template\u0026utm_campaign=generic)\n\nA modular blog platform written in Rust.  The project exposes a HTTP API for posts,\ncomments and author management while broadcasting events to Telegram and Discord.\nThe server is built on top of the [Screw](https://github.com/Tikitko/screw) ecosystem,\n[Hyper](https://hyper.rs/) for the HTTP layer and [Rbatis](https://rbatis.github.io/rbatis.io)\nfor database access with PostgreSQL. The web front-end lives in the\n[blog-ui](https://github.com/brewpipeline/blog-ui) repository.\n\n## UI Repository\n\nThe user-facing website is developed separately in the\n[`blog-ui`](https://github.com/brewpipeline/blog-ui) repository. It provides\nthe front-end that consumes this API and offers server-side rendering support\nwhen the `ssr` feature is enabled. Check that repository for instructions on\nbuilding and running the web interface.\n\n## Workspace Layout\n\nThis repository is a Cargo workspace made up of several crates:\n\n| Crate | Description |\n| ----- | ----------- |\n| `blog-server-api` | HTTP entry point, request routing and middleware setup. |\n| `blog-server-services` | Service layer with implementations for posts, comments, authors and social integrations. |\n| `blog-generic` | Shared domain entities, events and utilities used by other crates. |\n\n## Features\n\n* CRUD operations for posts and comments.\n* Author profiles with subscription management and optional social data.\n* JSON based API with automatic request/response handling.\n* Optional server‑side rendering through the [`blog-ui`](https://github.com/brewpipeline/blog-ui) crate (`--features ssr`).\n* Optional login via Yandex or Telegram (`--features yandex` or `--features telegram`).\n* Event broadcasting through RabbitMQ, Telegram bots and Discord webhooks.\n* Configuration driven notifications via `config.yaml`.\n\n## Requirements\n\n* [Rust](https://www.rust-lang.org/) toolchain (1.70 or later recommended)\n* PostgreSQL database\n* Optional: RabbitMQ for the event bus\n* Optional: [`blog-ui`](https://github.com/brewpipeline/blog-ui) repository when using server‑side rendering\n\n## Configuration\n\nCompilation relies on a few environment variables.  They must be supplied at build\nor run time:\n\n```bash\nexport SITE_URL=\"http://127.0.0.1:3000\"\nexport JWT_SECRET=\"changeme\"\nexport SERVER_ADDRESS=\"127.0.0.1:3000\"\nexport PG_URL=\"postgres://postgres:postgres@localhost:5432/blog\"\nexport RABBIT_URL=\"amqp://guest:guest@localhost:5672/\"\nexport TELEGRAM_BOT_TOKEN=\"0000000:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\n```\n\nRuntime configuration such as Telegram chat IDs or Discord webhooks is stored in\n`config.yaml`.\n\n## Running\n\n1. Ensure PostgreSQL is running and matches the `PG_URL` connection string.\n2. Adjust `config.yaml` for notification channels if necessary.\n3. Start the server:\n\n```bash\ncargo run -p blog-server-api\n```\n\nOn start up the server applies database migrations, connects to RabbitMQ if\navailable and listens on `SERVER_ADDRESS`.\n\n## API Overview\n\nThe router exposes a JSON API under the `/api` path.  A selection of routes:\n\n* `GET /api/posts` – list published posts\n* `GET /api/post/{id}` – retrieve a single post\n* `POST /api/post` – create a post\n* `PATCH /api/post/{id}` – update a post\n* `DELETE /api/post/{id}` – delete a post\n* `GET /api/comments/{post_id}` – list comments for a post\n* `POST /api/comment` – create a comment\n* `GET /api/author/me` – current author profile\n* `POST /api/login` – password based login\n\nMany additional endpoints handle author management, subscriptions and searching.\nSee `router.rs` for the full list.\n\n## Testing\n\nRun the complete test suite for all workspace members with:\n\n```bash\ncargo test\n```\n\n## License\n\nLicensed under the [MIT license](LICENSE).\n\n## Contributing\n\nIssues and pull requests are welcome.  Please open an issue describing the change\nor bug before submitting a pull request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrewpipeline%2Fblog-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrewpipeline%2Fblog-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrewpipeline%2Fblog-server/lists"}