{"id":17939982,"url":"https://github.com/thor314/zkhn-rust-api","last_synced_at":"2026-01-21T15:33:23.172Z","repository":{"id":223400088,"uuid":"760159644","full_name":"thor314/zkhn-rust-api","owner":"thor314","description":"backend for zkhn site","archived":false,"fork":false,"pushed_at":"2024-08-06T17:39:33.000Z","size":370,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-08T07:55:41.520Z","etag":null,"topics":[],"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/thor314.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-MIT","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":"2024-02-19T22:25:44.000Z","updated_at":"2024-08-06T17:39:37.000Z","dependencies_parsed_at":"2024-03-04T18:34:37.162Z","dependency_job_id":"3ae18aa1-da28-4e29-904c-25cb46795d8a","html_url":"https://github.com/thor314/zkhn-rust-api","commit_stats":null,"previous_names":["thor314/zkhn-rust-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thor314/zkhn-rust-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thor314%2Fzkhn-rust-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thor314%2Fzkhn-rust-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thor314%2Fzkhn-rust-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thor314%2Fzkhn-rust-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thor314","download_url":"https://codeload.github.com/thor314/zkhn-rust-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thor314%2Fzkhn-rust-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28635900,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T15:01:31.228Z","status":"ssl_error","status_checked_at":"2026-01-21T14:42:58.942Z","response_time":86,"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":[],"created_at":"2024-10-29T00:45:27.055Z","updated_at":"2026-01-21T15:33:23.155Z","avatar_url":"https://github.com/thor314.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zkhn-rust-api\n![](https://img.shields.io/badge/made_by_cryptograthor-black?style=flat\u0026logo=undertale\u0026logoColor=hotpink)\n![](https://github.com/thor314/zkhn-rust-api/actions/workflows/ci.yml/badge.svg)\n\u003c!-- [![crates.io](https://img.shields.io/crates/v/zkhn-rust-api.svg)](https://crates.io/crates/zkhn-rust-api) --\u003e\n\u003c!-- [![Documentation](https://docs.rs/zkhn-rust-api/badge.svg)](https://docs.rs/zkhn-rust-api) --\u003e\n\n## Run locally\nYou will need Rust, `cargo-shuttle`, `sqlx-cli`, Docker, and postgres installed.\n\n### install\n```sh\n### Rust:\n# If you do not have rust installed:\ncurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\n# If you have not updated rust recently, you may need to run: \nrustup update\n\n## we use the nightly toolchain, specified in rust-toolchain.toml. \n## This line is only for documentation, you shouldn't have to change anything.\n```\n\n### Install cargo-shuttle:\n```sh\ncargo install cargo-binstall # fast-installer for rust binaries\ncargo binstall -y cargo-shuttle \ncargo binstall -y sqlx-cli\n```\n\n### Cargo Shuttle updates versions often - you may need to update it:\n```sh\ncargo binstall -y cargo-update     # fast binary updater\ncargo install-update cargo-shuttle # update cargo shuttle\n```\n\n### Postgres installation and setup\nDebian:\nIf `systemctl status postgresql` does not show active, follow steps 1 and 2:\n1. Install PostgreSQL\n   `sudo apt-get install postgresql`\n2. Start the PostgreSQL service\n   `sudo service postgresql start`\n3. Switch to the PostgreSQL user\n   `sudo -i -u postgres`\n\nmacOS:\nIf `brew services info postgresql` does not show active, follow steps 1 and 2:\n1. Install PostgreSQL\n   - Download and install the PostgreSQL installer from https://www.postgresql.org/download/macosx/\n   - Or, if you have Homebrew, run `brew install postgresql`\n2. Start the PostgreSQL service\n   `brew services start postgresql` (if installed via Homebrew)\n   Or, start the service manually if installed via the installer\n3. Switch to the PostgreSQL user\n   `sudo -u postgres psql`\n\nCommon steps for both platforms:\n\n4. Create a new PostgreSQL user (optional)\n   `createuser --interactive --pwprompt`\n5. Create a new database\n   `createdb tk-shuttle-zkhn-rust-api3`\n6. Grant privileges to your user, replacing `$YOUR_USER`\n   ```\n   psql tk-shuttle-zkhn-rust-api3\n   GRANT ALL PRIVILEGES ON DATABASE tk-shuttle-zkhn-rust-api3 TO $YOUR_USER;\n   ```\n7. Exit the PostgreSQL prompt `quit` or `ctrl/cmd-d`\n\n\n### run the server\nWe should now be able to run the server (yay!)\n\n```sh\n./run.sh\n\n# in another terminal:\ncurl 127.0.0.1:8000/health\n# expect: ok\n\n# verify that we can create a user:\ncurl -X POST \\\n     -H \"Content-Type: application/json\" \\\n     -d '{\n           \"username\": \"alice\",\n           \"password\": \"bob_is_lame\",\n           \"email\": \"alice@example.com\",\n           \"about\": \"This is an about string\" \n         }' \\\n     http://localhost:8000/users\n\n# now get the user:\ncurl -X GET http://localhost:8000/users/alice\n\n# expect:\n# {\"username\":\"alice\", ... }\n```\n\nIf `cargo shuttle run` gives an error about docker on MacOS, run `brew install --cask docker`, open Docker (GUI) in /Applications, check that docker is running via `docker info`.\n\n### Documentation\nrun `cargo shuttle run` and visit `localhost:8000/docs/rapidoc` for route documentation. \n\n🏗️ API is currently under construction: not all routes may function as expected! 🏗️\n\n## Deploy to Shuttle\n```sh\ncargo shuttle project start # only needed the first time\ncargo shuttle deploy\n```\n\n## License\nLicensed under your option of either:\n- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n- MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\n## Contribution\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you, as defined in the Apache-2.0 license, shall be\ndual licensed as above, without any additional terms or conditions.\n \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthor314%2Fzkhn-rust-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthor314%2Fzkhn-rust-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthor314%2Fzkhn-rust-api/lists"}