{"id":26608392,"url":"https://github.com/tiim/indiego","last_synced_at":"2025-04-09T22:10:35.338Z","repository":{"id":44155432,"uuid":"501822253","full_name":"Tiim/IndieGo","owner":"Tiim","description":"Tiny go api that serves your websites comments. The comments are stored in a lightweight sqlite database.","archived":false,"fork":false,"pushed_at":"2023-08-02T05:57:11.000Z","size":344,"stargazers_count":12,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-23T23:52:25.032Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Tiim.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":"2022-06-09T22:08:03.000Z","updated_at":"2024-11-10T22:38:14.000Z","dependencies_parsed_at":"2023-02-14T01:31:49.911Z","dependency_job_id":null,"html_url":"https://github.com/Tiim/IndieGo","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/Tiim%2FIndieGo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tiim%2FIndieGo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tiim%2FIndieGo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tiim%2FIndieGo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tiim","download_url":"https://codeload.github.com/Tiim/IndieGo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248119294,"owners_count":21050755,"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":"2025-03-23T23:52:34.163Z","updated_at":"2025-04-09T22:10:35.318Z","avatar_url":"https://github.com/Tiim.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IndieGo\n\nThis project is a simple, modular but extendable webserver to enable your website to join the [IndieWeb](https://indieweb.org).\n\nIndieGo currently supports native comments, sending and receiving [webmentions](https://indieweb.org/Webmention), [IndieAuth](https://indieweb.org/IndieAuth) as well as [Micropub](https://indieweb.org/Micropub). All components are built in a modular way, they can be extended for your own needs or disabled by just commenting them out in the [main method](/main.go). \n\nThe API can be queried for comments and webmentions of all pages or just of a single page. \n\n\u003e [Blogposts about IndieGo](https://tiim.ch/tags/indiego)\n\n![Image of the Go gopher with a speech bubble](/go-comment-api-image.svg)\n\n## Demo\n\nYou can try out this project on my [Blogpost about this project](https://tiim.ch/blog/2022-07-12-first-go-project-commenting-api).\n\n## Installation\n\n### Using docker\n\nThe easiest way to run the go-comment-api is via docker compose. There is a [sample docker-compose.yml](/docker-compose.yml) that I use to host the comments for my website. To see how I deploy it on my webserver see [deploy.sh](/deploy.sh).\n\n\n- TODO: document how to use the [default config](config.json) with env variables.\n- TODO: document how to use a custom config file.\n\n### Compile it to a static binary\nYou need a recent go version installed. Run the following command to compile:\n\n```sh\ngo mod download\nCGO_ENABLED=0 go build -o comment-api -a .\n```\n\nThis binary is self contained and only needs a config file to run. Run it with \n```sh\n./comment-api -config config.json\n```\n\nFor an example config file see [config.json](config.json).\n\n## Development\n\n### Running Tests\n\n```sh\ngo test ./...\n```\n\n### Running migrations in the cli\n\n```sh\n# Up\ngoose -dir model/sqlite-migrations/ sqlite3 db/comments.sqlite up\n# Down\ngoose -dir model/sqlite-migrations/ sqlite3 db/comments.sqlite down\n```\n\n### Tools\n\n#### Exposing tunnel to the web\n\n```\nnpx ngrok http 8080\n```\n\nFor testing IndieAuth:\n\n```\nNGROK_URL=https://\u003cngok-url\u003e go run . -config config-local.json\n```\n\n#### Testing indieauth websub / indie reader with aperture\n\n- Expose app to web via ngrok\n- Register with ngrok url\n- Restart app with `APPERTURE_ID=xxx`\n\n\n#### Node Webmention Testpinger\n\n[Source](https://github.com/voxpelli/node-webmention-testpinger)\n\n- `npx webmention-testpinger --endpoint=http://localhost:8080/wm/webmentions --target https://tiim.ch/target -p 8081`\n- `npx webmention-testpinger --endpoint=http://localhost:8080/wm/webmentions --target http://localhost:5173/projects/lenex-split-sheet -p 8081`\n\n#### Sending single webmention with curl\n\n```sh\ncd test-data/\npython3 -m http.server\ncurl -i -d source=http://localhost:8000/html/webmention-rocks.html -d target=https://tiim.ch/blog/2022-07-12-first-go-project-commenting-api http://localhost:8080/wm/webmentions\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftiim%2Findiego","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftiim%2Findiego","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftiim%2Findiego/lists"}