Skip to main content

Quick Start Guide

Get the llms.txt Generator running locally in under 5 minutes. This guide will walk you through setting up both the backend and frontend for development.

Prerequisites

Before you begin, ensure you have the following installed:

Python 3.11+

Required for the FastAPI backend

Node.js 20+

Required for the Next.js frontend

Git

For cloning the repository
Docker is optional but recommended for simplified deployment. See the Docker Setup section below.

Installation

1

Clone the Repository

Clone the project to your local machine:
2

Backend Setup

Set up the Python environment and install dependencies:
The requirements.txt includes:
Install Playwright browsers:
3

Backend Environment Configuration

Create your backend environment file:
Edit .env with your configuration:
At minimum, you need to configure R2 storage and Supabase. The Brightdata proxy is optional and only needed for JavaScript-heavy websites.
4

Frontend Setup

In a new terminal, navigate to the frontend directory:
Create the frontend environment file:
Edit .env.local:
5

Start the Servers

Start both servers in separate terminals:
You should see:
  • Backend: INFO: Uvicorn running on http://127.0.0.1:8000
  • Frontend: Ready on http://localhost:3000
6

Access the Application

Open your browser and navigate to:

Generate Your First llms.txt

Now that everything is running, let’s generate your first llms.txt file:
1

Open the Web Interface

Navigate to http://localhost:3000 in your browser.
2

Enter a Website URL

Enter a website URL you want to crawl. For testing, try:
  • https://docs.python.org
  • https://fastapi.tiangolo.com
  • Your own documentation site
3

Configure Crawl Parameters

Adjust the settings based on your needs:
  • Max Pages: Number of pages to crawl (default: 50)
  • Description Length: Character limit for page excerpts (default: 500)
  • Enable Auto-Update: Schedule periodic recrawls (optional)
  • Recrawl Interval: Minutes between updates (default: 360)
  • LLM Enhancement: AI-powered optimization (optional)
  • Use Brightdata: For JavaScript-heavy sites (optional)
4

Start Crawling

Click “Generate llms.txt” and watch the real-time progress in the log window.You’ll see messages like:
5

Get Your Results

Once complete, you’ll receive:
  • Generated llms.txt content (viewable in browser)
  • Download button for the file
  • Public CDN URL for hosting
  • Copy button for quick sharing

Understanding the WebSocket API

The backend uses WebSockets for real-time communication. Here’s how the protocol works:

Connection

Send Request

Receive Messages

The server sends different message types:

Implementation Example

Here’s the core WebSocket handler from the backend:

Docker Setup (Optional)

For a simpler setup, use Docker Compose:
1

Configure Environment Files

Create .env files as described in steps 3-4 above.
2

Start Services

This starts both backend and frontend:
3

Access the Application

Same URLs as manual setup:

Troubleshooting

Make sure you’ve activated the virtual environment and installed dependencies:
Install Playwright browsers:
Verify:
  1. Backend is running on port 8000
  2. CORS_ORIGINS includes your frontend URL
  3. API key is configured (if required)
  4. Check browser console for error messages
Ensure your R2 credentials are correct:
  • Endpoint URL format: https://<account-id>.r2.cloudflarestorage.com
  • Access key and secret key are valid
  • Bucket exists and is accessible
  • Public domain is configured correctly
Check NEXT_PUBLIC_WS_URL in .env.local:
  • Should be ws://localhost:8000/ws/crawl for local development
  • Use wss:// for production with HTTPS

Next Steps

Configuration Guide

Learn about all configuration options and environment variables

API Reference

Explore the full API documentation and endpoints

Deployment

Deploy to AWS with Terraform for production use

Architecture

Deep dive into system architecture and components
For production deployment, see the Deployment Guide which covers AWS ECS, Lambda, and infrastructure setup with Terraform.