{"id":18860784,"url":"https://github.com/666rayen999/awth","last_synced_at":"2026-04-30T19:32:35.195Z","repository":{"id":252127906,"uuid":"839506627","full_name":"666rayen999/Awth","owner":"666rayen999","description":"Awth is a Rust library designed to simplify database management and Authentication. With macros, you can easily create databases and collections, and perform operations like load, save, update, and delete. Optimized with async IO functionality for efficient performance.","archived":false,"fork":false,"pushed_at":"2024-08-15T15:31:18.000Z","size":51,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-30T08:56:13.169Z","etag":null,"topics":["blazingly-fast","collections","crate","database","easy","efficient","rust"],"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/666rayen999.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":"2024-08-07T18:45:30.000Z","updated_at":"2024-08-15T15:31:21.000Z","dependencies_parsed_at":"2024-11-08T04:28:49.719Z","dependency_job_id":null,"html_url":"https://github.com/666rayen999/Awth","commit_stats":null,"previous_names":["666rayen999/awth"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/666rayen999/Awth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/666rayen999%2FAwth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/666rayen999%2FAwth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/666rayen999%2FAwth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/666rayen999%2FAwth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/666rayen999","download_url":"https://codeload.github.com/666rayen999/Awth/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/666rayen999%2FAwth/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32475192,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"last_error":"SSL_read: 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":["blazingly-fast","collections","crate","database","easy","efficient","rust"],"created_at":"2024-11-08T04:26:46.060Z","updated_at":"2026-04-30T19:32:35.179Z","avatar_url":"https://github.com/666rayen999.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Awth\n\n### Overview\n`Awth` is a Rust library designed to simplify database management. With macros, you can easily create databases and collections, and perform operations like load, save, update, and delete. Optimized with async IO functionality for efficient performance.\n\n### Features\n- Easy creation of collections using macros\n- Simple load, save, update, and delete operations\n- Tiny file size for efficient storage\n- Asynchronous IO for non-blocking operations\n- Blazingly FAST\n\n### Goals (TODO)\n- [X] Add Post/Get functionality (axum)\n- [.] JWT Authentication\n- [ ] More Optimizations (Compressing files, Faster functions: Adding, Removing, Updating, ...)\n\n[ curl -i -X GET -H 'Content-Type: application/json' -d '{\"user\": \"666rayen999@gmail.com\", \"password\": \"123\"}' http://0.0.0.0:3000/api/user ]\n[ curl -i -X POST -H 'Content-Type: application/json' -d '{\"username\": \"rayen\", \"email\": \"666rayen999@gmail.com\", \"password\": \"123\"}' http://0.0.0.0:3000/api/user ]\n\n### Usage\n```rust\n// Creation\n//    collection_name\n//            | document_name\n//            |     |\n//            v     v\ncollection!(Posts, Post, {\n    // id added by default\n    caption: String\n}, \"test/posts.db\");\n//         ^\n//         |\n//    path/file_name\n\ncollection!(Users, User, {\n    username: String,\n    email: String,\n    hashed_password: String,\n}, [posts(post_ids): Posts], \"test/users.db\");\n//    ^    ^           ^\n//    |    |           |\n// ref vec |          type\n//      ids vec\n\n#[tokio::main]\nasync fn main() {\n    // Loading\n    //                     ( create empty collection if file doesnt exist )\n    //                                          |\n    //                                          v\n    let posts = Posts::load().await.unwrap_or_default();\n    let mut users = Users::load().await.unwrap_or_default().optimize(\u0026posts);\n    //                                                                  ^\n    //                                                                  |\n    //                                        ptimization: add vec of refs instead of searching by id)\n\n    // Add Document\n    users.add(User {\n      id: 1, // must be unique to add\n      username: \"username\".into(),\n      email: \"email@email.com\".into(),\n      hashed_password: \"hcuiehiyiudezuiicjsdkvjnsnqjkcqsc\".into(),\n    });\n\n    // Updating\n    users.update(User {\n      id: 1, // ID of the user you want to update\n      username: \"username_2\".into(),\n      email: \"email_2@email.com\".into(),\n      hashed_password: \"ioduiaejhckjsdccnjazejhzkeac\".into(),\n    });\n\n    // Removing by ID\n    // id with type ID (u128)\n    users.remove(1);\n\n    // Getting Data\n    // 1- By ID\n    let Some(user) = users.get(1) {\n      // user exists\n    }\n    // 2- All (iter / iter_mut)\n    users\n        .iter()\n        .filter(|u| u.username.len() \u003e 5)\n        .for_each(|u| println!(\"{}\", u.id));\n\n    // Saving\n    users.save().await.expect(\"ERROR: couldn't save\");\n}\n```\n\n### Contributing\nContributions are welcome!\n\n### License\n`Awth` is licensed under the MIT License.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F666rayen999%2Fawth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F666rayen999%2Fawth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F666rayen999%2Fawth/lists"}