Repository navigation
docs: add contributing guidelines and github templates #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| --- | ||
| name: Bug Report | ||
| about: Create a report to help us improve | ||
| title: 'bug: [Short description]' | ||
| labels: bug | ||
| assignees: '' | ||
|
|
||
| --- | ||
|
|
||
| **Describe the bug** | ||
| A clear and concise description of what the bug is. | ||
|
|
||
| **To Reproduce** | ||
| Steps to reproduce the behavior: | ||
| 1. Go to '...' | ||
| 2. Click on '....' | ||
| 3. Scroll down to '....' | ||
| 4. See error | ||
|
|
||
| **Expected behavior** | ||
| A clear and concise description of what you expected to happen. | ||
|
|
||
| **Screenshots** | ||
| If applicable, add screenshots to help explain your problem. | ||
|
|
||
| **Desktop (please complete the following information):** | ||
| - OS: [e.g. macOS, Windows 10, Ubuntu 22.04] | ||
| - Browser: [e.g. chrome, safari] | ||
| - Version: [e.g. 22] | ||
|
|
||
| **Additional context** | ||
| Add any other context about the problem here. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| --- | ||
| name: Feature Request | ||
| about: Suggest an idea for this project | ||
| title: 'feat: [Short description]' | ||
| labels: enhancement | ||
| assignees: '' | ||
|
|
||
| --- | ||
|
|
||
| **Is your feature request related to a problem? Please describe.** | ||
| A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
|
||
| **Describe the solution you'd like** | ||
| A clear and concise description of what you want to happen. | ||
|
|
||
| **Describe alternatives you've considered** | ||
| A clear and concise description of any alternative solutions or features you've considered. | ||
|
|
||
| **Additional context** | ||
| Add any other context or screenshots about the feature request here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| ## Description | ||
| Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. | ||
|
|
||
| Fixes # (issue) | ||
|
|
||
| ## Type of change | ||
| Please delete options that are not relevant. | ||
|
|
||
| - [ ] Bug fix (non-breaking change which fixes an issue) | ||
| - [ ] New feature (non-breaking change which adds functionality) | ||
| - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) | ||
| - [ ] This change requires a documentation update | ||
|
|
||
| ## How Has This Been Tested? | ||
| Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration | ||
|
|
||
| - [ ] Test A | ||
| - [ ] Test B | ||
|
|
||
| **Test Configuration**: | ||
| * Backend version: | ||
| * Frontend version: | ||
| * Browser: | ||
|
|
||
| ## Checklist: | ||
| - [ ] My code follows the style guidelines of this project | ||
| - [ ] I have performed a self-review of my own code | ||
| - [ ] I have commented my code, particularly in hard-to-understand areas | ||
| - [ ] I have made corresponding changes to the documentation | ||
| - [ ] My changes generate no new warnings | ||
| - [ ] I have added tests that prove my fix is effective or that my feature works | ||
| - [ ] New and existing unit tests pass locally with my changes | ||
| - [ ] Any dependent changes have been merged and published in downstream modules |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,152 +1,112 @@ | ||
| # Contributing to LiveEdit | ||
|
|
||
| Thank you for your interest in contributing to LiveEdit! We appreciate all contributions, whether they're bug reports, feature requests, documentation improvements, or code changes. | ||
| Thank you for your interest in contributing to LiveEdit! This guide will help you get started with the development environment and explain our contribution process. | ||
|
|
||
| ## Getting Started | ||
| ## 🚀 Getting Started | ||
|
|
||
| ### Prerequisites | ||
| - Python 3.8+ (for backend) | ||
| - Node.js 16+ and npm (for frontend) | ||
| - Docker (optional, but recommended) | ||
| - Git | ||
| - **Git** | ||
| - **Node.js 18+** and **npm** | ||
| - **Python 3.10+** | ||
| - **FFmpeg** (for video processing) | ||
| - **Redis** (local or managed like Upstash) | ||
| - **PostgreSQL** (local or managed like Neon) | ||
|
|
||
| ### Development Setup | ||
| ### Development Environment Setup | ||
|
|
||
| #### Backend Setup | ||
| #### 1. Fork and Clone | ||
| ```bash | ||
| git clone https://github.com/your-username/LiveEdit.git | ||
| cd LiveEdit | ||
| ``` | ||
|
|
||
| #### 2. Backend Setup | ||
| ```bash | ||
| cd LiveEditBackend | ||
| python3 -m venv venv | ||
| source venv/bin/activate # On Windows: venv\Scripts\activate | ||
| pip install -r requirements.txt | ||
| python init_db.py | ||
| export GOOGLE_APPLICATION_CREDENTIALS="path/to/credentials.json" | ||
| python app.py | ||
| cp .env.example .env # Configure your environment variables | ||
| python init_db.py # Initialize the database | ||
| ``` | ||
|
|
||
| #### Frontend Setup | ||
| #### 3. Frontend Setup | ||
| ```bash | ||
| cd LiveEditFronten | ||
| cd ../LiveEditFronten | ||
| npm install | ||
| npm run dev | ||
| ``` | ||
|
|
||
| For detailed backend and frontend deployment instructions, see [DEPLOYMENT.md](DEPLOYMENT.md). | ||
|
|
||
| ## Project Structure | ||
|
|
||
| ``` | ||
| LiveEditProject/ | ||
| ├── LiveEditBackend/ # Python Flask backend with AI integrations | ||
| │ ├── app.py # Main Flask application | ||
| │ ├── video_tasks.py # Celery task definitions | ||
| │ ├── ai_client.py # AI service integrations | ||
| │ └── requirements.txt # Python dependencies | ||
| ├── LiveEditFronten/ # React/TypeScript frontend | ||
| │ ├── components/ # React components | ||
| │ ├── services/ # API and external service clients | ||
| │ ├── hooks/ # Custom React hooks | ||
| │ └── package.json # Node.js dependencies | ||
| └── [Documentation files] # Architecture, deployment guides, etc. | ||
| cp .env.local.example .env.local # Configure backend URL and API keys | ||
| ``` | ||
|
|
||
| ## Development Workflow | ||
|
|
||
| 1. **Fork and Clone** | ||
| ```bash | ||
| git clone https://github.com/yourusername/LiveEditProject.git | ||
| cd LiveEditProject | ||
| ``` | ||
|
|
||
| 2. **Create a Feature Branch** | ||
| ```bash | ||
| git checkout -b feature/your-feature-name | ||
| ``` | ||
|
|
||
| 3. **Make Your Changes** | ||
| - Keep commits focused and atomic | ||
| - Write clear commit messages | ||
| - Follow the code style guidelines below | ||
|
|
||
| 4. **Test Your Changes** | ||
| - Backend: Run unit tests and manual API testing | ||
| - Frontend: Test in dev server and verify UI/UX | ||
| - Test both locally and with Docker if possible | ||
|
|
||
| 5. **Push and Submit a Pull Request** | ||
| ```bash | ||
| git push origin feature/your-feature-name | ||
| ``` | ||
| - Provide a clear description of your changes | ||
| - Reference any related issues | ||
| - Ensure CI/CD checks pass | ||
|
|
||
| ## Code Style Guidelines | ||
|
|
||
| ### Backend (Python) | ||
| - Follow PEP 8 conventions | ||
| - Use meaningful variable and function names | ||
| - Add docstrings to functions and classes | ||
| - Keep functions focused and modular | ||
| #### 4. Running the Application | ||
| We provide helper scripts in the root directory: | ||
| - `./start-backend.sh`: Starts the Flask API | ||
| - `./start-frontend.sh`: Starts the Vite dev server | ||
| - `./start-celery.sh`: Starts the Celery worker | ||
|
|
||
| ### Frontend (TypeScript/React) | ||
| - Use functional components with hooks | ||
| - Follow TypeScript strict mode | ||
| - Use meaningful component and variable names | ||
| - Keep components focused and reusable | ||
| - Maintain consistent formatting (consider using Prettier) | ||
| ## 🧪 Testing | ||
|
|
||
| ## Key Features to Understand | ||
| ### Backend | ||
| Currently, we use manual testing and specific scripts. | ||
| - To test the API: `curl http://localhost:5000/health` | ||
| - Run specific tests: `python -m pytest` (if applicable) or run individual test scripts in `LiveEditBackend/`. | ||
|
|
||
| ### Video Processing | ||
| - Async task handling with Celery (`video_tasks.py`) | ||
| - Video ingestion pipeline (`video_ingestion.py`) | ||
| - Director workflow system (`video_director.py`) | ||
| ### Frontend | ||
| - Use `npm run dev` and verify changes in the browser. | ||
| - Check the console for any TypeScript or React errors. | ||
|
|
||
| ### AI Integration | ||
| - Gemini API integration (`services/gemini.ts`, `services/geminiLive.ts`) | ||
| - Backend AI client (`ai_client.py`) | ||
| - See [GEMINI_RETRY_FIX.md](GEMINI_RETRY_FIX.md) for known issues | ||
| *Note: We are actively looking to improve our automated test coverage. Contributions in this area are highly welcome!* | ||
|
|
||
| ### Real-time Features | ||
| - Live editing interface (`LiveInterface.tsx`) | ||
| - WebSocket communications via DirectorChatPanel | ||
| ## 🎨 Code Style Guidelines | ||
|
|
||
| ## Important Considerations | ||
| ### Python (Backend) | ||
| - Follow [PEP 8](https://www.python.org/dev/peps/pep-0008/) style guide. | ||
| - Use type hints where possible. | ||
| - Use `black` or `ruff` for formatting. | ||
|
|
||
| - **Authentication**: Firebase integration for user authentication | ||
| - **Subscriptions**: Tiered subscription system with payment integration | ||
| - **Environment Variables**: Backend requires Google Cloud credentials | ||
| - **Database**: Redis for caching, main DB (see deployment docs) | ||
| ### TypeScript/React (Frontend) | ||
| - Use functional components and hooks. | ||
| - Maintain strict TypeScript typing. | ||
| - Use CamelCase for files and PascalCase for components. | ||
| - Standard indentation: 2 spaces. | ||
|
|
||
| ## Testing | ||
| ## 📝 Git Commit Conventions | ||
|
|
||
| Before submitting a PR: | ||
| - Test new features thoroughly | ||
| - Verify existing functionality isn't broken | ||
| - Test with different screen sizes (frontend) | ||
| - Check API responses (backend) | ||
| We follow the [Conventional Commits](https://www.conventionalcommits.org/) specification: | ||
|
|
||
| ## Reporting Issues | ||
| - `feat:` A new feature | ||
| - `fix:` A bug fix | ||
| - `docs:` Documentation only changes | ||
| - `style:` Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc) | ||
| - `refactor:` A code change that neither fixes a bug nor adds a feature | ||
| - `perf:` A code change that improves performance | ||
| - `test:` Adding missing tests or correcting existing tests | ||
| - `chore:` Changes to the build process or auxiliary tools and libraries such as documentation generation | ||
|
|
||
| When reporting bugs, please include: | ||
| - Steps to reproduce | ||
| - Expected vs. actual behavior | ||
| - Screenshots/videos if applicable | ||
| - Environment details (OS, browser, Python version, etc.) | ||
| **Example:** | ||
| `feat: add video clipping functionality` | ||
|
|
||
| ## Documentation | ||
| ## 🔄 Pull Request Process | ||
|
|
||
| - Update relevant documentation files when making changes | ||
| - Keep README.md current | ||
| - Add comments for complex logic | ||
| - Update this guide if you change the project structure | ||
| 1. **Create a Branch**: `git checkout -b feature/your-feature-name` or `fix/your-bug-name`. | ||
| 2. **Commit Changes**: Follow the commit conventions. | ||
| 3. **Verify Locally**: Ensure both frontend and backend run correctly. | ||
| 4. **Push**: `git push origin your-branch-name`. | ||
| 5. **Open PR**: Provide a clear description of the changes, the problem solved, and any relevant issue numbers. | ||
| 6. **Code Review**: Address any feedback from the maintainers. | ||
|
|
||
| ## Questions? | ||
| ## 🐛 Reporting Bugs | ||
|
|
||
| Feel free to open an issue for clarification or discussion before starting work on a feature. | ||
| If you find a bug, please open an issue using the **Bug Report** template. Include: | ||
| - A clear, descriptive title. | ||
| - Steps to reproduce. | ||
| - Expected vs. actual behavior. | ||
| - Screenshots if applicable. | ||
| - Environment details (OS, Browser, etc.). | ||
|
|
||
| ## License | ||
| ## 💡 Feature Requests | ||
|
|
||
| By contributing to LiveEdit, you agree that your contributions will be licensed under the same license as the project. | ||
| We love hearing new ideas! Please use the **Feature Request** template to suggest improvements or new features. | ||
|
|
||
| --- | ||
|
|
||
| Thank you for helping make LiveEdit better! 🚀 | ||
| Thank you for contributing to LiveEdit! 🎬 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.