diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..fed0212 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,35 @@ +--- +name: Bug Report +about: Report a bug to help us improve +title: "[Bug] " +labels: bug +--- + +## Describe the Bug + +A clear description of what the bug is. + +## Steps to Reproduce + +1. Go to '...' +2. Click on '...' +3. See error + +## Expected Behavior + +What you expected to happen. + +## Actual Behavior + +What actually happened. Include error messages or logs if available. + +## Environment + +- OS: [e.g. macOS, Ubuntu] +- Python version: [e.g. 3.12] +- Node version: [e.g. 18] +- Browser (if frontend): [e.g. Chrome] + +## Additional Context + +Any other context, screenshots, or logs. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..65bb585 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,22 @@ +--- +name: Feature Request +about: Suggest a new feature or improvement +title: "[Feature] " +labels: enhancement +--- + +## Problem + +What problem does this solve? Why is it needed? + +## Proposed Solution + +Describe what you'd like to happen. + +## Alternatives Considered + +Any alternative solutions or features you've considered. + +## Additional Context + +Any other context, mockups, or examples. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..edd27fc --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,20 @@ +## Summary + + + +## Changes + + + +- + +## Test Plan + + + +- [ ] Tests pass locally +- [ ] Tested manually (describe how) + +## Related Issues + + diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..c532638 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,28 @@ +name: Tests + +on: + pull_request: + branches: [main] + push: + branches: [main] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Install uv + uses: astral-sh/setup-uv@v4 + + - name: Set up Python + run: uv python install 3.12 + + - name: Install dependencies + run: uv sync + + - name: Run parser tests + run: uv run pytest tests/parsers/ -v + + - name: Run pipeline tests + run: uv run pytest tests/test_pipeline.py -v diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..e8def7f --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,51 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity +and orientation. + +## Our Standards + +Examples of behavior that contributes to a positive environment: + +- Using welcoming and inclusive language +- Being respectful of differing viewpoints and experiences +- Gracefully accepting constructive criticism +- Focusing on what is best for the community +- Showing empathy towards other community members + +Examples of unacceptable behavior: + +- The use of sexualized language or imagery and unwelcome sexual attention +- Trolling, insulting or derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information without explicit permission +- Other conduct which could reasonably be considered inappropriate + +## Enforcement Responsibilities + +Project maintainers are responsible for clarifying and enforcing our standards +of acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the project maintainers at naik.nandishd@gmail.com. All complaints +will be reviewed and investigated promptly and fairly. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), +version 2.0, available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..7c2481c --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,93 @@ +# Contributing to GenAlpha + +Thanks for your interest in contributing! Here's how to get started. + +## Development Setup + +### Prerequisites + +- Python 3.11+ +- Node.js 18+ +- Docker & Docker Compose +- [uv](https://docs.astral.sh/uv/) (Python package manager) + +### Getting Started + +1. Fork and clone the repo +2. Copy environment files: + ```bash + cp .env.example .env + cp web/.env.example web/.env + ``` +3. Start infrastructure and services: + ```bash + make dev + ``` +4. Open http://localhost:3000 + +### Running Tests + +```bash +# All parser tests +.venv/bin/python -m pytest tests/parsers/ -v + +# Full test suite +.venv/bin/python -m pytest -v +``` + +## Making Changes + +1. Create a branch from `main`: + ```bash + git checkout -b feat/your-feature + ``` +2. Make your changes +3. Run tests and make sure they pass +4. Push and open a PR against `main` + +### Branch Naming + +- `feat/` — new features +- `fix/` — bug fixes +- `docs/` — documentation +- `chore/` — maintenance tasks +- `refactor/` — code refactoring + +### Commit Messages + +Use conventional commits: +- `feat: add Django parser` +- `fix: resolve include() path resolution` +- `docs: update setup instructions` +- `test: add edge case tests` + +## Pull Requests + +- All PRs require 1 approval before merging +- Only squash merges are allowed +- Keep PRs focused — one feature/fix per PR +- Include a clear description of what changed and why +- Add tests for new functionality + +## Project Structure + +``` +src/genalphacli/ # Core library — parsers, generators, pipeline +services/core/ # Core API service (FastAPI) +services/tps/ # Third-party service proxy +worker/ # Temporal worker for async jobs +web/ # Next.js frontend +infra/ # Terraform + Docker infrastructure +tests/ # Test suite +``` + +## Where to Contribute + +- **Add a new framework parser** — see `src/genalphacli/parsers/` for examples (FastAPI, Django) +- **Improve route extraction** — better parameter detection, response model resolution +- **Frontend improvements** — UI/UX at `web/` +- **Documentation** — always welcome + +## Questions? + +Open an issue or start a discussion. We're happy to help! diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..74ad06b --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,30 @@ +# Security Policy + +## Reporting a Vulnerability + +If you discover a security vulnerability, please report it responsibly. + +**Do NOT open a public issue.** + +Instead, email **naik.nandishd@gmail.com** with: + +- Description of the vulnerability +- Steps to reproduce +- Potential impact +- Suggested fix (if any) + +You will receive a response within 48 hours acknowledging your report. We will work with you to understand and address the issue before any public disclosure. + +## Supported Versions + +| Version | Supported | +|---------|-----------| +| Latest | Yes | + +## Security Best Practices for Self-Hosting + +- Never commit `.env` files — use `.env.example` as a template +- Rotate all secrets before deploying to production +- Use HTTPS in production +- Keep dependencies updated +- Review the deployment guide in `docs/deployment/` before deploying