Fatou is a Nest.js-based API that provides a powerful interface to interact with Claude. It currently uses claude-3-opus-20240229
and is designed to handle both general queries and application analysis.
- 🤖 Claude AI Integration (claude-3-opus-20240229)
- 🔐 API Key Authentication with Master/User key system
- 📁 Context Management System with file upload/download
- 💰 Token-based Access Control (Base Chain)
- 📊 Usage Tracking and Cost Management
- 🔄 Conversation History Management
- 📝 Markdown File Analysis Support
We also can add interactions with any other LLM services.
- Live Demo - Try the UI interface (chat with Francesca, Julien's faithful assistant)
- Technical Documentation - Full API documentation
- Zhankai - Generate app description files
- Node.js 16+
- pnpm
- Ethereum wallet (for authentication)
- Required token balance on Base Chain
# Clone the repository
git clone https://github.com/yourusername/fatou.git
# Install dependencies
pnpm i
# Configure environment variables
cp .env.template .env
# Edit .env with your values
Required environment variables:
ANTHROPIC_API_KEY= # Your Claude API key
MASTER_KEY= # Master key for admin access
BASE_RPC_URL= # Base Chain RPC URL
BASE_TOKEN_ADDRESS= # Token contract address
# Start development server
pnpm start:dev
# Run in production mode
pnpm start:prod
# Run tests
pnpm test # Unit tests
pnpm test:e2e # E2E tests
pnpm test:cov # Test coverage
curl -X POST http://localhost:3000/auth/get-message \
-H "Content-Type: application/json" \
-d '{"walletAddress": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"}'
curl -X POST http://localhost:3000/ai/ask \
-H "Content-Type: multipart/form-data" \
-H "x-api-key: your-api-key-here" \
-F "message=Your question here" \
-F "file=@your_file.md"
# Upload context file
curl -X POST http://localhost:3000/context-files/add-context \
-H "x-api-key: your-api-key-here" \
-F "[email protected]"
# Download context file
curl -X POST http://localhost:3000/context-files/download-context \
-H "x-api-key: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{"filename": "context.md"}'
fatou/
├── data/ # Persistent data storage
│ ├── contexts/ # Context files for API keys
│ ├── api-keys.json # API key database
│ ├── costs.json # Usage tracking
│ └── db.json # Conversation history
├── uploads/ # Temporary file uploads
└── src/ # Source code
git pull origin main
pnpm i
pnpm build
pm2 restart fatou
pm2 logs
- 1GB RAM minimum
- 10GB storage
- Node.js 16+
- PM2 for process management
- HTTPS enabled
Feel free to reach out through any of these channels:
- 💬 Element: @julienbrg:matrix.org
- 🦄 Farcaster: julien-
- 📱 Telegram: @julienbrg
- 🐦 Twitter: @julienbrg
- 🎮 Discord: julienbrg
- 💼 LinkedIn: julienberanger
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.