{"id":25403991,"url":"https://github.com/right-git/jessy","last_synced_at":"2025-10-31T00:31:13.751Z","repository":{"id":268762716,"uuid":"905384917","full_name":"right-git/jessy","owner":"right-git","description":"✨ Jessy: Your go-to template for Telegram bots with Aiogram! 🤖  Get up and running fast with Docker, PostgreSQL, and Alembic for database migrations. Perfect for bootstrapping your next project! 🚀😄","archived":false,"fork":false,"pushed_at":"2025-01-09T08:42:36.000Z","size":23,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-25T14:29:10.492Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/right-git.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-18T18:03:11.000Z","updated_at":"2025-01-09T08:42:39.000Z","dependencies_parsed_at":"2024-12-18T19:37:39.279Z","dependency_job_id":"6b0c9a5b-0296-4042-8a9c-a20e7ff25019","html_url":"https://github.com/right-git/jessy","commit_stats":null,"previous_names":["iismoilov7/jessy","rayt-git/jessy","right-git/jessy"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/right-git%2Fjessy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/right-git%2Fjessy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/right-git%2Fjessy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/right-git%2Fjessy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/right-git","download_url":"https://codeload.github.com/right-git/jessy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239084395,"owners_count":19578773,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-16T03:38:38.789Z","updated_at":"2025-10-31T00:31:13.745Z","avatar_url":"https://github.com/right-git.png","language":"Python","readme":"# 🤖 Jessy\n\n\u003e A modern, production-ready template for creating Telegram bots using [Aiogram](https://docs.aiogram.dev/) 🚀\n\nThis template includes essential setup for Docker 🐳, PostgreSQL 🐘, and Alembic for database migrations, making it easy to bootstrap your next Telegram bot project with best practices and clean architecture.\n\n---\n\n## ✨ Features\n\n- 🤖 **Aiogram Framework:** A modern and efficient async framework for Telegram bots\n- 🗄️ **Database Integration:** Pre-configured with PostgreSQL and SQLAlchemy ORM\n- 🔄 **Database Migrations:** Integrated with Alembic for schema migrations\n- 🐳 **Dockerized Setup:** Docker Compose configuration for easy deployment\n- 🔧 **Environment Variables:** Centralized configuration using a `.env` file\n- 📊 **Structured Logging:** Loguru-based logging with file rotation\n- 🛡️ **Anti-Flood Protection:** Built-in middleware to prevent spam\n- 👥 **User Management:** Automatic user tracking and activity monitoring\n- 🔐 **Admin Panel:** Built-in admin commands and user management\n- 🎯 **Clean Architecture:** Modular design with separation of concerns\n\n---\n\n## 📁 Project Structure\n\n```\njessy/\n├── 📂 app/                  # Main application code\n│   ├── 🤖 bot.py            # Bot entry point and dispatcher setup\n│   ├── 🔘 buttons/          # Telegram keyboard/button definitions\n│   ├── ⚙️ config/           # Configuration and environment loading\n│   ├── 🗄️ database/         # Database models, access, and admin/user logic\n│   ├── 📝 handlers/         # Message handlers for users and admins\n│   ├── 🔗 middlewares/      # Custom aiogram middlewares\n│   └── 🛠️ utils/            # Filters, states, and utility code\n├── 📂 migrations/           # Alembic migration scripts\n├── 📂 logs/                 # Log files (created at runtime)\n├── 📂 docs/                 # Documentation\n│   └── 📄 CODE.md           # Code principles and project structure\n├── 🚀 main.py               # Simple hello-world entry (for testing)\n├── 🐚 run.sh                # Shell script to run the bot\n├── 📋 requirements.txt      # Python dependencies\n├── ⚙️ pyproject.toml        # Project metadata and dependencies\n├── 🐳 Dockerfile            # Docker build instructions\n├── 🐙 docker-compose.yml    # Docker Compose setup for bot and DB\n├── 🔄 alembic.ini           # Alembic configuration\n├── 📖 README.md             # Main project documentation\n└── 📄 LICENSE               # License file\n```\n\n\u003e 📚 **Want to learn more about the code structure?** Check out our [📄 CODE.md](docs/CODE.md) for detailed code principles and architecture guidelines!\n\n---\n\n## 🚀 Getting Started\n\n### 📋 Prerequisites\n- 🐍 Python 3.10+\n- 🐳 Docker \u0026 Docker Compose\n- 🐘 PostgreSQL (if running locally without Docker)\n\n### ⚙️ Setup\n\n#### 1️⃣ Clone the Repository\n```bash\ngit clone https://github.com/right-git/jessy.git\ncd jessy\n```\n\n#### 2️⃣ Create a `.env` File\nCreate a `.env` file in the project root with your configuration:\n```bash\n# Bot Configuration\nBOT_TOKEN=your_bot_token_here\nADMINS_ID=123456789,987654321\n\n# Database Configuration\nDB_URL_ASYNC=postgresql+asyncpg://user:password@localhost:5432/dbname\nDB_URL=postgresql://user:password@localhost:5432/dbname\nDB_USERNAME=your_db_user\nDB_PASSWORD=your_db_password\nDB_NAME=your_db_name\nDB_PORT=5432\n```\n\n#### 3️⃣ Build and Start the Project\nUsing Docker Compose (recommended):\n```bash\ndocker-compose up --build\n```\n\nThis will:\n- 🏗️ Build the `bot` service\n- 🐘 Spin up a PostgreSQL database\n- 🤖 Run the Telegram bot automatically\n\n---\n\n## 🎯 Usage\n\n### 🤖 Starting the Bot\nThe bot starts automatically when the `bot` container is running.\n\n### 📊 Accessing Logs\nTo view logs:\n```bash\ndocker-compose logs -f bot\n```\n\n### 🛑 Stopping the Services\n```bash\ndocker-compose down\n```\n\n---\n\n## 💻 Development\n\n### 📦 Install Dependencies\nIf you prefer running the bot locally:\n\n1. 🐘 Set up PostgreSQL database and configure `.env` file\n2. 📦 Install dependencies:\n   ```bash\n   pip install -r requirements.txt\n   ```\n   or using `uv` (faster):\n   ```bash\n   uv sync\n   ```\n   or\n   ```bash\n   uv add -r requirements.txt\n   ```\n3. 🔄 Apply database migrations:\n   ```bash\n   alembic upgrade head\n   ```\n4. 🚀 Start the bot:\n   ```bash\n   bash run.sh\n   ```\n\n---\n\n## 🌐 Deployment\n\nThis template is designed for easy deployment via Docker. You can use platforms like:\n\n- ☁️ [Heroku](https://www.heroku.com/)\n- ☁️ [AWS](https://aws.amazon.com/)\n- ☁️ [DigitalOcean](https://www.digitalocean.com/)\n- ☁️ [Railway](https://railway.app/)\n- ☁️ [Render](https://render.com/)\n\n---\n\n## 🤝 Contributing\n\nWe welcome contributions! Here's how you can help:\n\n1. 🍴 Fork the repository\n2. 🌿 Create a feature branch:\n   ```bash\n   git checkout -b feature/your-feature-name\n   ```\n3. 💾 Commit your changes:\n   ```bash\n   git commit -m \"✨ Add your commit message\"\n   ```\n4. 📤 Push to the branch:\n   ```bash\n   git push origin feature/your-feature-name\n   ```\n5. 🔄 Create a Pull Request\n\n### 📋 Contribution Guidelines\n- 📖 Read our [CODE.md](docs/CODE.md) for coding standards\n- 🧪 Write tests for new features\n- 📝 Update documentation when needed\n- 🎨 Follow the existing code style\n\n---\n\n## 📄 License\n\nThis project is licensed under the MIT License. See the [`LICENSE`](LICENSE) file for details.\n\n---\n\n## 🙏 Acknowledgments\n\n- 📚 [Aiogram Documentation](https://docs.aiogram.dev/)\n- 🐳 [Docker Documentation](https://docs.docker.com/)\n- 🔄 [Alembic Documentation](https://alembic.sqlalchemy.org/)\n- 🐍 [Python Documentation](https://docs.python.org/)\n\n---\n\n## 🆘 Support\n\nNeed help? Here's how to get support:\n\n- 🐛 **Bug Reports:** Open an [issue](https://github.com/right-git/jessy/issues)\n- 💡 **Feature Requests:** Create a feature request issue\n- 📖 **Documentation:** Check our [CODE.md](docs/CODE.md) for detailed guides\n- 💬 **Discussions:** Use GitHub Discussions for questions\n\n---\n\n## ⭐ Show Your Support\n\nIf this project helped you, please give it a star! ⭐\n\n[![Stars](https://img.shields.io/github/stars/right-git/jessy?style=social)](https://github.com/right-git/jessy)\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n**Made with ❤️ for the Telegram Bot Community**\n\n\u003c/div\u003e \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fright-git%2Fjessy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fright-git%2Fjessy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fright-git%2Fjessy/lists"}