DEV Community

Toprak
Toprak

Posted on

I built an encyclopedia of 376 psychoactive substances with Next.js and PostgreSQL

Finding reliable information about psychoactive substances shouldn't require 15 open tabs. PsychonautWiki for pharmacology, TripSit for interactions, Erowid for trip reports, Reddit for community knowledge — I wanted one place where all of that connects.

So I built SubstanceWiki.

What it covers

  • 376 substances with detailed profiles
  • 15,015 interaction pairs with safety ratings
  • 240 catalogued subjective effects across 7 categories
  • 2,748 experience reports from real users
  • 23,520 aggregated community posts from Reddit and forums
  • 21 combo guides for common and high-risk combinations
  • 10 side-by-side substance comparisons

Every substance page includes dosage tables by route of administration, duration timelines, subjective effect profiles, interaction safety data, and community context.

The tech stack

  • Next.js 16 with App Router and Turbopack
  • Prisma + PostgreSQL (hosted on Neon)
  • Tailwind CSS + shadcn/ui for the interface
  • Vercel for deployment
  • Dynamic sitemap generation, JSON-LD structured data on every page, and OG image support

The database schema has 11 models covering substances, effects, interactions, experience reports, articles, and community posts. Everything is cross-linked — substances link to their effects, effects link back to substances, interactions connect pairs with safety ratings.

Why harm reduction matters

People use substances whether we like it or not. Giving them accurate, complete information is how we keep them safer. Every substance page leads with safety information because that's what matters most.

The interaction checker alone covers 15,015 pairs — you can look up whether combining two substances is safe, risky, or dangerous in seconds.

Check it out

substancewiki.org

I'd love feedback on what's missing, what's confusing, or what could be structured better. This is safety-critical information, so clarity matters more than aesthetics.

Top comments (0)