Prerequisites
Before you begin, make sure you have the following installed:- Node.js (version 18 or higher)
- npm or yarn package manager
- Git for version control
Installation Methods
Option 1: Direct Creation (Recommended)
The easiest way to create a new project is using npx:- Prompt you for a project name
- Create a new directory with all boilerplate files
- Set up the basic project structure
Option 2: Global Installation
You can also install the boilerplate globally:Project Setup
1. Install Dependencies
Navigate to your project directory and install dependencies:2. Get Your Moorcheh API Key
You’ll need an API key to connect to Moorcheh AI services:1
Visit Console
Go to Moorcheh Console
2
Sign Up/Login
Create an account or log in to your existing account
3
Get API Key
Navigate to API Keys and create a new key
4
Copy Key
Copy your API key for the next step
3. Create Text Namespace
Set up a namespace to store your documents for AI chat:1
Visit Namespaces
2
Create Namespace
Click “Create Namespace” and choose “Text” as the type
3
Name Your Namespace
Enter a descriptive name (e.g., “my-chat-docs”)
4
Upload Documents
Upload your documents to the namespace
Supported file formats: PDF, DOCX, CSV, JSON, TXT, MD, Excel files
4. Set Environment Variables
Create a.env.local file in your project root:
5. Configure API Settings
Set up your API configuration using the Moorcheh Console Playground:1
Visit Playground
2
Select Namespace
Choose your text namespace from the dropdown
3
Choose AI Model
Select your preferred AI model
4
Configure Settings
Adjust temperature, top-k, and other parameters
5
Export Configuration
Click “Export” to download the configuration JSON
6
Save Configuration
Copy the JSON content into
config/api-config.json in your project6. Start Development Server
You’re ready to start developing! Run the development server:Interactive Setup (Optional)
Use the interactive setup flow to customize your application: Visit http://localhost:3000/landing for our 4-step interactive setup:Step 1: API Key Setup
Connect to Moorcheh AI services
Step 2: Branding
Configure app name, company, and contact info
Step 3: Theme Selection
Choose from 10+ beautiful themes
Step 4: Typography & Complete
Configure fonts and finish setup
Testing Your Setup
Demo Page
Visit http://localhost:3000/demo to test themes and fonts.Chat Interface
Your main chat interface is available at http://localhost:3000.Troubleshooting
Common Issues
Build Errors
Build Errors
- Ensure Node.js version 18+ is installed
- Check that all dependencies are installed with
npm install - Verify your environment variables are set correctly
API Connection Issues
API Connection Issues
- Verify your API key is correct
- Check that your namespace exists and has documents
- Ensure your configuration file is properly formatted
Theme/Font Issues
Theme/Font Issues
- Clear browser cache
- Check that configuration files are saved correctly
- Restart the development server
Getting Help
If you encounter issues:- Check the configuration guide
- Review the deployment guide
- Contact support at support@moorcheh.ai