|
| 1 | +# Contributing to Prezvik |
| 2 | + |
| 3 | +Thank you for your interest in contributing to Prezvik! This document provides guidelines and instructions for contributing. |
| 4 | + |
| 5 | +## Getting Started |
| 6 | + |
| 7 | +1. **Fork the repository** on GitHub |
| 8 | +2. **Clone your fork** locally: |
| 9 | + ```bash |
| 10 | + git clone https://github.com/YOUR_USERNAME/prezvik.git |
| 11 | + cd prezvik |
| 12 | + ``` |
| 13 | +3. **Install dependencies**: |
| 14 | + ```bash |
| 15 | + pnpm install |
| 16 | + ``` |
| 17 | +4. **Build all packages**: |
| 18 | + ```bash |
| 19 | + pnpm build |
| 20 | + ``` |
| 21 | +5. **Set up environment variables**: |
| 22 | + ```bash |
| 23 | + cp .env.example .env |
| 24 | + # Add your API keys to .env |
| 25 | + ``` |
| 26 | + |
| 27 | +## Development Workflow |
| 28 | + |
| 29 | +### Making Changes |
| 30 | + |
| 31 | +1. **Create a new branch** for your feature or fix: |
| 32 | + |
| 33 | + ```bash |
| 34 | + git checkout -b feature/your-feature-name |
| 35 | + ``` |
| 36 | + |
| 37 | +2. **Make your changes** following our coding standards |
| 38 | + |
| 39 | +3. **Build and test** your changes: |
| 40 | + |
| 41 | + ```bash |
| 42 | + # Build specific package |
| 43 | + pnpm --filter @prezvik/PACKAGE_NAME build |
| 44 | + |
| 45 | + # Run tests |
| 46 | + pnpm test |
| 47 | + |
| 48 | + # Test the CLI |
| 49 | + cd apps/cli |
| 50 | + node dist/index.js magic "test prompt" |
| 51 | + ``` |
| 52 | + |
| 53 | +4. **Commit your changes** with clear, descriptive messages: |
| 54 | + ```bash |
| 55 | + git add . |
| 56 | + git commit -m "feat: add new background style" |
| 57 | + ``` |
| 58 | + |
| 59 | +### Commit Message Convention |
| 60 | + |
| 61 | +We follow conventional commits: |
| 62 | + |
| 63 | +- `feat:` - New features |
| 64 | +- `fix:` - Bug fixes |
| 65 | +- `docs:` - Documentation changes |
| 66 | +- `style:` - Code style changes (formatting, etc.) |
| 67 | +- `refactor:` - Code refactoring |
| 68 | +- `test:` - Adding or updating tests |
| 69 | +- `chore:` - Maintenance tasks |
| 70 | + |
| 71 | +Examples: |
| 72 | + |
| 73 | +``` |
| 74 | +feat: add gradient-mesh background style |
| 75 | +fix: resolve text overflow in stat-trio layout |
| 76 | +docs: update README with new examples |
| 77 | +refactor: simplify positioning engine logic |
| 78 | +``` |
| 79 | + |
| 80 | +### Pull Request Process |
| 81 | + |
| 82 | +1. **Push your branch** to your fork: |
| 83 | + |
| 84 | + ```bash |
| 85 | + git push origin feature/your-feature-name |
| 86 | + ``` |
| 87 | + |
| 88 | +2. **Open a Pull Request** on GitHub with: |
| 89 | + - Clear title describing the change |
| 90 | + - Detailed description of what changed and why |
| 91 | + - Screenshots/examples if applicable |
| 92 | + - Reference any related issues |
| 93 | + |
| 94 | +3. **Wait for review** - maintainers will review your PR and may request changes |
| 95 | + |
| 96 | +4. **Address feedback** if requested |
| 97 | + |
| 98 | +5. **Merge** - once approved, your PR will be merged! |
| 99 | + |
| 100 | +## Project Structure |
| 101 | + |
| 102 | +``` |
| 103 | +prezvik/ |
| 104 | +├── apps/ |
| 105 | +│ ├── cli/ # Command-line interface |
| 106 | +│ ├── web/ # Next.js web application |
| 107 | +│ ├── api/ # Express REST API |
| 108 | +│ └── mcp-server/ # Model Context Protocol server |
| 109 | +├── packages/ |
| 110 | +│ ├── core/ # Pipeline orchestration |
| 111 | +│ ├── ai/ # AI integration (OpenAI, Anthropic, Groq) |
| 112 | +│ ├── schema/ # Zod schemas and validation |
| 113 | +│ ├── layout/ # Layout engine and strategies |
| 114 | +│ ├── design/ # Theme system and backgrounds |
| 115 | +│ ├── renderer-pptx/ # PowerPoint renderer |
| 116 | +│ └── ... # Other packages |
| 117 | +└── examples/ # Example presentations |
| 118 | +``` |
| 119 | + |
| 120 | +## Coding Standards |
| 121 | + |
| 122 | +### TypeScript |
| 123 | + |
| 124 | +- Use TypeScript for all code |
| 125 | +- Enable strict mode |
| 126 | +- Provide type annotations for public APIs |
| 127 | +- Avoid `any` - use `unknown` if type is truly unknown |
| 128 | + |
| 129 | +### Code Style |
| 130 | + |
| 131 | +- Use 2 spaces for indentation |
| 132 | +- Use semicolons |
| 133 | +- Use double quotes for strings |
| 134 | +- Max line length: 120 characters |
| 135 | +- Use meaningful variable names |
| 136 | + |
| 137 | +### Documentation |
| 138 | + |
| 139 | +- Add JSDoc comments for public functions and classes |
| 140 | +- Include examples in documentation |
| 141 | +- Update README.md if adding new features |
| 142 | +- Keep comments concise and relevant |
| 143 | + |
| 144 | +## Areas for Contribution |
| 145 | + |
| 146 | +### High Priority |
| 147 | + |
| 148 | +- **New Background Styles**: Add creative background generators |
| 149 | +- **Layout Strategies**: Implement new slide layout types |
| 150 | +- **Theme Presets**: Create industry-specific themes |
| 151 | +- **Bug Fixes**: Check GitHub issues for bugs |
| 152 | +- **Performance**: Optimize rendering and generation speed |
| 153 | + |
| 154 | +### Medium Priority |
| 155 | + |
| 156 | +- **Documentation**: Improve guides and examples |
| 157 | +- **Tests**: Add test coverage for untested code |
| 158 | +- **Examples**: Create example presentations |
| 159 | +- **Internationalization**: Add multi-language support |
| 160 | + |
| 161 | +### Advanced |
| 162 | + |
| 163 | +- **New Renderers**: Implement Google Slides, PDF, or HTML renderers |
| 164 | +- **AI Providers**: Add support for new AI providers |
| 165 | +- **Layout Engine**: Improve positioning algorithms |
| 166 | +- **Web UI**: Enhance the web application |
| 167 | + |
| 168 | +## Testing |
| 169 | + |
| 170 | +### Running Tests |
| 171 | + |
| 172 | +```bash |
| 173 | +# Run all tests |
| 174 | +pnpm test |
| 175 | + |
| 176 | +# Run tests for specific package |
| 177 | +pnpm --filter @prezvik/layout test |
| 178 | + |
| 179 | +# Run tests in watch mode |
| 180 | +pnpm --filter @prezvik/layout test --watch |
| 181 | +``` |
| 182 | + |
| 183 | +### Writing Tests |
| 184 | + |
| 185 | +- Place tests next to the code they test (e.g., `foo.test.ts` next to `foo.ts`) |
| 186 | +- Use descriptive test names |
| 187 | +- Test edge cases and error conditions |
| 188 | +- Aim for high coverage on critical paths |
| 189 | + |
| 190 | +## Getting Help |
| 191 | + |
| 192 | +- **GitHub Issues**: For bugs and feature requests |
| 193 | +- **Discussions**: For questions and general discussion |
| 194 | +- **Documentation**: Check README.md and package-specific docs |
| 195 | + |
| 196 | +## Code of Conduct |
| 197 | + |
| 198 | +### Our Standards |
| 199 | + |
| 200 | +- Be respectful and inclusive |
| 201 | +- Welcome newcomers |
| 202 | +- Accept constructive criticism |
| 203 | +- Focus on what's best for the community |
| 204 | +- Show empathy towards others |
| 205 | + |
| 206 | +### Unacceptable Behavior |
| 207 | + |
| 208 | +- Harassment or discriminatory language |
| 209 | +- Trolling or insulting comments |
| 210 | +- Personal or political attacks |
| 211 | +- Publishing others' private information |
| 212 | +- Other unprofessional conduct |
| 213 | + |
| 214 | +## Recognition |
| 215 | + |
| 216 | +Contributors will be recognized in: |
| 217 | + |
| 218 | +- GitHub contributors list |
| 219 | +- Release notes for significant contributions |
| 220 | +- Special mentions for major features |
| 221 | + |
| 222 | +## Questions? |
| 223 | + |
| 224 | +Feel free to open an issue or discussion if you have questions about contributing! |
| 225 | + |
| 226 | +--- |
| 227 | + |
| 228 | +Thank you for contributing to Prezvik! 🎉 |
0 commit comments