A full-stack application that analyzes websites' robots.txt files to check if they are optimized for AI crawlers. The application provides detailed insights, recommendations, and a diff view of suggested changes.
- Analyze any website's robots.txt file
- Check AI crawler access permissions
- Generate optimization recommendations
- Provide diff view of suggested changes
- Modern, responsive UI
- Real-time analysis
- Python 3.11+
- FastAPI
- httpx for async HTTP requests
- Pydantic for data validation
- Next.js 14
- TypeScript
- Tailwind CSS
- React Query for API calls
- react-diff-viewer-continued
- Python 3.11 or higher
- Node.js 18 or higher
- npm or yarn
-
Navigate to the backend directory:
cd backend
-
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: `venv\Scripts\activate`
-
Install dependencies:
pip install -r requirements.txt
-
Start the FastAPI server:
fastapi dev app/main.py
The backend API will be available at http://localhost:8000
-
Navigate to the frontend directory:
cd frontend
-
Install dependencies:
You will see an error after running npm install
, simply run the second command listed below in order to fix the error
npm install
npm install react-diff-viewer-continued --legacy-peer-deps
-
Copy the .env.example file into a .env file
-
Start the development server:
npm run dev
The frontend will be available at http://localhost:3000
The API provides the following endpoint:
Analyzes a website's robots.txt file for AI crawler optimization.
Request Body:
{
"url": "example.com"
}
Response:
{
"isOptimized": boolean,
"rawContent": string,
"aiBotAccess": {
"allowed": boolean,
"details": string
},
"diff": {
"originalContent": string,
"adjustedContent": string,
"summary": string,
"recommendations": string[]
}
}
The application handles various error cases:
- Invalid URLs
- Failed robots.txt fetches
- Forbidden access (403)
- Redirect loops
- Parsing errors
Run the backend tests:
cd backend
pytest
Run the frontend tests:
cd frontend
npm test
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.