docs.plus is a free, real-time collaboration tool built on open-source technologies. It empowers communities to share and organize information logically and hierarchically, making teamwork and knowledge sharing straightforward and effective.
Monorepo Structure:
- π
packages/webapp- Next.js frontend with TipTap editor - β‘
packages/hocuspocus.server- REST API, WebSocket server, and background workers - ποΈ
packages/supabase- Database migrations and Supabase configuration - π
packages/extension-*- TipTap extensions (hyperlink, multimedia, indent, inline-code)
Tech Stack:
- Runtime: π Bun 1.3.2+
- Frontend: βοΈ Next.js 15, React, TipTap, Tailwind CSS
- Backend: π§ Hono, Hocuspocus (Y.js), Prisma ORM
- Database: π PostgreSQL 17, π΄ Redis
- Infrastructure: π³ Docker Compose, Supabase
- Real-time: π WebSocket (Hocuspocus), Supabase Realtime
- π³ Docker & Docker Compose v2+ - Install
- π Bun >=1.3.2 - Install
- ποΈ Supabase CLI - Install
git clone https://github.com/docs-plus/docs.plus.git
cd docs.plus
bun installcp .env.example .env.developmentUpdate .env.development with your configuration. See .env.example for all available variables.
ποΈ Supabase Setup (One-time, ~5-10 min)
Step 1: Start Supabase π
make supabase-startFirst run downloads Docker images. Verify with make supabase-status.
Step 2: Activate Extensions π
- Open Supabase Studio
- Go to Integrations
- Activate: pg_cron and pgmq (Queues)
Step 3: Run Migrations π
- Open SQL Editor
- Execute scripts from
packages/supabase/scripts/in order:01-enum.sqlthrough17-database-extensions.sql
Step 4: Configure Queues βοΈ
- Queue Settings β Enable "Expose Queues via PostgREST"
- Queues β Select
message_counterβ Manage permissions - Enable Select/Insert/Update/Delete for:
authenticated,postgres,service_role - Add RLS policy: "Allow anon and authenticated to access messages from queue"
make up-devServices: π―
- π Webapp: http://localhost:3000
- π REST API: http://localhost:4000
- β‘ WebSocket: ws://localhost:4001
- π· Worker: http://localhost:4002
- π PostgreSQL: localhost:5432
- π΄ Redis: localhost:6379
- ποΈ Supabase Studio: http://127.0.0.1:54323
Production-ready setup for mid-level scale deployments (small-medium teams, moderate traffic).
Architecture: ποΈ
- π Horizontal scaling: REST API (2), WebSocket (3), Worker (2), Webapp (2)
- π Nginx reverse proxy with load balancing
- β‘ Resource limits and health checks
- π Production-optimized logging and connection pooling
-
βοΈ Configure Environment
cp .env.example .env.production
Update: database credentials, JWT secret, Supabase URLs, storage credentials, CORS origins.
-
π¨ Build & Deploy
make build make up-prod
-
π Scaling Adjust replicas in
.env.production:REST_REPLICAS=2 WS_REPLICAS=3 WORKER_REPLICAS=2 WEBAPP_REPLICAS=2
Production Recommendations: π‘
- ποΈ Use managed database (AWS RDS, DigitalOcean, Supabase Cloud)
- π Configure SSL/TLS certificates
- π Set up monitoring (Prometheus, Grafana)
- πΎ Implement database backups
- π Secure all secrets and credentials
# Building
make build # Production build
make build-dev # Development build
# Running
make up-prod # Start production
make up-dev # Start development
# Management
make down # Stop services (auto-detects env)
make restart # Restart services (auto-detects env)
make logs # All logs
make logs-webapp # Webapp logs
make logs-backend # Backend logs
make ps # Container status
make stats # Resource usage
make clean # Cleanup (auto-detects env)
# Scaling (production)
make scale-webapp # Scale webapp to 3 replicas
make scale-hocuspocus # Scale backend services
# Supabase
make supabase-start # Start local Supabase
make supabase-stop # Stop local Supabase
make supabase-status # Show Supabase statusRun make help for complete command list.
docs.plus/
βββ packages/
β βββ webapp/ # π Next.js frontend
β βββ hocuspocus.server/ # β‘ REST API, WebSocket, Workers
β βββ supabase/ # ποΈ Database migrations
β βββ extension-*/ # π TipTap extensions
βββ docker-compose.dev.yml # π³ Development orchestration
βββ docker-compose.prod.yml # π Production orchestration
βββ Makefile # π οΈ Build & deployment commands
βββ .env.example # βοΈ Environment template
PRs welcome! See contributing guidelines for details.
Apache License 2.0 - See LICENSE.md
- π¬ Discord: Join our server
- π¦ Twitter: @docsdotplus
- π GitHub: docs.plus
- π§ Email: contact@newspeak.house