{"id":17948209,"url":"https://github.com/hez2010/yascs","last_synced_at":"2025-07-22T08:31:21.166Z","repository":{"id":54872015,"uuid":"328909119","full_name":"hez2010/Yascs","owner":"hez2010","description":"Yet Another Simple Chat Server written in Rust","archived":false,"fork":false,"pushed_at":"2021-01-23T13:58:07.000Z","size":29,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-29T09:02:49.218Z","etag":null,"topics":["actix-web","chat","diesel","message","rust","server","websocket"],"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/hez2010.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}},"created_at":"2021-01-12T07:41:05.000Z","updated_at":"2022-09-17T17:16:36.000Z","dependencies_parsed_at":"2022-08-14T05:20:28.820Z","dependency_job_id":null,"html_url":"https://github.com/hez2010/Yascs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hez2010/Yascs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hez2010%2FYascs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hez2010%2FYascs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hez2010%2FYascs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hez2010%2FYascs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hez2010","download_url":"https://codeload.github.com/hez2010/Yascs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hez2010%2FYascs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266456245,"owners_count":23931383,"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-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":["actix-web","chat","diesel","message","rust","server","websocket"],"created_at":"2024-10-29T09:02:50.216Z","updated_at":"2025-07-22T08:31:21.118Z","avatar_url":"https://github.com/hez2010.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Yet Another Simple Chat Server\n\n## Features\n- Messaging\n- Friend system\n- Realtime message streaming\n- Super fast and low resource usage\n\n## Prerequsities\n- Rust 1.49+\n- PostgreSQL 13+\n\n## Build\n```bash\ncargo build --release\n```\n\n## Database Migrations\nAdd PostgreSQL `bin` directory to environment variable `PATH`, and `lib` directory to environment variable `LIB`, and then install `diesel-cli`:\n\n```bash\ncargo install diesel_cli --no-default-features --features postgres\n```\n\nAfter installation, run:\n\n```bash\ndiesel migration run\n```\n\n## Run\nConfigure database connection url via environment variable first:\n\nBash：\n```bash\nexport DATABASE_URL=postgres://username:password@address/database\n```\n\nCMD：\n```bash\nset DATABASE_URL=postgres://username:password@address/database\n```\n\nPowerShell：\n```bash\n$env:DATABASE_URL=\"postgres://username:password@address/database\"\n```\n\nAdd PostgreSQL `bin` directory to environment variable `PATH`, and `lib` directory to environment variable `LIB`, and then you're ready to go.\n\n## API\n### Users `/api/user`\n#### Login `/login`\n```\nHTTP POST\nJSON { username: string, password: string }\n```\n#### Register `/register`\n```\nHTTP POST\nJSON { username: string, password: string, confirmPassword: string, email: string }\n```\n#### Logout `/logout`\n```\nHTTP POST\n```\n#### Reset Password `/password`\n```\nHTTP POST\nJSON { originalPassword: string, newPassword: string, confirmPassword }\n```\n#### Update Profiles `/profiles`\n```\nHTTP POST\nJSON { username: string, email: string, phone: string, location: string, age: number, gender: number, avatar: string }\n```\n#### Get Current Profiles `/profiles`\n```\nHTTP GET\n```\n#### Get User Profiles `/profiles/{userId}`\n```\nHTTP GET\n```\n#### Search Users `/search?patterns=string`\n```\nHTTP GET\n```\n#### Get Friends List `/friends`\n```\nHTTP GET\n```\n#### Add as Friend `/friends/{userId}`\n```\nHTTP POST\n```\n#### Delete Friend `/friends/{userId}`\n```\nHTTP DELETE\n```\n\n### Chat `/api/message`\n#### List Chat Sessions `/list`\n```\nHTTP GET\n```\n#### Get Session History `/history/{userId}`\n```\nHTTP GET\n```\n#### Send Message `/send`\n```\nHTTP POST\nJSON { toUser: number, messageType: number, message: string, quoteId: number }\n```\n#### Set Read Message `/read/{messageId}`\n```\nHTTP POST\n```\n#### Streaming Message `/stream`\n```\nWebSocket\n```\n\n### Response\n```\nJSON { status: boolean, code: number, data: object?, message: string? }\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhez2010%2Fyascs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhez2010%2Fyascs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhez2010%2Fyascs/lists"}