|
| 1 | +# Contributing to Evo AI |
| 2 | + |
| 3 | +We welcome contributions from the community! Please follow the guidelines below to help us maintain a high-quality, consistent, and secure project. |
| 4 | + |
| 5 | +--- |
| 6 | + |
| 7 | +## 📋 Prerequisites |
| 8 | + |
| 9 | +- **Backend**: Python 3.10+, PostgreSQL 13+, Redis 6+, Git, Make |
| 10 | +- **Frontend**: Node.js 18+, pnpm (recommended), or npm/yarn |
| 11 | + |
| 12 | +--- |
| 13 | + |
| 14 | +## 🚀 Setting Up the Development Environment |
| 15 | + |
| 16 | +### 1. Clone the Repository |
| 17 | + |
| 18 | +```bash |
| 19 | +git clone https://github.com/EvolutionAPI/evo-ai.git |
| 20 | +cd evo-ai |
| 21 | +```` |
| 22 | + |
| 23 | +### 2. Backend Setup |
| 24 | + |
| 25 | +```bash |
| 26 | +make venv |
| 27 | +source venv/bin/activate # On Linux/Mac |
| 28 | +# Or: venv\Scripts\activate # On Windows |
| 29 | +
|
| 30 | +make install-dev |
| 31 | +
|
| 32 | +cp .env.example .env |
| 33 | +# Edit .env with your local settings |
| 34 | +
|
| 35 | +make alembic-upgrade |
| 36 | +make seed-all |
| 37 | +``` |
| 38 | + |
| 39 | +### 3. Frontend Setup |
| 40 | + |
| 41 | +```bash |
| 42 | +cd frontend |
| 43 | +pnpm install # Or: npm install / yarn install |
| 44 | +
|
| 45 | +cp .env.example .env |
| 46 | +# Edit .env with your API URL, e.g., NEXT_PUBLIC_API_URL=http://localhost:8000 |
| 47 | +``` |
| 48 | + |
| 49 | +### 4. Running the Application |
| 50 | + |
| 51 | +* **Backend**: |
| 52 | + |
| 53 | + ```bash |
| 54 | + make run |
| 55 | + # Backend: http://localhost:8000 |
| 56 | + ``` |
| 57 | + |
| 58 | +* **Frontend**: |
| 59 | + |
| 60 | + ```bash |
| 61 | + cd frontend |
| 62 | + pnpm dev |
| 63 | + # Frontend: http://localhost:3000 |
| 64 | + ``` |
| 65 | + |
| 66 | +--- |
| 67 | + |
| 68 | +## 📝 Issue and Pull Request Guidelines |
| 69 | + |
| 70 | +* **Check for existing issues** before creating a new one. |
| 71 | +* **Describe bugs or feature requests** clearly with steps to reproduce (if applicable). |
| 72 | +* **Pull Requests** should: |
| 73 | + |
| 74 | + * Reference relevant issues (e.g., `Fixes #123`) |
| 75 | + * Focus on one change at a time |
| 76 | + * Include tests where applicable |
| 77 | + * Pass linting and formatting checks |
| 78 | + |
| 79 | +--- |
| 80 | + |
| 81 | +## 🧑💻 Code Standards |
| 82 | + |
| 83 | +* **All code comments, docstrings, and log messages must be in English** |
| 84 | +* **Variable, function, and class names**: English only |
| 85 | +* **API error messages and documentation**: English |
| 86 | +* **Commit messages**: English and follow [Conventional Commits](https://www.conventionalcommits.org/) |
| 87 | + |
| 88 | + * Example: `feat(auth): add password reset functionality` |
| 89 | +* **Indentation**: 4 spaces |
| 90 | +* **Max line length**: 79 characters |
| 91 | + |
| 92 | +--- |
| 93 | + |
| 94 | +## 📂 Project Structure and Best Practices |
| 95 | + |
| 96 | +* Follow the directory structure and naming conventions described in `.cursorrules`. |
| 97 | +* **Tests** should be placed under `tests/` and follow the `test_*` naming convention. |
| 98 | +* All routes require input validation using Pydantic schemas. |
| 99 | +* Use transactions for database operations affecting multiple records. |
| 100 | +* Document all public functions and classes. |
| 101 | +* Keep `.env.example` updated when adding environment variables. |
| 102 | +* Sensitive values must be set via environment variables and never hard-coded. |
| 103 | + |
| 104 | +--- |
| 105 | + |
| 106 | +## 🐳 Docker Development |
| 107 | + |
| 108 | +* **Build and start stack:** |
| 109 | + |
| 110 | + ```bash |
| 111 | + make docker-build |
| 112 | + make docker-up |
| 113 | + ``` |
| 114 | +* **Seed database:** |
| 115 | + |
| 116 | + ```bash |
| 117 | + make docker-seed |
| 118 | + ``` |
| 119 | +* **Stop stack:** |
| 120 | + |
| 121 | + ```bash |
| 122 | + make docker-down |
| 123 | + ``` |
| 124 | + |
| 125 | +--- |
| 126 | + |
| 127 | +## 🔐 Contributor License |
| 128 | + |
| 129 | +By contributing to this repository, you agree that your contributions will be licensed under the [Apache License 2.0](./LICENSE). |
| 130 | + |
| 131 | +--- |
| 132 | + |
| 133 | +## 💬 Community and Support |
| 134 | + |
| 135 | +* [WhatsApp Group](https://evolution-api.com/whatsapp) |
| 136 | +* [Discord Community](https://evolution-api.com/discord) |
| 137 | +* [Official Documentation](https://doc.evolution-api.com) |
| 138 | + |
| 139 | +--- |
| 140 | + |
| 141 | +Thank you for contributing to Evo AI! |
0 commit comments