Skip to content

Askify is a modern, full-stack AI chat application that revolutionizes how you interact with documents and code repositories. Upload PDF documents or connect GitHub repositories to chat with your content using state-of-the-art AI models including GPT-4o, GPT-5, o3 Mini/Pro, and Google Gemini.

Notifications You must be signed in to change notification settings

tushargr0ver/askify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

25 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Askify - AI-Powered Document & Code Assistant

Live Demo GitHub Next.js NestJS TypeScript

Transform your documents and codebases into intelligent conversation partners

✨ Overview

Askify is a modern, full-stack AI chat application that revolutionizes how you interact with documents and code repositories. Upload PDF documents or connect GitHub repositories to chat with your content using state-of-the-art AI models including GPT-4o, GPT-5, o3 Mini/Pro, and Google Gemini.

🎯 Key Features

  • πŸ“„ Document Intelligence: Upload and chat with PDF, DOC, and DOCX files
  • πŸ”— Repository Analysis: Connect public GitHub repositories for code exploration
  • πŸ€– Multi-Model AI: Choose from GPT-4o, GPT-5, o3 series, and Gemini models
  • πŸ“Š Usage Analytics: Track daily/monthly usage with visual breakdowns
  • 🎨 Modern UI: Beautiful dark/light theme with responsive design
  • ⚑ Real-time Processing: Background job processing with live progress updates
  • πŸ”’ Secure Authentication: JWT-based auth with protected routes
  • πŸš€ High Performance: Vector embeddings with Qdrant for fast retrieval

πŸ—οΈ Architecture

Frontend (Next.js 15)

  • React 19 with TypeScript for type safety
  • Tailwind CSS + shadcn/ui for modern, accessible components
  • Zustand for lightweight state management
  • Server-side rendering with proper hydration handling

Backend (NestJS)

  • RESTful API with TypeScript
  • Prisma ORM with PostgreSQL database
  • Redis/Bull queues for background processing
  • Passport JWT authentication strategy
  • File upload with validation and processing

AI & Vector Processing

  • OpenAI GPT Models: GPT-4o, GPT-5, o3 Mini/Pro
  • Google Gemini: Latest 2.0 Flash models
  • LangChain: Document processing and retrieval
  • Qdrant: Vector database for semantic search
  • OpenAI Embeddings: text-embedding-3-small

πŸš€ Quick Start

Prerequisites

  • Node.js 18+ and pnpm
  • Docker and Docker Compose
  • PostgreSQL, Redis, and Qdrant (via Docker)

1. Clone the Repository

git clone https://github.com/tushargr0ver/askify.git
cd askify

2. Environment Setup

Create .env files in both client and server directories:

Server .env:

DATABASE_URL="postgresql://user:password@localhost:5432/askify"
JWT_SECRET="your-super-secret-jwt-key"
OPENAI_API_KEY="your-openai-api-key"
GEMINI_API_KEY="your-gemini-api-key"

Client .env.local:

NEXT_PUBLIC_API_URL="http://localhost:3001"

3. Start Infrastructure

docker-compose up -d

4. Install Dependencies & Run

# Install dependencies for both client and server
cd server && pnpm install
cd ../client && pnpm install

# Run database migrations
cd ../server && pnpm dlx prisma migrate dev

# Start development servers
cd server && pnpm run start:dev  # Backend on :3001
cd client && pnpm run dev        # Frontend on :3000

πŸ“– Usage Guide

πŸ” Authentication

  1. Sign up with email and password
  2. Login to access your personalized dashboard
  3. Manage preferences including preferred AI models

πŸ“„ Document Chat

  1. Click "New Chat" β†’ "Upload Document"
  2. Select PDF, DOC, or DOCX files (max 5MB)
  3. Wait for processing completion
  4. Start asking questions about your document content

πŸ”— Repository Chat

  1. Click "New Chat" β†’ "Fetch Repository"
  2. Enter a public GitHub repository URL
  3. Wait for code analysis and vectorization
  4. Explore your codebase through natural language queries

πŸ€– AI Model Selection

  • GPT-4o: Balanced performance for general tasks
  • GPT-5: Advanced reasoning capabilities
  • o3 Mini/Pro: Optimized for coding and STEM
  • Gemini 2.0: Multimodal with strong reasoning

πŸ›‘οΈ Usage Limits

Plan Daily Messages Monthly Uploads Monthly Repos
Free 50 10 5
Pro Unlimited Unlimited Unlimited

πŸ”§ API Endpoints

Authentication

  • POST /auth/signup - User registration
  • POST /auth/login - User login
  • GET /auth/me - Get current user

Chat Management

  • POST /chat - Create new chat
  • GET /chat - List user chats
  • POST /chat/:id/message - Send message
  • DELETE /chat/:id - Delete chat

File Operations

  • POST /file-upload - Upload document
  • GET /file-upload/job/:id - Check processing status

Repository Processing

  • POST /repository/process - Process GitHub repo
  • GET /repository/job/:id - Check processing status

πŸƒβ€β™‚οΈ Development

Project Structure

askify/
β”œβ”€β”€ client/          # Next.js frontend
β”‚   β”œβ”€β”€ app/         # App router pages
β”‚   β”œβ”€β”€ components/  # Reusable UI components
β”‚   β”œβ”€β”€ hooks/       # Custom React hooks
β”‚   └── lib/         # Utilities and API client
β”œβ”€β”€ server/          # NestJS backend
β”‚   β”œβ”€β”€ src/         # Source code
β”‚   β”‚   β”œβ”€β”€ auth/    # Authentication module
β”‚   β”‚   β”œβ”€β”€ chat/    # Chat and AI processing
β”‚   β”‚   β”œβ”€β”€ file-upload/ # Document processing
β”‚   β”‚   β”œβ”€β”€ repository/  # GitHub repo handling
β”‚   β”‚   └── users/   # User management
β”‚   └── prisma/      # Database schema and migrations
└── docker-compose.yml # Infrastructure setup

Development Commands

# Server commands
cd server
pnpm run start:dev    # Development server
pnpm run test         # Run tests
pnpm run build        # Production build

# Client commands
cd client
pnpm run dev          # Development server
pnpm run build        # Production build
pnpm run lint         # ESLint check

# Database operations
pnpm dlx prisma studio     # Database GUI
pnpm dlx prisma migrate dev # Run migrations
pnpm dlx prisma generate   # Generate client

πŸš€ Deployment

Production Environment

# Build applications
cd server && pnpm run build
cd client && pnpm run build

# Start production servers
cd server && pnpm run start:prod
cd client && pnpm start

Docker Deployment

# Build and run with Docker Compose
docker-compose -f docker-compose.prod.yml up --build

Environment Variables (Production)

Ensure all environment variables are set for production:

  • Database connections
  • API keys (OpenAI, Gemini)
  • JWT secrets
  • CORS origins

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • OpenAI for GPT models and embeddings
  • Google for Gemini AI models
  • Vercel for Next.js framework
  • NestJS for the backend framework
  • LangChain for AI orchestration
  • Qdrant for vector search capabilities

Built with ❀️ by Tushar Grover

🌐 Live Demo β€’ πŸ“§ Contact

About

Askify is a modern, full-stack AI chat application that revolutionizes how you interact with documents and code repositories. Upload PDF documents or connect GitHub repositories to chat with your content using state-of-the-art AI models including GPT-4o, GPT-5, o3 Mini/Pro, and Google Gemini.

Resources

Stars

Watchers

Forks