Discussion System for my digital garden

July 4th, 2026digital-gardendiscussiondiscord

I just had the idea to implement a discussion system for my knowledge base, authentication will be done through Discord, no account system at all. I could control who can post a comment (anyone, friends, or nobody), maybe even implement a voting system for comments and posts in general.

Social SDK roadblock

Looks like I couldn't implement the "friends-only" status because Discord's API doesn't allow me to check user's friends list unless I apply for the "Social SDK". This is kinda a bummer, but I understand the privacy concerns of allowing apps to check user's friends list. For this road block I'm implementing a "guild-only" status, which will allow users to post comments if they are in a specific Discord server.

Implementation

For this approach I used some stuff that I experienced before, here's the stack of technologies I used for this:

  • nuxt-auth-utils for Discord OAuth2 authentication.
  • pinia for state management, as well as @pinia/nuxt for Nuxt integration.
  • @libsql/client for database access.
  • a Turso Database for storing discussions and profiles, which is a SQLite database hosted on the cloud.

For the discussion status, I implemented a discussionStatus field in the frontmatter of each post, which can be set to either open, guild-only, or closed. This allows me to control who can post comments on each post.

Moderation

For moderation, I implemented a env var called NUXT_OAUTH_DISCORD_ADMINS which is a comma-separated list of Discord user IDs that are allowed to moderate discussions. Users are able to delete their own comments, but moderators can deleta any comment.

References