{"id":15354731,"url":"https://github.com/thedodd/giphy-api","last_synced_at":"2025-04-15T06:16:53.528Z","repository":{"id":73855220,"uuid":"177070412","full_name":"thedodd/giphy-api","owner":"thedodd","description":"A Rust WebAssembly web application \u0026 API.","archived":false,"fork":false,"pushed_at":"2020-04-16T02:53:18.000Z","size":2277,"stargazers_count":8,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-15T06:16:48.749Z","etag":null,"topics":["no-javascript","postgres","rust","wasm","webassembly"],"latest_commit_sha":null,"homepage":"https://thedodd.github.io/giphy-api/","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/thedodd.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":"2019-03-22T04:18:25.000Z","updated_at":"2024-03-24T03:31:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"f25b3ce1-af46-4891-975a-b02b7b02e4ee","html_url":"https://github.com/thedodd/giphy-api","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/thedodd%2Fgiphy-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thedodd%2Fgiphy-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thedodd%2Fgiphy-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thedodd%2Fgiphy-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thedodd","download_url":"https://codeload.github.com/thedodd/giphy-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249016643,"owners_count":21198833,"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":["no-javascript","postgres","rust","wasm","webassembly"],"created_at":"2024-10-01T12:20:44.426Z","updated_at":"2025-04-15T06:16:53.509Z","avatar_url":"https://github.com/thedodd.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"giphy api\n=========\nA WebAssembly application that allows a user to search for and save animated GIFs to a user profile using the [GIPHY API](https://developers.giphy.com/docs/).\n\n### overview\nThe API is structured as a very simple JSON RPC API built using [actix.rs](https://actix.rs/). The client \u0026 server use the same exact data models for communicating over the network. All interaction is protected by JWT authN/authZ.\n\nThe client app is a WebAssembly (WASM) application built using Rust \u0026 the [Seed framework](https://seed-rs.org).\n\nWe are using Postgres for data storage \u0026 [launchbadge/sqlx](https://github.com/launchbadge/sqlx) for the interface.\n\n#### setup\nFirst, you'll need Rust. Head on over to [rustup.rs](https://rustup.rs/) and follow the instructions there to setup the Rust toolchain. After that, let's also add the needed compiler target for the WASM instruction set:\n\n```bash\n# Add the WASM 32-bit instruction set as a compilation target.\nrustup target add wasm32-unknown-unknown\n# While we're at it, let's install the wasm-bindgen-cli\n# which we will need for our WASM builds.\ncargo install wasm-bindgen-cli --version=0.2.55\n```\n\nSecond, you'll need to have docker in place to run the Postgres database, check out the [docker installation docs](https://docs.docker.com/get-docker/) if you don't already have docker on your machine.\n\nNow that you have all of the tools in place, let's bring up the DB and build our Rust code.\n```bash\n# Boot Postgres. This will also initialize our tables.\ndocker run -d --name postgres \\\n    -e POSTGRES_PASSWORD=pgpass -p 54321:5432 \\\n    -v `pwd`/pg.sql:/docker-entrypoint-initdb.d/pg.sql \\\n    postgres\n# Build the UI.\ncargo build -p client --release --target wasm32-unknown-unknown\n# Run wasm-bindgen on our output WASM.\nwasm-bindgen target/wasm32-unknown-unknown/release/client.wasm --no-modules --out-dir ./static\n# Now, we run our API which will also serve our WASM bundle, HTML and other assets.\ncargo run -p server --release\n```\n\nNow you're ready to start using the app. Simply navigate to [localhost:9000](http://localhost:9000) to get started.\n\n----\n\n### demo images mobile\n\u003cp\u003e\n    \u003cimg height=\"300px\" src=\"./book/images/0-login.png\"/\u003e\n    \u003cimg height=\"300px\" src=\"./book/images/1-search.png\"/\u003e\n    \u003cimg height=\"300px\" src=\"./book/images/2-navbar.png\"/\u003e\n    \u003cimg height=\"300px\" src=\"./book/images/3-search-results.png\"/\u003e\n    \u003cimg height=\"300px\" src=\"./book/images/4-favorites-and-categorization.png\"/\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthedodd%2Fgiphy-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthedodd%2Fgiphy-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthedodd%2Fgiphy-api/lists"}