- Overview
- Problem & Solution
- Key Features
- Tech Stack
- Project Structure
- Prerequisites
- Installation
- Configuration
- Development
- Deployment
- Integration Guide
- Architecture
- Contributing
- License
Askly is an innovative multilingual conversational AI platform designed to transform campus communication by eliminating language barriers in Indian educational institutions. It provides 24/7 automated student support in English, Hindi, and regional languages through both chat and voice interfaces.
- Multilingual Communication – Support for English, Hindi & regional languages
- Intelligent Query Processing – AI-powered understanding with context management
- Knowledge Integration – RAG-powered responses from institutional documents
- Voice Support – Real-time voice calls via Vapi integration
- Analytics Dashboard – Real-time insights and conversation logs
- Enterprise Security – Encrypted communications with Clerk authentication
- Easy Integration – Embeddable widget with single script tag
Campus offices across India handle thousands of repetitive queries daily:
- Students face language barriers (most systems only support English)
- Information exists in PDFs/circulars but lacks accessibility
- Results in long queues, communication gaps, and overworked staff
Askly provides:
- Instant answers in native languages (Hindi, Tamil, Telugu, etc.)
- Context-aware conversations across multiple turns
- Voice & text interaction support
- Smart escalation to staff with full conversation history
- 70% reduction in repetitive queries
- 24/7 Instant Support – Get answers anytime, anywhere
- Multilingual Chat & Voice – Communicate in your preferred language
- Cross-Platform – Web widget, WhatsApp, Telegram support
- Context-Aware – AI remembers conversation history
- Real-Time Dashboard – Monitor conversations and analytics
- Knowledge Base Management – Upload and manage institutional documents
- Smart Escalation – Automatic handoff to staff for complex queries
- Insights & Analytics – Understand student needs and query patterns
- Organization Management – Multi-tenancy with Clerk
- Real-Time Communication – Powered by Convex
- Modern UI – Next.js 15 + React 19 + Tailwind CSS
- Easy Integration – Single script tag deployment
- Scalable Architecture – Handles thousands of concurrent conversations
- Type-Safe – Full TypeScript implementation
- Framework: Next.js 15 (React 19)
- Styling: Tailwind CSS + shadcn/ui
- State Management: Jotai
- Authentication: Clerk
- Forms: React Hook Form + Zod
- Database: Convex (real-time serverless)
- AI/ML: OpenAI, Google Gemini, Anthropic Claude
- RAG: Convex RAG for document retrieval
- Voice: Vapi (real-time voice calls)
- Monorepo: Turborepo
- Package Manager: pnpm
- Language: TypeScript 5.7
- Linting: ESLint + Prettier
- Build Tool: Vite (for embed), Next.js (for apps)
askly/
├── apps/
│ ├── web/ # Main dashboard (Next.js)
│ │ ├── app/ # App router pages
│ │ ├── components/ # Shared components
│ │ └── modules/ # Feature modules
│ ├── widget/ # Chat widget interface
│ │ └── modules/ # Widget-specific modules
│ └── embed/ # Embeddable script (Vite)
│ ├── embed.ts # Main embed logic
│ ├── config.ts # Configuration
│ └── icons.ts # SVG icons
├── packages/
│ ├── backend/ # Convex backend
│ │ └── convex/ # Database schema & functions
│ ├── ui/ # Shared UI components (shadcn)
│ ├── typescript-config/ # Shared TypeScript configs
│ └── eslint-config/ # Shared ESLint configs
├── package.json # Root package.json
├── turbo.json # Turborepo configuration
└── pnpm-workspace.yaml # pnpm workspace config
Before you begin, ensure you have the following installed:
- Node.js ≥ 20.0.0
- pnpm 10.4.1 or higher
- Git
- Clerk – clerk.com (Authentication)
- Convex – convex.dev (Backend/Database)
- Vapi – vapi.ai (Voice integration)
- Gemini – aistudio.google.com (AI models)
git clone https://github.com/senutpal/askly.git
cd askly- Install Dependencies
pnpm install- Set Up Convex Backend
cd packages/backend
pnpm run setup
# Follow the prompts to create a Convex projectThis will:
- Create a new Convex project (or link to existing)
- Generate convex/.env.local with your deployment URL
- Set up the database schema
Create .env.local files in each app directory:
# Clerk Authentication
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_xxxxx
CLERK_SECRET_KEY=sk_test_xxxxx
# Convex
NEXT_PUBLIC_CONVEX_URL=https://your-project.convex.cloud
CONVEX_DEPLOYMENT=your-deployment-name
# URLs
NEXT_PUBLIC_WIDGET_URL=http://localhost:3001
NEXT_PUBLIC_APP_URL=http://localhost:3000# Convex
NEXT_PUBLIC_CONVEX_URL=https://your-project.convex.cloud
# Vapi Voice
NEXT_PUBLIC_VAPI_PUBLIC_KEY=your-vapi-public-key
VAPI_PRIVATE_KEY=your-vapi-private-key## Widget URL (where the chat widget is hosted)
VITE_WIDGET_URL=http://localhost:3001## AI Providers
GOOGLE_GENERATIVE_AI_API_KEY=xxxxx
## Vapi Server
VAPI_API_KEY=xxxxx
## Clerk (for backend)
CLERK_SECRET_KEY=sk_test_xxxxx
## Security
MASTER_KEY=your-master-key-min-32-chars
- Create a new Clerk application
- Enable the following social providers (optional):
- GitHub
- Configure allowed callback URLs:
- Enable Organizations feature in Clerk dashboard
Start All Services From the root directory:
pnpm dev
This starts:
- Web Dashboard: http://localhost:3000
- Chat Widget: http://localhost:3001
- Embed Script: http://localhost:3002
- Convex Backend: Auto-syncs in dev mode
# Web dashboard only
cd apps/web && pnpm dev
# Widget only
cd apps/widget && pnpm dev
# Embed script only
cd apps/embed && pnpm dev
# Convex backend only
cd packages/backend && pnpm dev# Build all apps
pnpm build
# Build specific app
pnpm build --filter=web
pnpm build --filter=widget
pnpm build --filter=embed# Lint all packages
pnpm lint
# Format code
pnpm formatcd packages/backend
pnpm run deployThis deploys your Convex backend to production.
Recommended: Use Vercel for Next.js apps
cd apps/web
vercel --prodConfigure environment variables in Vercel:
- Add all variables from apps/web/.env.local
- Update NEXT_PUBLIC_WIDGET_URL to production URL
cd apps/widget
vercel --prodcd apps/embed
pnpm build
# Upload dist/widget.js to your CDN or static hostingOr use Vercel:
cd apps/embed
vercel --prodAfter deployment, update:
- Clerk allowed callback URLs with production domains
- Convex deployment URL in all apps
- VITE_WIDGET_URL in embed app to production widget URL
Add this single script tag to your HTML:
<script
src="https://your-domain.com/widget.js"
data-organization-id="org_xxxxxxxx"
data-position="bottom-right"
></script>// Initialize or reinitialize
window.AsklyWidget.init({
organizationId: 'org_xxxxxxxx',
position: 'bottom-left' // or 'bottom-right'
});
// Show widget
window.AsklyWidget.show();
// Hide widget
window.AsklyWidget.hide();
// Destroy widget
window.AsklyWidget.destroy();import { useEffect } from 'react';
function App() {
useEffect(() => {
const script = document.createElement('script');
script.src = 'https://your-domain.com/widget.js';
script.setAttribute('data-organization-id', 'org_xxxxxxxx');
document.body.appendChild(script);
return () => {
document.body.removeChild(script);
window.AsklyWidget?.destroy();
};
}, []);
return <div>Your App</div>;
}# In _app.tsx or layout.tsx
import Script from 'next/script';
export default function Layout({ children }) {
return (
<>
<Script
src="https://your-domain.com/widget.js"
data-organization-id="org_xxxxxxxx"
strategy="lazyOnload"
/>
{children}
</>
);
}- User Interaction: Student clicks embedded widget button
- Widget Load: iframe loads chat interface from widget app
- Authentication: Anonymous or authenticated via Clerk
- Message Processing:
- User sends message
- Convex backend receives message
- RAG searches knowledge base
- AI generates contextualized response
- Response Delivery: Message streamed back to widget
- Escalation: Complex queries automatically escalated to staff
- Monorepo: Turborepo for efficient development and builds
- Real-Time: Convex for live updates and serverless functions
- Type-Safety: Full TypeScript for compile-time safety
- Component Library: shadcn/ui for consistent, accessible UI
- Multi-Tenancy: Clerk organizations for campus isolation
This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.
