{"id":17302345,"url":"https://github.com/coriolinus/sonar_api_rs","last_synced_at":"2025-03-26T22:24:11.431Z","repository":{"id":79236126,"uuid":"105501161","full_name":"coriolinus/sonar_api_rs","owner":"coriolinus","description":null,"archived":false,"fork":false,"pushed_at":"2017-10-25T14:32:47.000Z","size":45,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-01T04:16:20.919Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coriolinus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2017-10-02T05:31:46.000Z","updated_at":"2017-10-31T00:42:21.000Z","dependencies_parsed_at":"2023-06-25T20:30:25.001Z","dependency_job_id":null,"html_url":"https://github.com/coriolinus/sonar_api_rs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coriolinus%2Fsonar_api_rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coriolinus%2Fsonar_api_rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coriolinus%2Fsonar_api_rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coriolinus%2Fsonar_api_rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coriolinus","download_url":"https://codeload.github.com/coriolinus/sonar_api_rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245744318,"owners_count":20665258,"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":[],"created_at":"2024-10-15T11:47:15.979Z","updated_at":"2025-03-26T22:24:11.415Z","avatar_url":"https://github.com/coriolinus.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sonar\n\n_We're not just ships passing in the night; we're submarines lost in the depths, wholly invisible to each other until we actively ping._\n\n`sonar` is a basic Twitter clone, intended to run on a free-tier AWS stack as a demonstration project for my portfolio. Still, maybe it could take off and turn me into an internet billionaire, right?\n\n## Intended features\n\nThese features need to be implemented in order for me to consider this a complete demo project.\n\n- [ ] user signup / authentication\n- [ ] user profiles (handle, real name, brief bio)\n- [ ] user can create a `ping`: short message up to 140 chars\n- [ ] user view showing most recent pings\n- [ ] follow another user\n- [ ] timeline view showing your pings and those of those people you follow\n- [ ] timeline will only ever be linear\n- [ ] http addresses auto-expand into links\n- [ ] individual ping permalink view\n- [ ] individual ping replies view\n- [ ] user tags link to user view\n- [ ] mentions view showing people writing about you\n- [ ] block another user (they cannot see you; you cannot see them)\n- [ ] user notifications on tagging\n- [ ] hashtags / hashtag search view\n\n## Horizon features\n\nThese features would be great, but probably won't happen unless this starts to get a real userbase.\n\n- [ ] users can 'like' pings\n- [ ] liked pings view\n- [ ] users can 'echo' (retweet) pings. probably just links to it; we don't want the one-button retweet culture from twitter.\n- [ ] password reset via email feature\n- [ ] email notifications on mentions\n- [ ] general search\n- [ ] report a ping/user (don't want to take twitter's cavalier attitude against the trolls)\n- [ ] inline photos / video\n- [ ] log in with twitter to import your contacts\n- [ ] twitter bot using sentiment analysis and search to find tweets criticizing twitter, ideally for non-linear-timeline or terrible troll issues, and suggesting sonar as a replacement.\n\n## Architecture\n\nThis project is the backend to the sonar website, implementing all features via a REST API. It's built in [rust](https://www.rust-lang.org/en-US/) using [rocket](https://rocket.rs/). I've done a lot of REST API development using Python/Django/DRF, and a lot of rust development, but this is my first time attempting to write an API in rust. The performance stats look good, and I really like Rust, so we'll see how this goes.\n\nI'll build a frontend later, probably as a separate project.\n\nThe general idea is to build a simple, single-server implementation as proof of concept. Most likely, this will only ever run on AWS free tier machines, so we want to keep things simple. This will expect to talk to a single database without any sort of caching until demand makes something else necessary. The rocket framework promises that it will one day [handle async I/O for us transparently](https://github.com/SergioBenitez/Rocket/issues/17), and there's no point worrying about too much caching / sharding issues until the userbase takes off.\n\nNote that some design decisions are driven by this being essentially an MVP demo project. For example, we're using direct access to a Sqlite DB instead of building directly for Postgres; unlike a Django project, this incurs non-trivial cost if and when we do upgrade, because the migrations are all written by hand and will need to be rewritten for Postgres's more complex data types. However, it's much simpler and quicker to start hacking with Sqlite instead of needing to deploy a PG instance. If I expected this to go places and grow, if I were coding this for a client, I'd advise doing the right thing from the beginning and working with Postgres from the start, but as this is a demo project, convenience now trumps possible inconvenience later.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoriolinus%2Fsonar_api_rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoriolinus%2Fsonar_api_rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoriolinus%2Fsonar_api_rs/lists"}