Skip to content

medevs/vibemng

Repository files navigation

Docspresso: AI-Powered Document Platform

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.

Features

  • 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)

Tech Stack

  • 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

Project Structure

Key folders:

  • app/ — Next.js app router structure
    • (dashboard)/ — Protected dashboard routes
    • (login)/ — Authentication routes
    • api/ — API endpoints and tRPC routes
  • components/ — React UI and feature components
    • ai/ — AI-related components
    • documents/ — Document generation and viewing
    • ui/ — ShadCN UI components
  • lib/ — Core functionality
    • agents/ — AI document generation agents
    • auth/ — Custom JWT authentication
    • db/ — Database schema and queries
    • vector/ — Vector embedding and search
    • trpc/ — tRPC routers and procedures

Getting Started

git clone <your-repo-url>
cd Docspresso
pnpm install

Set 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:seed

Start the dev server:

pnpm dev

Visit http://localhost:3000 to use Docspresso.

Testing & Development

  • Use /onboarding for team setup
  • Use the dashboard for document generation and chat
  • Test vector search with different document types
  • Configure PayPal sandbox for testing payment flows

Deployment

  • 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

Environment Variables

  • BASE_URL — Your production domain
  • AUTH_SECRET — JWT session secret (min 32 characters)
  • POSTGRES_URL — NeonDB URL
  • OPENAI_API_KEY — OpenAI key
  • NEXT_PUBLIC_PAYPAL_CLIENT_ID — PayPal client ID
  • PAYPAL_SECRET — PayPal secret key
  • PAYPAL_WEBHOOK_ID — PayPal webhook ID
  • NEXT_PUBLIC_UNRESTRICTED_MODE — Set to true to bypass auth and limits
  • OPENAI_BASE_URL — Optional: Set to https://openrouter.ai/api/v1 for OpenRouter

License

See LICENSE for details.


Docspresso 2025

About

AI platform for generating, editing technical documents (PRDs, tech specs, API docs, and more) using LLMs and vector search.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors