Docspresso is a modern, AI-driven platform for generating, editing, searching, and collaborating on technical documents (PRDs, tech specs, API docs, and more) using advanced LLMs and vector search. It is built for product, engineering, and research teams who need fast, reliable, and collaborative documentation workflows.
- AI Document Generation: Instantly create PRDs, tech specs, and more using LangChain + OpenAI agents
- Versioning & Editing: Full document history, branching, and rollback
- Vector Search: Lightning-fast, semantic search with NeonDB (pgvector, HNSW index)
- Collaboration: chat-based Q&A, edit suggestions
- Analytics & Moderation: Activity tracking, user analytics, admin tools
- Authentication & Security: Custom JWT-based authentication, bcryptjs for password hashing
- Subscription Management: PayPal subscription integration with usage-based plans
- Unrestricted Developer Mode: Optional mode to bypass auth and limits for local development
- OpenRouter Support: Flexible LLM provider support including free models (e.g., Gemini 2.0 Flash)
- Framework: Next.js (App Router, React 18)
- Database: NeonDB (Postgres + pgvector)
- ORM: Drizzle ORM
- AI/LLM: LangChain, OpenAI / OpenRouter
- API: tRPC, Next.js API routes
- UI: shadcn/ui, custom React components
- Authentication: Custom JWT auth with jose library
- Payments: PayPal subscription API
Key folders:
app/— Next.js app router structure(dashboard)/— Protected dashboard routes(login)/— Authentication routesapi/— API endpoints and tRPC routes
components/— React UI and feature componentsai/— AI-related componentsdocuments/— Document generation and viewingui/— ShadCN UI components
lib/— Core functionalityagents/— AI document generation agentsauth/— Custom JWT authenticationdb/— Database schema and queriesvector/— Vector embedding and searchtrpc/— tRPC routers and procedures
git clone <your-repo-url>
cd Docspresso
pnpm installSet up your environment variables:
cp .env.example .env
cp .env.example .env
# Edit .env with your NeonDB, OpenAI/OpenRouter, PayPal, and AUTH_SECRET keys
# For Unrestricted Mode (Bypass Auth/Limits):
# NEXT_PUBLIC_UNRESTRICTED_MODE=true
# For OpenRouter (Free Models):
# OPENAI_BASE_URL=https://openrouter.ai/api/v1
# OPENAI_API_KEY=sk-or-...Run database setup and migrations:
pnpm db:setup
pnpm db:migrate
pnpm db:seedStart the dev server:
pnpm devVisit http://localhost:3000 to use Docspresso.
- Use
/onboardingfor team setup - Use the dashboard for document generation and chat
- Test vector search with different document types
- Configure PayPal sandbox for testing payment flows
- Deploy to Vercel or your preferred provider
- Add your environment variables in the deployment dashboard
- Set up proper database indexes for vector search performance
- Configure PayPal webhooks for production subscription management
BASE_URL— Your production domainAUTH_SECRET— JWT session secret (min 32 characters)POSTGRES_URL— NeonDB URLOPENAI_API_KEY— OpenAI keyNEXT_PUBLIC_PAYPAL_CLIENT_ID— PayPal client IDPAYPAL_SECRET— PayPal secret keyPAYPAL_WEBHOOK_ID— PayPal webhook IDNEXT_PUBLIC_UNRESTRICTED_MODE— Set totrueto bypass auth and limitsOPENAI_BASE_URL— Optional: Set tohttps://openrouter.ai/api/v1for OpenRouter
See LICENSE for details.
Docspresso 2025