{"id":13550970,"url":"https://github.com/hiconvo/api","last_synced_at":"2025-04-03T01:30:48.950Z","repository":{"id":48500159,"uuid":"189318482","full_name":"hiconvo/api","owner":"hiconvo","description":"Convo's RESTful API","archived":false,"fork":false,"pushed_at":"2021-07-22T16:36:00.000Z","size":863,"stargazers_count":47,"open_issues_count":1,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-03T21:33:52.420Z","etag":null,"topics":["api","docker","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","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/hiconvo.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}},"created_at":"2019-05-30T00:34:33.000Z","updated_at":"2024-06-14T08:59:00.000Z","dependencies_parsed_at":"2022-07-25T23:17:21.130Z","dependency_job_id":null,"html_url":"https://github.com/hiconvo/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/hiconvo%2Fapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hiconvo%2Fapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hiconvo%2Fapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hiconvo%2Fapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hiconvo","download_url":"https://codeload.github.com/hiconvo/api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246921964,"owners_count":20855339,"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":["api","docker","golang"],"created_at":"2024-08-01T12:01:40.493Z","updated_at":"2025-04-03T01:30:45.367Z","avatar_url":"https://github.com/hiconvo.png","language":"Go","funding_links":[],"categories":["Go","golang"],"sub_categories":[],"readme":"# Convo API\n\n[![CircleCI](https://img.shields.io/circleci/build/github/hiconvo/api?label=circleci)](https://circleci.com/gh/hiconvo/api) [![codecov](https://img.shields.io/codecov/c/gh/hiconvo/api)](https://codecov.io/gh/hiconvo/api) [![goreportcard](https://goreportcard.com/badge/github.com/hiconvo/api)](https://goreportcard.com/badge/github.com/hiconvo/api)\n\nThe repo holds the source code for Convo's RESTful API. Learn more about Convo at [convo.events](https://convo.events).\n\n## Development\n\nWe use docker based development. In order to run the project locally, you need to create an `.env` file and place it at the root of the project. The `.env` file should contain a Google Maps API key, Sendgrid API key, and a Stream API key and secret. It should look something like this:\n\n```\nGOOGLE_MAPS_API_KEY=\u003cYOUR API KEY\u003e\nSENDGRID_API_KEY=\u003cYOUR API KEY\u003e\nSTREAM_API_KEY=\u003cYOUR API KEY\u003e\nSTREAM_API_SECRET=\u003cYOUR API SECRET\u003e\n```\n\nIf you don't include this file, the app will panic during startup.\n\nAfter your `.env` file is ready, all you need to do is run `docker-compose up`. The source code is shared between your machine and the docker container via a volume. The default command runs [`air`](https://github.com/cosmtrek/air), a file watcher that automatically compiles the code and restarts the server when the source changes. By default, the server listens on port `:8080`.\n\n### Running Tests\n\nRun `docker ps` to get the ID of the container running the API. Then run\n\n```\ndocker exec -it \u003cCONTAINER ID\u003e go test ./...\n```\n\nBe mindful that this command will *wipe everything from the database*. There is probably a better way of doing this, but I haven't taken the time to improve this yet.\n\n## Maintenance Commands\n\n```\n# Update datastore indexes\ngcloud datastore indexes create index.yaml\n\n# Delete unused indexes\ngcloud datastore cleanup-indexes index.yaml\n\n# Update cron jobs\ngcloud app deploy cron.yaml\n```\n\n## One-Off Commands\n\n```\n# Get credentials to connect to the production database. [DANGEROUS]\ngcloud auth application-default login\n\n# Run the command. Example:\ngo run cmd/migrate-message-timestamps-and-photos/main.go --dry-run\n\n# Clean up. [ALWAYS REMEMBER]\ngcloud auth application-default revoke\n```\n\n## Architecture\n\n![Architecture](architecture.jpg)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhiconvo%2Fapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhiconvo%2Fapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhiconvo%2Fapi/lists"}