This project is an advanced VK (VKontakte) group monitor that automatically fetches new posts from specified groups, rewrites them using AI, and stores both the original and rewritten versions. It's built with TypeScript, uses Ollama for AI-powered text generation, and leverages LevelDB for efficient data storage.
- 🔄 Real-time monitoring of multiple VK groups
- 🤖 AI-powered post rewriting using Ollama
- 💾 Efficient storage of posts and group states with LevelDB
- 🐳 Docker and Docker Compose support for easy deployment
- 🔌 Event-driven architecture for extensibility
- TypeScript
- Node.js
- VK Bridge API
- Ollama AI
- LevelDB
- Docker & Docker Compose
-
Clone the repository:
git clone https://github.com/yourusername/vk-group-monitor.git cd vk-group-monitor
-
Create a
.env
file in the project root and add your configuration:VK_ACCESS_TOKEN=your_vk_access_token GROUP_IDS=123456,789012 POLL_INTERVAL=60000 POSTS_PER_REQUEST=100 OLLAMA_HOST=http://ollama:11434 OLLAMA_MODEL=llama2 OLLAMA_PROMPT="Rewrite the following social media post in a more engaging way, keeping the main message intact:"
-
Build and run the project using Docker Compose:
docker-compose up --build
- The app connects to specified VK groups and fetches new posts at regular intervals.
- New posts are sent to the Ollama AI service for rewriting.
- Both original and rewritten posts are stored in LevelDB.
- The app emits events for new posts, processed posts, and errors, allowing for easy integration with other systems.
To set up the project for development:
-
Install dependencies:
npm install
-
Run in development mode:
npm run dev
-
Build the project:
npm run build
-
Run the built version:
npm start
Contributions, issues, and feature requests are welcome! Feel free to check issues page.
This project is MIT licensed.