fb1fe0c2434676a9142f169da37120277548e839
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
.envfile with required environment variables
Setup
- Copy
.env.exampleto.envand configure the settings:
cp .env.example .env
- Edit the
.envfile and set:OPENAI_API_KEY- Your OpenAI API keyTELEGRAM_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:
docker-compose up --build -d
Viewing Logs
docker-compose logs -f
Stopping the Application
docker-compose down
Local Development
Prerequisites
- Bun installed
- Node.js
Installing Dependencies
bun install
Running the Application
In development mode with auto-reload:
bun --watch src/main.ts
Or in production mode:
bun run build
bun start
Using the Bot
- Find your bot on Telegram using the username you set with @BotFather
- Start a chat with the bot
- Send any message to the bot, and it will process it through the AI pipeline
- The bot will respond with the AI's analysis or action
Project Structure
src/bot/- Telegram bot implementationsrc/models/- Data models and interfacessrc/pipelines/- Pipeline execution logicsrc/services/- External service integrationssrc/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
Languages
TypeScript
99.2%
Dockerfile
0.8%