{"id":41152670,"url":"https://github.com/alanta/bolt-comments","last_synced_at":"2026-01-22T19:11:41.938Z","repository":{"id":38383598,"uuid":"358367708","full_name":"alanta/bolt-comments","owner":"alanta","description":"Simple blog comments with Azure Functions","archived":false,"fork":false,"pushed_at":"2024-09-11T23:27:12.000Z","size":3637,"stargazers_count":4,"open_issues_count":8,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-03T11:40:55.603Z","etag":null,"topics":["azure-functions","comments","jamstack","swa"],"latest_commit_sha":null,"homepage":"https://bolt-demo.alanta.nl","language":"SCSS","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/alanta.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}},"created_at":"2021-04-15T19:17:03.000Z","updated_at":"2023-07-19T21:58:53.000Z","dependencies_parsed_at":"2024-01-15T19:58:27.447Z","dependency_job_id":"5d6d7dd4-d36d-4730-b3e9-05496cef5ba3","html_url":"https://github.com/alanta/bolt-comments","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/alanta/bolt-comments","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alanta%2Fbolt-comments","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alanta%2Fbolt-comments/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alanta%2Fbolt-comments/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alanta%2Fbolt-comments/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alanta","download_url":"https://codeload.github.com/alanta/bolt-comments/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alanta%2Fbolt-comments/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28668943,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T17:07:18.858Z","status":"ssl_error","status_checked_at":"2026-01-22T17:05:02.040Z","response_time":144,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["azure-functions","comments","jamstack","swa"],"created_at":"2026-01-22T19:06:51.434Z","updated_at":"2026-01-22T19:11:41.925Z","avatar_url":"https://github.com/alanta.png","language":"SCSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"﻿# ⚡ Bolt Comments\r\n\r\nSimple blog comments with Azure Functions\r\n\r\n## About this project\r\n\r\nThis project provides easy self-hosted comments for your blog, including a management app. It runs on an Azure Static Web App (SWA) in .NET 6 with Azure Functions v4.\r\nData is stored is Azure Storage Tables.\r\n\r\n### Project Status : _Beta_ ⚠\r\n\r\nThis project is still in development but it should be safe enough to use for small scale apps.\r\n\r\n### Features\r\n\r\n* Manage comments for your site\r\n* Comments are cleaned and stored as Markdown\r\n  * Allows images, links and most highlighting\r\n  * Bullet lists\r\n  * Headings 3 through 6 are allowed\r\n* Comments are grouped using a key, usually a url or slug (but that's up to you).\r\n* Webhooks:\r\n  * New comment - fires when a new comment is submitted\r\n  * Comment published - fires when a comments visibilty was changed\r\n* Secured Admin site\r\n* API using API Keys\r\n* Submit directly from an HTML form or through a REST call\r\n* Avatars using Gravatar\r\n* Mass import comments through the API\r\n\r\n![screenshot](https://raw.githubusercontent.com/alanta/bolt-comments/main/docs/bolt-screenshot.png \"Bolt Admin UI\")\r\n\r\n### Roadmap\r\n\r\n\r\n* Post / Reply in the admin UI\r\n* Edit comments in the admin UI\r\n* Sample code for API integration into a site\r\n* Swagger / API docs\r\n* Threaded comments\r\n* Sample code for SSG integration: Statiq, Hugo, Jekyll\r\n* Support for other Avatar services\r\n* Backup \u0026 restore\r\n* Spam filter\r\n* A hook to allow comment submisiion to be verified through e-mail\r\n* Easy one-click deploy (not supported by Azure Static Web Apps yet 🙁 )\r\n* Deploy from ARM templates (or Bicep)\r\n* Sign webhook requests so they can be validated\r\n\r\n## Deploy your own instance\r\n\r\nFor now, the easiest way is to fork this repo and deploy it from VS Code.\r\n\r\n* [Fork this repo](https://github.com/alanta/bolt-comments/generate) ✨\r\n* Delete the workflow from `.github/workflows` -  the next step will create a new workflow for your instance\r\n* Follow the guide on [creating an Azure Static Web App](https://docs.microsoft.com/en-us/azure/static-web-apps/getting-started?tabs=vanilla-javascript#create-a-static-web-app) to deploy Bolt as a static web app.\r\n  \u003cbr\u003eMake sure you select `React` for the defaults and accept other suggestions.\r\n  \u003cbr\u003eThat should create a fresh deployment workflow in your repo and will start deployment of the static web app.\r\n\r\n* Create an Azure Storage Account as a backing store.\r\n* In the Azure Portal, add the connectionstring for the storage account to the appsettings for the static web app:\r\n```json\r\n[\r\n  {\r\n    \"name\": \"DataStorage\",\r\n    \"value\": \"DefaultEndpointsProtocol=https;AccountName=***;AccountKey=***;EndpointSuffix=core.windows.net\"\r\n  }\r\n]\r\n```\r\n* Now open the _Role management_ tab and create an invitation for yourself with the `admin` role.\r\n* Use the invitation to login and claim your admin role.\r\n\r\nYour Bolt Comments instance is now ready to use 🎉.\r\n\r\n## Integrate with your site\r\n\r\nThere are two ways to integrate with your site. You can load the comments directly from the API or while regenerating your site using a Static Site Generator.\r\n\r\n### API based integration\r\n\r\n_TODO_\r\n\r\n#### CORS\r\n\r\nSince the API is hosted in a static webapp, you cannot configure CORS. You'll need to \r\n\r\n### Integrate with your SSG\r\n\r\n_TODO_\r\n\r\n### Use WebHooks to update your site\r\n\r\n* Setup a webhook to trigger your (partial) site rebuild.\u003cbr\u003e👉 This is not 'in the box', you should use a service like [Zapier](https://zapier.com/), [ITTT](https://ifttt.com/) or [Pipedream](https://pipedream.com) to connect to GitHub, Azure DevOps, Netlify or where ever you host your build.\r\n* Login to your Bolt Comments instance and configure the outgoing web hooks.\r\n\r\nThe data posted in the webhook looks like this:\r\n```json\r\n{\r\n  \"event\":\"Added\",\r\n  \"id\":\"86b08dd47b184a15b1c3edd0002648d5\", // the unique id of the comment\r\n  \"key\":\"/posts/cool-stuff\",\r\n  \"name\":\"Marnix\",\r\n  \"email\":\"marnix@alanta.nl\",\r\n  \"content\":\"Nice blog!\", // HTML version of the content\r\n  \"markdown\":\"Nice blog!\", // Markdown content\r\n  \"avatar\":\"https://www.gravatar.com/avatar/47ab6b5f378e25e3b3ecd2e215ec3c83?d=identicon\",\r\n  \"posted\":\"2021-05-21T14:52:12.4030345Z\",\r\n  \"approved\":false\r\n}\r\n```\r\n\r\n### Getting notifications\r\n\r\n* Setup a webhook to handle notifications to whatever channel you like; e-mail, Slack, Teams etc. \u003cbr\u003e\r\n👉 This is not 'in the box', you should use a service like [Zapier](https://zapier.com/), [ITTT](https://ifttt.com/) or [Pipedream](https://pipedream.com).\r\n* Login to your Bolt Comments instance and configure the outgoing web hooks.\r\n\r\n```json\r\n{\r\n  \"event\":\"Approved\", // or Rejected if the comment is removed after being published\r\n  \"id\":\"e1cd6a359b424139a7bbb9ad1ab88f08\", // the unique id of the comment\r\n  \"key\":\"/2021/04/manage-waf-rules-for-appgateway\",\r\n  \"name\":\"Marnix\",\r\n  \"email\":\"marnix@alanta.nl\",\r\n  \"content\":\"Hi!\", // HTML version of the content\r\n  \"markdown\":\"Hi!\", // Markdown version of the content\r\n  \"avatar\":\"https://www.gravatar.com/avatar/47ab6b5f378e25e3b3ecd2e215ec3c83?d=identicon\",\r\n  \"posted\":\"2021-05-06T21:29:51.7603431Z\",\r\n  \"approved\":true // false if rejected\r\n}\r\n```\r\n\r\n## Running this app on your local machine\r\n\r\nRequirements\r\n* [VS Code](https://code.visualstudio.com/)\r\n* [Azure Static Web Apps CLI](https://www.npmjs.com/package/@azure/static-web-apps-cli) (SWA CLI)\r\n* [Azurite](https://docs.microsoft.com/en-us/azure/storage/common/storage-use-azurite) or [Azure storage emulator](https://docs.microsoft.com/en-us/azure/storage/common/storage-use-emulator)\r\n\r\n\r\n## Project layout\r\n\r\n* `/api` The API built with Azure Functions \r\n* `/scr` The front-end application (built with React)\r\n* `/public` Static content for the front-end application.\r\n* `/build` The fully built web app\r\n\r\n## App development\r\n\r\nIn VS Code you can run the app from the terminal. I'm assuming you have the react tools installed as well as the SWA CLI.\r\nFrom a terminal window start the React dev server:\r\n\r\n`yarn start`\r\n\r\nThis will launch the react dev server on [http://localhost:1234](http://localhost:1234) . However Azure Static Web Apps use a proxy service to integrate functions, authentication and other features.\r\nSo in a new terminal run the full app using the Azure Static WebApp CLI:\r\n\r\n`swa start http://localhost:3000 --api-location ./api`\r\n\r\nThis should launch the Bolt UI on [http://localhost:4280/](http://localhost:4280/)\r\n\r\n## API Development\r\n\r\nIn VS Code: hit `ctrl-f5` to launch just the functions. Note that authentication relies on Static Web Apps, so you're probably better off running the integrated solution for most dev work.\r\n\r\n## Front-end development\r\n\r\nThe UI is a plain vanilla React app. In the project directory, you can run:\r\n\r\n* `yarn start` Runs the app in the development mode. Open [http://localhost:1234](http://localhost:1234) to view it in the browser.  \r\n  The page will reload if you make edits. You will also see any lint errors in the console.\r\n* `yarn build` Builds the app for production to the `build` folder.\\\r\nIt correctly bundles React in production mode and optimizes the build for the best performance.\r\n\r\n## Verifying SWA configuration\r\n\r\n_TODO_\r\n\r\n## FAQ\r\n\r\n### Why do I need an extra service to receive e-mails?\r\nThe intent of this project is to provide a simple but useful service. Integrating with an e-mail provider is not standardized and it seems a bit excessive to deploy, for example, a SendGrid instance just for this app.\r\nInstead you can configure a web hook and use a service like [Zapier](https://zapier.com/), [ITTT](https://ifttt.com/) or [Pipedream](https://pipedream.com).\r\n\r\n### Why are webhooks not out-of-band with retries?\r\nAzure Static Web Apps [do not support any other triggers than HTTP]() on the functions. This makes it really hard to do anthing but service incoming requests from the built-in functions. We may decide to host the functions in a separate function project in the future. See Azure/static-web-apps#389 and #2.\r\n\r\n## Credits\r\n\r\n* The UI is based on Bootstrap and the [Anchor UI Kit](https://wowthemesnet.github.io/Anchor-Bootstrap-UI-Kit/index.html) from Wowthemes.\r\n* The Bolt Comments logo is based on the FontAwesome bolt icon, [licensed](https://fontawesome.com/license/free) under Creative Commons Attribution 4.0 International license. \r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falanta%2Fbolt-comments","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falanta%2Fbolt-comments","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falanta%2Fbolt-comments/lists"}