DEV Community

Cover image for Build a Forum Site with GitHub Discussions (No Backend or Database)
Reece Harris
Reece Harris

Posted on

Build a Forum Site with GitHub Discussions (No Backend or Database)

Community forums are still one of the best ways to collect feedback, answer questions, and build discussions around a project. The problem is that most forum software comes with a lot of overhead. You need a server, a database, authentication, moderation tools, and ongoing maintenance before anyone can even create their first post.

I wanted something much simpler.

That's why I built git-forums—a SvelteKit-powered forum template that uses GitHub Discussions as the backend. If your project already lives on GitHub, you can turn its Discussions section into a fully featured forum website without setting up any additional infrastructure.

The result is a fast, static website that can be deployed directly to GitHub Pages while GitHub handles discussions, replies, user accounts, reactions, and moderation.

Why use GitHub Discussions?

GitHub Discussions already provides most of the features you'd expect from a forum. Rather than rebuilding those features from scratch, this project uses them as the foundation for the site.

Discussion categories become forum sections, individual discussions become posts, and replies are displayed as threaded conversations. Reactions, user profiles, and moderation all continue to work through GitHub, so there isn't another system to maintain.

Search is also handled through GitHub Discussions, making it easy for users to find existing conversations.

If your community is already on GitHub, it makes sense to use the tools that are already there.

Features

The project includes everything needed to get a forum online quickly:

  • No backend server
  • No database
  • Static site generation
  • Deploys to GitHub Pages
  • Built with Svelte 5, SvelteKit and Tailwind CSS v4
  • GitHub-flavoured Markdown support
  • Configurable administrator badges
  • Optional GitHub OAuth sign-in
  • Responsive interface
  • Dark mode support
  • Search, reactions and upvotes

How it works

The site fetches data from the GitHub GraphQL API and renders your repository's Discussions as forum content.

Because the application is generated as a static site, hosting is inexpensive and straightforward. Dynamic forum pages are loaded client-side while GitHub continues to manage the discussions themselves.

This means you get the benefits of a static website without sacrificing the functionality users expect from a forum.

Getting started

Getting a forum online only takes a few steps:

  1. Fork the repository or create a new project from the template.
  2. Enable GitHub Discussions for your repository.
  3. Create your discussion categories.
  4. Enable GitHub Pages using GitHub Actions.
  5. Push your changes to main.

Once the workflow completes, your forum is live.

Configuration

Most configuration lives in a single forum.config.ts file.

From there you can customise your site's branding, navigation, repository settings, administrator list, feature flags, page behaviour, and theme colours without digging through the application.

This makes it easy to adapt the template for different projects while keeping updates straightforward.

Who is it for?

I built this primarily for developer communities, but it should also work well for:

  • Open source projects
  • Documentation sites
  • Product feedback portals
  • Support communities
  • Internal developer tools
  • Teams that already use GitHub and don't want another platform to manage

Final thoughts

There are plenty of excellent forum platforms available, but they're often more than smaller projects actually need.

If your community already uses GitHub, you probably don't need another backend, another database, or another authentication system. GitHub Discussions already provides those building blocks, and git-forums simply presents them as a modern forum website.

If that sounds useful, I'd love to hear what you think or see what you build with it.

Repository: https://github.com/NotReeceHarris/git-forums

Top comments (0)