I recently migrated my personal website from WordPress to Astro, and I absolutely adore the speed, the simplicity, the zero-JS by default with all the flexibility it offers. But before I made the switch, there was one glaring issue that held me back. I needed a comment system that'd adhere to the standards I set for my Astro website - simple, accessible, and fast.
For a static site (and even the ones with headless CMS) the easy and popular move is to slap a third-party widget like Disqus at the bottom of the posts and hand over the users' data, or maybe even pay a subscription fee, and call it a day.
But I needed a comment system that'd play well with my Astro site and at the same time help me retain control over the comment data. I looked around for self-hosted options, but honestly nothing really suited my taste. Most of the solutions like Giscus or Utterances leveraged Github discussions, focusing only on the developer community, and systems like Isso or Remark42 didn't fit the bill. They're great comment-systems, but too many features for my taste.
So I built Discuss.
A simple node-based comment server with SQLite.
If you’re a newer dev looking to understand how a microservice fits into a static site architecture, or just someone wanting a clean comment section without the bloat, here is a look under the hood.
Keeping it simple and straightforward
What would a modern barebones comment-system look like? How would it fight complexity? To answer these, I ruthlessly cut down the scope. To keep things stupidly simple.
Coming from a Python background, I initially considered Python frameworks like Flask and FastAPI, but I ultimately adopted a JavaScript-based stack for several technical efficiencies. Node.js simply bypasses the relative complexity of wrestling with the Python Web Server Gateway Interface (WSGI) layer for beginners. Node simplifies deployment. And as most static site generators are JS based, you don't need context switching to a new language. Codebase gets easier to maintain.
Said that, given the application's requirement for primarily handling text inputs without necessitating a monolithic backend, I chose Express.js to leverage its minimalist, high-performance nature. And SQLite, a self-contained, serverless database engine for its simplicity. This architecture eliminates a lot of overheads like containerization or running a separate database instance, resulting in a lightweight, fast, and easily self-hostable comment solution.
For learners, if you're new to backend development, this is a pattern worth paying attention to. You don't always need massive infrastructure and feature set to ship a useful product. Always start simple. And remember, when it comes to functionalities, you aren't gonna need it all. Build only what matters and what is needed.
The Features
I only built what actually mattered for a good user experience.
- Threaded Replies: Nests up to 4 levels deep. Because flat comment sections get messy fast.
- Smart Avatars: Gravatar is popular. So why not leverage it? For those who want a consistent online presence, it pulls their avatar from Gravatar. And if the user doesn't have an account, it gracefully falls back to generating their initials on the client-side.
- Theming: Dark mode works right out of the box. Plus, the styling is highly extensible so it blends seamlessly into your site's existing CSS.
- Admin Dashboard: A dedicated, simple UI to moderate and pin comments and keep things clean. Also, shows a clear distinction of author comments.
- Spam Prevention: Right now, it handles spam via honeypot fields and a customizable banned-word list. While it works, upcoming versions will allow users to integrate with services like Akismet.
What's next for Discuss?
Most of the efforts would be focused on beefing up the server against spam. After that, I'm lining up mentions, email notifications, and webhook configurations.
If you’re a learner, developer, who wants to get your feet wet in open source, this would be a great place to start. The codebase is small, readable, and manageable. I’m completely open to volunteers stepping in and submitting PRs. I'm a product manager by day and this is my first proper open source project as well.
You can check the source code or take it out for a spin at the live demo site.
Feel free to clone it, test it, and break it. Let me know what you think.

Top comments (0)