A powerful, modern forum platform built with React, TanStack Router, tRPC, and Drizzle ORM β designed for both developers and community managers.
Foreum is your all-in-one solution for building engaging community spaces. Whether you're creating a product support forum, an internal discussion board, or a vibrant community platform, Foreum provides everything you need out of the box:
Foreum can be deployed on any platform that supports Node.js. Choose your preferred deployment method:
# Pull and run with Docker
docker pull ghcr.io/abdulkareemoj/foreum:latest
docker run -p 3000:3000 \
-e DATABASE_URL="postgresql://user:pass@host:5432/foreum" \
-e BETTER_AUTH_SECRET="your-secret" \
ghcr.io/abdulkareemoj/foreum
For production deployment with Docker Compose:
# docker-compose.yml
version: "3.8"
services:
app:
image: ghcr.io/abdulkareemoj/foreum:latest
ports:
- "3000:3000"
environment:
- NODE_ENV=production
- DATABASE_URL=postgresql://foreum:password@db:5432/foreum
depends_on:
- db
db:
image: postgres:14-alpine
environment:
- POSTGRES_USER=foreum
- POSTGRES_PASSWORD=password
- POSTGRES_DB=foreum
volumes:
- postgres_data:/var/lib/postgresql/data
volumes:
postgres_data:
# Clone the repository
git clone https://github.com/abdulkareemoj/foreum.git
cd foreum
# Install dependencies
pnpm install
# Configure environment
cp .env.example .env
# Edit .env with your database and SMTP settings
# Run migrations
pnpm db:migrate
# Build and start
pnpm build
pnpm start
Install system requirements:
# On Ubuntu/Debian
apt update && apt install -y nodejs npm postgresql
Set up process management:
# Using PM2
npm install -g pm2
pm2 start npm --name "foreum" -- start
pm2 startup
pm2 save
Configure Nginx (optional):
server {
listen 80;
server_name your-domain.com;
location / {
proxy_pass http://localhost:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
π Advanced Authentication
π Rich Discussion Tools
π₯ User Management
β‘ Performance-First Architecture
Modern UI/UX Responsive design with customizable Dark/light themes and Loading states & animations
Modern stack: React + TanStack Router + tRPC + Drizzle + Better Auth, great DX and strong type-safety across the stack.
Foreum can be used for:
The instructions below assume you have Node.js (v18+) and a Postgres database ready. Adjust package manager (npm / pnpm / yarn) as you prefer.
Clone the repo
git clone https://your-repo-url/foreum.git
cd foreum
Install dependencies
npm install
# or
npm install
Environment
Create a .env (copy .env.example if present) and set the important variables:
DATABASE_URL=postgres://user:pass@localhost:5432/foreum
VITE_PUBLIC_BASE_URL=http://localhost:5173
BETTER_AUTH_SECRET=some-super-secret
SMTP_HOST=smtp.example.com
SMTP_PORT=587
SMTP_USER=...
SMTP_PASS=...
Database migrations & schema If you use Drizzle migrations or Better Auth CLI, run the migration commands needed to create tables (users, accounts, sessions, profile, settings, bookmarks, notifications, etc.). Example command placeholders:
# Drizzle (if configured)
npx drizzle-kit generate:migration
npx drizzle-kit migrate
# If using Better Auth CLI for plugin migrations
npx @better-auth/cli migrate
(Adjust according to your setup β Foreum includes Drizzle schema files for auth, profile, settings, bookmark, notification, etc.)
Run the dev server
npm run dev
# typically runs the React development server with Vite
Open the app
Visit http://localhost:5173 (or whatever your Vite server prints) and explore.
Set up your environment variables in .env:
DATABASE_URL=postgresql://user:password@localhost:5432/foreum
BETTER_AUTH_SECRET=your-secret-key
SMTP_HOST=your-smtp-host
Create your first admin user:
pnpm create-admin
Start customizing your forum:
src/lib/stylessrc/lib/authpnpm dev # Start development server
pnpm build # Build for production
pnpm preview # Preview production build
pnpm test # Run tests
pnpm lint # Run linters
zod schemas for validation and client-server parity.src/server/trpc/routers and are intended to be small, single-responsibility units (threads, category, tag, user, bookmarks, notifications, settings).Weβd love your help β whether youβre filing issues, suggesting features, contributing code, or improving docs!
zod schemas and trpc procedures when adding features to maintain consistency.Please open an issue β include steps to reproduce, expected vs actual behavior, and (if possible) a minimal repro.
Weβre committed to fostering a welcoming community. Please follow a friendly and respectful tone in all interactions.
git checkout -b feature/your-featurepnpm testForeum is open-source software licensed under the MIT license.
β Star this repository if you find it helpful!
π£ Share your experience using Foreum
π Report bugs and suggest features
π» Submit pull requests
Join our community and help make Foreum even better!
This project is open-source and released under the MIT License β free to use, modify and distribute. Contributions are welcomed under the same license.
Foreum is meant to be a friendly, practical starting point for building a community product. Whether you are product-minded (designers, founders) or developer-minded (engineers, contributors), Foreum tries to make adding value straightforward:
If you like what you see β β star the repo, open an issue, or submit a PR. Letβs build a vibrant community together!