A modern, full-stack knowledge base SaaS application built with Next.js 15, TypeScript, and PostgreSQL. Create, organize, and share documentation with a beautiful rich text editor and powerful search capabilities.
- 🔐 Authentication - Secure user registration and login with NextAuth.js
- 📝 Rich Text Editor - Powered by Tiptap with markdown support
- 🏢 Multi-tenant Architecture - Separate workspaces for organizations
- 📂 Categories - Organize articles with custom categories
- 🔍 Full-text Search - Find content instantly across all articles
- 📱 Responsive Design - Works seamlessly on desktop and mobile
- ⚡ Server-side Rendering - Fast page loads with Next.js 15
- 🎨 Modern UI - Clean interface built with Tailwind CSS
- 🔄 Loading States - Skeleton loaders for better UX
- 🛡️ Error Handling - Comprehensive error boundaries
- Frontend: Next.js 15, React 19, TypeScript, Tailwind CSS
- Backend: Next.js API Routes, Prisma ORM
- Database: PostgreSQL (Supabase)
- Authentication: NextAuth.js v5
- Editor: Tiptap with extensions
- Deployment: Vercel
- Validation: Zod, React Hook Form
- Clone the repository
git clone https://github.com/xenioushk/DocuFlow.git
cd DocuFlow- Install dependencies
npm install- Set up environment variables
cp .env.example .envAdd your environment variables:
DATABASE_URL="postgresql://..."
AUTH_SECRET="your-secret-key"
AUTH_URL="http://localhost:3000"- Set up the database
npx prisma generate
npx prisma db push- Seed demo data (optional)
npm run seednpm run devOpen http://localhost:3000 to see the application.
Demo credentials (if seeded):
- Email:
demo@docuflow.com - Password:
demo123
docuflow/
├── app/
│ ├── (auth)/ # Auth pages (login, register)
│ ├── (dashboard)/ # Protected dashboard routes
│ ├── api/ # API routes
│ └── components/ # Reusable components
├── lib/
│ ├── auth.ts # NextAuth configuration
│ ├── prisma.ts # Prisma client
│ └── validations.ts # Zod schemas
├── prisma/
│ ├── schema.prisma # Database schema
│ └── seed.ts # Seed script
└── public/ # Static assets
Modern dashboard with workspace overview and quick actions.
Powerful editor with formatting, links, code blocks, and more.
Create, edit, and organize articles with categories.
Fast full-text search across all your documentation.
npm run dev- Start development servernpm run build- Build for productionnpm start- Start production servernpm run seed- Seed demo datanpm run lint- Run ESLint
This application is deployed on Vercel. To deploy your own instance:
- Push your code to GitHub
- Import the project in Vercel
- Add environment variables:
DATABASE_URLAUTH_SECRETAUTH_URL(your Vercel URL)
- Deploy!
| Variable | Description | Required |
|---|---|---|
DATABASE_URL |
PostgreSQL connection string | Yes |
AUTH_SECRET |
Random secret for NextAuth.js | Yes |
AUTH_URL |
Base URL of your application | Yes |
Generate AUTH_SECRET:
openssl rand -base64 32Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.
Mahbub Alam Khan
- GitHub: @xenioushk
- Next.js - React framework
- Prisma - Database ORM
- Tiptap - Rich text editor
- Tailwind CSS - Styling
- NextAuth.js - Authentication
Built with ❤️ using Next.js 15 and TypeScript