{"id":19293673,"url":"https://github.com/tursodatabase/embedded-replicas-with-rust","last_synced_at":"2025-07-05T18:02:20.786Z","repository":{"id":228831001,"uuid":"774921665","full_name":"tursodatabase/embedded-replicas-with-rust","owner":"tursodatabase","description":"A simple web traffic analytics tracking API featuring Turso \u0026 Acti.","archived":false,"fork":false,"pushed_at":"2024-03-21T01:20:25.000Z","size":22,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-29T09:42:12.350Z","etag":null,"topics":["actix-web","libsql","rust","sqlite","turso"],"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/tursodatabase.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-03-20T12:50:58.000Z","updated_at":"2024-05-24T20:59:35.000Z","dependencies_parsed_at":"2024-03-20T17:59:54.837Z","dependency_job_id":"40c2a05a-6c52-45a9-9a4f-b63fd42af70d","html_url":"https://github.com/tursodatabase/embedded-replicas-with-rust","commit_stats":null,"previous_names":["tursodatabase/web_traffic_checker"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tursodatabase%2Fembedded-replicas-with-rust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tursodatabase%2Fembedded-replicas-with-rust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tursodatabase%2Fembedded-replicas-with-rust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tursodatabase%2Fembedded-replicas-with-rust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tursodatabase","download_url":"https://codeload.github.com/tursodatabase/embedded-replicas-with-rust/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249731414,"owners_count":21317342,"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","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","libsql","rust","sqlite","turso"],"created_at":"2024-11-09T22:35:45.237Z","updated_at":"2025-04-19T15:56:21.744Z","avatar_url":"https://github.com/tursodatabase.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Embedded Replicas with Rust\n\nA simple web traffic analytics tracking API featuring [Turso embedded replicas](https://docs.turso.tech/features/embedded-replicas) and [Actix](https://github.com/actix/actix-web).\n\n## Development\n\nCreate a turso database.\n\n```sh\nturso db create \u003cdb-name\u003e\n```\n\nGet the database credentials:\n\n```sh\n# db url\nturso db show --url \u003cdb-name\u003e\n\n# authentication token\nturso db tokens create \u003cdb-name\u003e\n```\n\nRename `.env.example` to `.env` and update the database credentials:\n\n```text\nTURSO_DATABASE_URL=\nTURSO_AUTH_TOKEN=\n```\n\n## Run project\n\n```sh\nmkdir -p db \u0026\u0026 cargo run\n```\n\n## Send Requests\n\nAdd a new hit:\n\n```sh\ncurl \"http://127.0.0.1:$PORT/record\" \\\n  -X POST \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"title\": \"About\",\"link\": \"about-page\"}'\n```\n\nGet traffic analytics for a page:\n\n```sh\ncurl \"http://127.0.0.1:$PORT/hits?link=about-page\"\n```\n\n\u003e [!Note]\n\u003e Info The `$PORT` above is the value you used in the `PORT` key inside the `.env` file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftursodatabase%2Fembedded-replicas-with-rust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftursodatabase%2Fembedded-replicas-with-rust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftursodatabase%2Fembedded-replicas-with-rust/lists"}