AI-powered documentation builder with rich text editing, authentication, and PostgreSQL database.
- 📝 Rich text editing with BlockNote
- 🔐 Authentication with NextAuth 5.0
- 🗄️ PostgreSQL database with JSONB storage
- 🎨 Clean, Notion-like UI
- 🔍 Easy navigation
- 🐳 Docker-based development environment
- 🤖 AI-powered assistance (coming soon)
- Framework: Next.js 16 (App Router)
- Editor: BlockNote
- Authentication: NextAuth 5.0
- Database: PostgreSQL with postgres.js
- Styling: Tailwind CSS + shadcn/ui
- Language: TypeScript
- Infrastructure: Docker Compose
- Node.js 18 or higher
- pnpm package manager
- Docker and Docker Compose
- Git
# Clone the repository
git clone https://github.com/themegrill/docs-builder.git
cd tg-docs-builder
# Install dependencies
cd packages/web
pnpm install
# Set up environment variables
cp .env.local.example .env.local
# Edit .env.local with your configuration
# Start PostgreSQL database
pnpm db:start
# Start development server
pnpm devOpen http://localhost:3000 in your browser.
tg-docs-builder/
├── docker-compose.yml # PostgreSQL container setup
├── packages/
│ └── web/ # Next.js application
│ ├── app/ # App router pages & API routes
│ ├── components/ # React components
│ ├── lib/ # Utilities and helpers
│ ├── db/ # Database schemas and migrations
│ │ └── init.sql # Initial database setup
│ └── types/ # TypeScript type definitions
└── pnpm-workspace.yaml
The project uses PostgreSQL with the following tables:
- users - User accounts for authentication
- documents - Documentation pages with BlockNote blocks (JSONB)
- navigation - Navigation structure (JSONB)
# Start database
pnpm db:start
# Stop database
pnpm db:stop
# Reset database (warning: deletes all data)
pnpm db:reset
# View database logs
pnpm db:logsDefault local development credentials:
- Host: localhost
- Port: 5432
- Database: tg_docs_db
- User: tg_docs_user
- Password: tg_docs_password
Documents are stored in the PostgreSQL database with the following structure:
- slug - URL-friendly identifier
- title - Document title
- description - Optional description
- blocks - BlockNote content (stored as JSONB)
- published - Publication status
- order_index - Display order
Content is managed through the web interface with full CRUD operations.
cd packages/web
pnpm devcd packages/web
pnpm build
pnpm startFrom packages/web:
pnpm dev- Start development serverpnpm build- Build for productionpnpm start- Start production serverpnpm lint- Run ESLintpnpm db:start- Start PostgreSQL containerpnpm db:stop- Stop PostgreSQL containerpnpm db:reset- Reset database and start freshpnpm db:logs- View PostgreSQL logs
The project uses NextAuth 5.0 for authentication. Configure your auth providers in packages/web/app/api/auth/[...nextauth]/route.ts.
Required environment variables in .env.local:
# Database
DATABASE_URL=postgres://tg_docs_user:tg_docs_password@localhost:5432/tg_docs_db
# NextAuth
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your-secret-key-here
# Add your OAuth providers here
# GITHUB_CLIENT_ID=
# GITHUB_CLIENT_SECRET=- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
MIT
Maintained by ThemeGrill