Skip to content
WC.

GitHub as Your Backend

2 min readInfrastructure
#github#giscus#static-sites

You can run a static site with comments and activity without running a database or an API. The trick is to treat GitHub as the backend you never have to operate.

Identity, storage, and activity usually mean auth, a database, and something that updates in real time. For a personal site or a small project, that's a lot of moving parts.

I wanted readers to comment and I wanted to show recent workwithout standing up another service or paying for a comment SaaS. So I unified both behind the same platform: GitHub.

Comments come from Giscus. It embeds GitHub Discussions into the page. Each article or project gets one discussion; commenters sign in with GitHub and reply there. No tables, no moderation UI of my ownjust the repo's Discussions tab.

The contribution graph is the other half. I fetch it at build time via the GraphQL API, write the result to a JSON file in public/, and the homepage reads it like any other static asset. Same identity, same platform. One place for who said what and what got done.

The tradeoffs are explicit. Only people with a GitHub account can comment. If that's your audiencedevelopers, open-source contributors, technical readersit's a reasonable constraint.

The contribution data is as fresh as the last deploy. I'm not showing live activity; I'm showing a snapshot from the last build. For a personal site, that's enough. Nobody needs a real-time feed of my commits.

So the backend is GitHub: identity via OAuth and usernames, storage via Discussions and the API, activity via the contribution calendar. I don't run it. I don't scale it. I don't patch it.

The site stays static, the stack stays minimal, and the only thing I maintain is the content and the build. For a lot of small sites, that's the right tradeone platform you don't run, and a deploy that stays boring.

Read Next

I wanted a comment section on writing and project pages without running a database or a custom API. Static sites are great until you need state that lives…

2 min readInfrastructure
giscuscommentsstatic-sites

Most advice for sending a recurring digest assumes you need a scheduler. A cron job, a Lambda on a timer, or a hosted service that runs "every Tuesday at 9."…

3 min readInfrastructure
newsletterstatic-sitesci