Prerequisites
Before you begin, ensure you have the following installed and configured:Node.js
Version 18.17.0 or higher
pnpm
Version 10.10.0 (package manager)
MongoDB
A MongoDB instance for storing metadata
Supabase
A Supabase account for authentication
Installation
Install Dependencies
Install all required packages using pnpm:
The installation process may take a few minutes as it downloads all dependencies.
Environment Configuration
Required Variables
These environment variables are required for Quail to function:Generate Encryption Key
The encryption key is used to secure database credentials. Generate a secure key using OpenSSL:Supabase Setup
- Create a new project at supabase.com
- Navigate to Settings → API
- Copy your Project URL to
NEXT_PUBLIC_SUPABASE_URL - Copy the anon/public key to
NEXT_PUBLIC_SUPABASE_ANON_KEY - Copy the service_role key to
SUPABASE_SERVICE_ROLE_KEY
Supabase provides authentication, user management, and secure session handling for Quail.
MongoDB Setup
Quail uses MongoDB to store:- User profiles and settings
- Dashboard configurations
- Chart definitions
- Chat history
- Saved queries
- MongoDB Atlas (cloud-hosted, free tier available)
- Local MongoDB instance
- Docker container
Optional Variables
Azure AI configuration is required for AI-powered SQL generation and chart recommendations. Without it, these features will not function.
Running Quail
Start Development Server
Launch the development server with hot reloading:The application will be available at http://localhost:3000
Create Your Account
- Navigate to http://localhost:3000
- Click Sign Up
- Enter your email and password
- Verify your email address (check Supabase email settings)
Connecting Your First Database
Navigate to Connections
Click on Connections in the sidebar to access the database connection manager.
Test Connection
Click Test Connection to verify that Quail can connect to your database.If the test fails:
- Verify your credentials are correct
- Check that your database allows connections from your IP
- Ensure the database server is running
- Verify firewall rules allow the connection
Save Connection
Once the test succeeds, click Save to store the connection.
Your credentials are encrypted using AES-256 encryption before being stored in MongoDB.
Running Your First Query
Review Generated SQL
Quail’s AI will:
- Analyze your question
- Examine your database schema
- Generate an optimized SQL query
- Display the query in the SQL editor
Execute and Visualize
Click the Run button to execute the query.Quail will:
- Execute the SQL query
- Display results in a table
- Automatically generate appropriate visualizations
- Provide insights about the data
Creating Your First Dashboard
Create New Dashboard
Click Create Dashboard button and enter:
- Title: Q1 2024 Sales Analysis
- Description: Overview of sales performance and trends
Add Charts
In the dashboard editor:
- Click Add Chart
- Select from your saved charts
- Drag and resize to arrange
- Customize colors and styles
Configure Refresh
Set up automatic data refresh:
- Real-time (WebSocket)
- Every 5 minutes
- Every hour
- Manual only
Production Deployment
For production deployment, build the application:- Compiles TypeScript to JavaScript
- Optimizes React components
- Generates static pages where possible
- Creates a standalone deployment package
The build output is located in
.next/standalone and includes all necessary files for deployment.Next Steps
Explore Features
Learn about all the powerful features Quail offers
Configure Speed Mode
Optimize AI response times with different speed modes
Set Up Team Access
Configure permissions and share dashboards with your team
Export Data
Learn how to export data in CSV, Excel, and PDF formats
Troubleshooting
Application Won’t Start
Database Connection Fails
- Verify credentials are correct
- Check firewall rules
- Ensure database server is accessible
- Test connection with a database client first
AI Features Not Working
- Verify Azure OpenAI credentials are configured
- Check API quota and usage limits
- Ensure deployment name matches your Azure configuration
Charts Not Rendering
- Check browser console for errors
- Verify data format is compatible with chart type
- Try a different chart type
- Clear browser cache and reload
