Local Development
A guide on how to run IntelliQ’s codebase locally.
Introduction
IntelliQ’s codebase is set up in a monorepo via Turborepo and is fully open-source on GitHub.
Here’s the monorepo structure:
Initial Setup
- Clone the repository:
- Install dependencies:
- Configure Git to ignore local changes to wrangler.toml:
This step is important to prevent accidentally committing your local development configuration changes to the production wrangler.toml file.
- Set up environment variables for the API:
- Configure your
.dev.vars
with your credentials:
Running the Development Environment
- Start the API server:
This will start the API server on http://localhost:8787
- In a new terminal, start the dashboard:
This will start the dashboard on http://localhost:3000
Development Notes
API Development
The API is built with Hono.js and runs on Cloudflare Workers. When running locally:
- API endpoints are available at
http://localhost:8787
- Documentation is available at
https://docs.intelliq.dev/api-reference/introduction
- The dashboard is configured to proxy API requests through Next.js
Dashboard Development
The dashboard is a Next.js application that:
- Uses Cloudflare Pages for deployment
- Integrates with Supabase for authentication
- Connects to the API server through a proxy configuration
Useful Commands
Troubleshooting
If you encounter issues:
- Ensure all environment variables are set correctly in
.dev.vars
- Check that the API server is running on port 8787
- Verify that your Supabase and Upstash credentials are correct
- For API issues, check the Wrangler logs in the terminal
- For dashboard issues, check the Next.js development logs
The API uses Cloudflare Workers, so make sure you have Wrangler CLI working correctly. The dashboard will automatically proxy API requests to the local API server in development.
Written by Ricky Raveanu