A modern, production-ready frontend for intelligent document querying powered by RAG (Retrieval-Augmented Generation) technology
Features β’ Quick Start β’ Documentation β’ Contributing
- Overview
- Features
- Tech Stack
- Prerequisites
- Quick Start
- Project Structure
- Environment Variables
- Development
- Design System
- API Integration
- Building for Production
- Deployment
- Contributing
- License
Querio is a cutting-edge frontend application that provides an intuitive interface for interacting with AI-powered document intelligence. Built with the latest web technologies, it features a stunning glassmorphism UI, real-time chat capabilities, semantic search, and comprehensive document management.
- π¨ Modern Design - Beautiful glassmorphism UI with smooth animations
- β‘ Performance - Built with Next.js 16 for optimal speed and SEO
- π€ AI-Powered - Intelligent document querying using RAG technology
- π± Responsive - Fully responsive design for all devices
- π Real-time - Live updates and interactive chat interface
- π Type-Safe - Full TypeScript implementation
- System overview with real-time statistics
- Quick actions for common tasks
- Visual analytics and metrics
- API health monitoring
- Conversational AI with context awareness
- Session management and history
- Real-time message streaming
- Markdown support for rich formatting
- Drag-and-drop file upload
- PDF document support
- Document preview and metadata
- Bulk upload capabilities
- Delete and manage documents
- AI-powered document search
- Similarity-based results
- Relevance scoring
- Context-aware search results
- Multi-file upload support
- Drag-and-drop interface
- Upload progress tracking
- File type validation
- Automatic document processing
- API health status
- Real-time statistics
- Performance metrics
- Connection monitoring
- Next.js 16 - React framework with App Router
- React 19 - UI library with latest features
- TypeScript 5 - Type-safe development
- Tailwind CSS 4 - Utility-first CSS framework
- Framer Motion - Animation library
- Lucide React - Beautiful icon library
- TanStack Query - Data fetching and caching
- Zustand - Lightweight state management
- Axios - HTTP client
- React Hot Toast - Notifications
- React Dropzone - File upload
- React Markdown - Markdown rendering
- clsx - Conditional classnames
- tailwind-merge - Tailwind class merging
Before you begin, ensure you have the following installed:
- Node.js >= 18.0.0 (Download)
- pnpm >= 8.0.0 (recommended) or npm >= 9.0.0
- Querio API Backend running on
http://localhost:8000
npm install -g pnpmgit clone https://github.com/paradocx96/querio-app.git
cd querio-apppnpm install# Copy the example environment file
cp .env.local.example .env.local
# Edit .env.local with your configurationpnpm devThe application will be available at http://localhost:3000
querio-app/
βββ app/ # Next.js App Router
β βββ layout.tsx # Root layout with sidebar
β βββ page.tsx # Dashboard page
β βββ globals.css # Global styles & design tokens
β βββ chat/ # Chat interface
β β βββ page.tsx
β βββ documents/ # Document management
β β βββ page.tsx
β βββ upload/ # File upload
β β βββ page.tsx
β βββ search/ # Semantic search
β β βββ page.tsx
β βββ system/ # System monitoring
β βββ page.tsx
β
βββ components/ # React components
β βββ chat/ # Chat-specific components
β β βββ chat-interface.tsx
β β βββ chat-message.tsx
β βββ dashboard/ # Dashboard components
β β βββ stat-card.tsx
β β βββ quick-query.tsx
β β βββ quick-action-link.tsx
β βββ documents/ # Document components
β β βββ document-card.tsx
β β βββ document-list.tsx
β β βββ file-upload.tsx
β βββ search/ # Search components
β β βββ search-interface.tsx
β β βββ search-result-card.tsx
β βββ layout/ # Layout components
β β βββ sidebar.tsx
β βββ ui/ # Reusable UI components
β βββ button.tsx
β βββ input.tsx
β βββ textarea.tsx
β βββ card.tsx
β βββ badge.tsx
β βββ alert.tsx
β βββ modal.tsx
β βββ loading.tsx
β
βββ api/ # API integration
β βββ rest/
β βββ base-api.ts # Axios instance & endpoints
β
βββ hooks/ # Custom React hooks
β βββ (custom hooks here)
β
βββ lib/ # Utilities & types
β βββ types.ts # TypeScript type definitions
β βββ utils.ts # Utility functions
β
βββ utils/ # Helper utilities
β βββ sidebar-utils.ts # Sidebar navigation config
β
βββ public/ # Static assets
β
βββ .env.local.example # Environment variables template
βββ next.config.js # Next.js configuration
βββ tailwind.config.js # Tailwind CSS configuration
βββ tsconfig.json # TypeScript configuration
βββ package.json # Dependencies & scripts
Create a .env.local file in the root directory:
# API Configuration
NEXT_PUBLIC_API_URL=http://localhost:8000
# Optional: Add additional configuration as needed
# NEXT_PUBLIC_ANALYTICS_ID=your_analytics_id| Variable | Description | Default | Required |
|---|---|---|---|
NEXT_PUBLIC_API_URL |
Backend API base URL | http://localhost:8000 |
Yes |
Note: Variables prefixed with
NEXT_PUBLIC_are exposed to the browser.
# Start development server (with hot reload)
pnpm dev
# Build for production
pnpm build
# Start production server
pnpm start
# Run ESLint
pnpm lint
# Type check
pnpm type-check- Hot Reload - Changes are automatically reflected in the browser
- Type Safety - TypeScript catches errors during development
- API Proxy - Configure proxy in
next.config.jsif needed - Component Development - Use the component structure for consistency
This project follows industry-standard practices:
- TypeScript for type safety
- Functional Components with hooks
- Client Components marked with
'use client' - Proper Error Handling with try-catch and error boundaries
- Responsive Design using Tailwind breakpoints
The application uses a carefully crafted color system:
/* Primary Colors */
--accent-primary: #06b6d4 /* Cyan */
--accent-secondary: #22d3ee /* Light Cyan */
--purple-primary: #a855f7 /* Purple */
--purple-secondary: #c084fc /* Light Purple */
/* Background */
--bg-primary: #0a0a0f /* Deep Navy */
--bg-secondary: #12121a /* Dark Navy */
--bg-tertiary: #1a1a25 /* Medium Navy */
/* Glass Effects */
--glass-bg: rgba(255, 255, 255, 0.03)
--glass-border: rgba(255, 255, 255, 0.08)
/* Text */
--text-primary: #f8fafc /* White */
--text-secondary: #94a3b8 /* Gray */
--text-tertiary: #64748b /* Muted Gray */
/* Status Colors */
--success: #10b981 /* Green */
--warning: #f59e0b /* Orange */
--error: #ef4444 /* Red */- Primary Font: Sora - Modern, geometric sans-serif
- Code Font: JetBrains Mono - For code blocks
- Display Font: Space Grotesk - For headings
<div className="glass-card">
{/* Translucent card with backdrop blur */}
</div><Button variant="primary" leftIcon={<Icon />}>
Click Me
</Button>All interactive elements include smooth animations using Framer Motion.
The frontend integrates with the Querio backend API:
| Category | Endpoints | Description |
|---|---|---|
| System | /api/health, /api/stats |
Health checks and statistics |
| Documents | /api/documents/* |
Document CRUD operations |
| Upload | /api/documents/upload, /api/documents/bulk-upload |
File upload endpoints |
| Query | /api/query |
Document querying |
| Chat | /api/chat/* |
Chat sessions and messages |
| Search | /api/search/* |
Semantic search |
The API client is configured in api/rest/base-api.ts:
import { API_BASE_URL } from '@/api/rest/base-api';
// Base URL is configured via environment variable
// Default: http://localhost:8000All API calls include comprehensive error handling:
- Network errors
- Timeout errors (60 seconds)
- Server errors with detailed messages
- Automatic error notifications via toast
# Build the application
pnpm build
# The output will be in the .next directoryThe build process creates optimized static pages:
Route (app) Size
β β / (Static)
β β /chat (Static)
β β /documents (Static)
β β /search (Static)
β β /system (Static)
β β /upload (Static)
# Start production server
pnpm start
# Server runs on http://localhost:3000- β Code splitting
- β Image optimization
- β CSS minification
- β JavaScript minification
- β Static page generation
- β React Server Components
- β Automatic font optimization
# Install Vercel CLI
npm i -g vercel
# Deploy
vercel# Build command
pnpm build
# Publish directory
.nextFROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
EXPOSE 3000
CMD ["npm", "start"]Remember to configure NEXT_PUBLIC_API_URL in your deployment platform.
We welcome contributions! Please follow these steps:
Click the "Fork" button at the top right of this page.
git clone https://github.com/paradocx96/querio-app.git
cd querio-appgit checkout -b feature/amazing-feature- Follow the existing code style
- Add tests if applicable
- Update documentation as needed
git add .
git commit -m 'Add some amazing feature'git push origin feature/amazing-featureGo to your fork on GitHub and click "New Pull Request"
- β Use TypeScript for type safety
- β Follow component structure conventions
- β Write meaningful commit messages
- β Test your changes thoroughly
- β Update README if adding features
- β
Ensure build passes (
pnpm build)
This project is licensed under the MIT License - see the LICENSE file for details.
MIT License
Copyright (c) 2024 Navinda Chandrasiri
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction...
- Next.js Team - For the amazing framework
- Vercel - For hosting and deployment platform
- Tailwind Labs - For Tailwind CSS
- Framer - For Framer Motion
- Lucide Icons - For beautiful icons
- Documentation: View Docs
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: navindadev@gmail.com
Built with β€οΈ by paradocx96
Website β’ Documentation β’ Blog β’ Twitter