# Aptos Hackathon Project for Aptos Hackathon (backend) ## Features - Execute AI pipelines using OpenAI models - Integration with Model Context Protocol (MCP) - Convenient Telegram bot interface - Support for dynamic prompts and variables ## Running with Docker Compose (Recommended) ### Prerequisites - Docker and Docker Compose installed - `.env` file with required environment variables ### Setup 1. Copy `.env.example` to `.env` and configure the settings: ```bash cp .env.example .env ``` 2. Edit the `.env` file and set: - `OPENAI_API_KEY` - Your OpenAI API key - `TELEGRAM_BOT_TOKEN` - Your Telegram bot token (get it from @BotFather) - `MCP_SERVER_URL` - (Optional) MCP server URL ### Running the Application Build and start the container: ```bash docker-compose up --build -d ``` ### Viewing Logs ```bash docker-compose logs -f ``` ### Stopping the Application ```bash docker-compose down ``` ## Local Development ### Prerequisites - Bun installed - Node.js ### Installing Dependencies ```bash bun install ``` ### Running the Application In development mode with auto-reload: ```bash bun --watch src/main.ts ``` Or in production mode: ```bash bun run build bun start ``` ## Using the Bot 1. Find your bot on Telegram using the username you set with @BotFather 2. Start a chat with the bot 3. Send any message to the bot, and it will process it through the AI pipeline 4. The bot will respond with the AI's analysis or action ## Project Structure - `src/bot/` - Telegram bot implementation - `src/models/` - Data models and interfaces - `src/pipelines/` - Pipeline execution logic - `src/services/` - External service integrations - `src/main.ts` - Application entry point ## Development - Run linter: `bun run lint` - Type checking: `bun run ts:check` - Run all checks: `bun run check` - Code formatting: `bun run lint:fix` ## License MIT