diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..cfcf391 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,5 @@ +* @buildwithhussain + +/.github/ @buildwithhussain +/frontend/ @buildwithhussain +/forms_pro/ @buildwithhussain diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..af01568 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,40 @@ +name: Bug report +description: Report a reproducible problem in Forms Pro +title: "bug: " +labels: + - bug +body: + - type: textarea + id: summary + attributes: + label: Summary + description: What happened, and what did you expect to happen instead? + placeholder: A clear description of the bug and the expected behavior. + validations: + required: true + - type: textarea + id: steps + attributes: + label: Steps to reproduce + description: Provide the smallest set of steps needed to reproduce the issue. + placeholder: | + 1. Go to ... + 2. Click ... + 3. See error ... + validations: + required: false + - type: textarea + id: environment + attributes: + label: Environment + description: Share the app, Frappe, browser, and deployment details that matter. + placeholder: Forms Pro version, Frappe version, browser, site setup, and any relevant logs. + validations: + required: false + - type: textarea + id: additional_context + attributes: + label: Additional context + description: Add screenshots, tracebacks, or anything else that helps. + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..d8dfbf2 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,36 @@ +name: Feature request +description: Suggest an improvement or new capability for Forms Pro +title: "feat: " +labels: + - enhancement +body: + - type: textarea + id: problem + attributes: + label: Problem or opportunity + description: What problem are you trying to solve? + placeholder: Describe the workflow gap, limitation, or use case. + validations: + required: true + - type: textarea + id: proposal + attributes: + label: Proposed solution + description: Describe the change you would like to see. + placeholder: Explain the feature, expected behavior, and any UX details that matter. + validations: + required: false + - type: textarea + id: alternatives + attributes: + label: Alternatives considered + description: Describe any workarounds or alternative approaches you have tried. + validations: + required: false + - type: textarea + id: additional_context + attributes: + label: Additional context + description: Add mockups, links, screenshots, or other supporting details. + validations: + required: false diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..c4f1df9 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,24 @@ +version: 2 +updates: + - package-ecosystem: pip + directory: / + schedule: + interval: weekly + labels: + - dependencies + + - package-ecosystem: yarn + directory: /frontend + schedule: + interval: weekly + labels: + - dependencies + - frontend + + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly + labels: + - dependencies + - ci diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..c13e248 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,15 @@ +## Summary + +- Describe the change and the reason for it. + +## Testing + +- [ ] `pre-commit run --all-files` +- [ ] `cd frontend && yarn typecheck` +- [ ] `bench --site run-tests --app forms_pro` + +## Checklist + +- [ ] PR title follows the conventional format used by this repo +- [ ] Documentation updated if behavior or setup changed +- [ ] Screenshots attached for UI changes when useful diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fcca56e..77b67e2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,11 +4,7 @@ on: push: branches: - develop - paths-ignore: - - ".github/**" pull_request: - paths-ignore: - - ".github/**" concurrency: group: develop-forms_pro-${{ github.event.number }} diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index f432fef..24f600a 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -2,8 +2,6 @@ name: Linters on: pull_request: - paths-ignore: - - ".github/**" workflow_dispatch: permissions: @@ -23,7 +21,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: '3.10' + python-version: '3.14' cache: pip - uses: pre-commit/action@v3.0.0 @@ -42,7 +40,7 @@ jobs: steps: - uses: actions/setup-python@v5 with: - python-version: '3.10' + python-version: '3.14' - uses: actions/checkout@v4 diff --git a/.gitignore b/.gitignore index c02bf55..6fef8ac 100644 --- a/.gitignore +++ b/.gitignore @@ -25,6 +25,9 @@ MANIFEST # Environments .env +.env.* +!.env.example +!.env.sample .venv env/ venv/ @@ -54,6 +57,9 @@ jspm_packages/ # Aider AI Chat .aider* +# Local AI tooling settings +.claude/settings.local.json + /forms_pro/public/frontend /forms_pro/www/forms.html /forms_pro/www/frontend.html diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3242a97..c2bb07b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -34,12 +34,11 @@ repos: # Ignore any files that might contain jinja / bundles exclude: | (?x)^( - forms_pro/frontend/components.d.ts| - forms_pro/public/dist/.*| + frontend/components.d.ts| + frontend/auto-imports.d.ts| + forms_pro/public/frontend/.*| .*node_modules.*| - .*boilerplate.*| - forms_pro/templates/includes/.*| - forms_pro/public/js/lib/.* + .*boilerplate.* )$ - repo: https://github.com/pre-commit/mirrors-eslint @@ -51,13 +50,12 @@ repos: # Ignore any files that might contain jinja / bundles exclude: | (?x)^( - forms_pro/frontend/components.d.ts| - forms_pro/public/dist/.*| + frontend/components.d.ts| + frontend/auto-imports.d.ts| + forms_pro/public/frontend/.*| cypress/.*| .*node_modules.*| - .*boilerplate.*| - forms_pro/templates/includes/.*| - forms_pro/public/js/lib/.* + .*boilerplate.* )$ ci: diff --git a/CLAUDE.md b/CLAUDE.md index d414a61..18ee019 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -108,7 +108,7 @@ When a form is saved, its fields are synced to the linked DocType as `CustomFiel ## Key Conventions -- **Python target**: 3.10+; formatted with `ruff` +- **Python target**: 3.14+; formatted with `ruff` - **TypeScript**: strict mode; `vue-tsc` enforced in CI - **Frappe patterns**: use `frappe.get_doc`, `frappe.get_all`, `frappe.db.*`; avoid raw SQL unless necessary - **PR titles**: validated by CI workflow (conventional commit format expected) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..9e35b85 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,34 @@ +# Contributing to Forms Pro + +Thanks for contributing to `forms_pro`. + +## Getting Started + +1. Fork the repository and create a branch from `develop`. +2. Install the app in your Bench environment. +3. Install local checks: + +```bash +pre-commit install +``` + +## Local Checks + +Run the checks relevant to your change before opening a pull request. + +```bash +pre-commit run --all-files +cd frontend && yarn typecheck +bench --site run-tests --app forms_pro +``` + +## Pull Requests + +- Keep changes focused and easy to review. +- Include a short summary of what changed and why. +- Add screenshots for UI changes when helpful. +- Use a conventional PR title such as `fix: handle empty submission state`. + +## Security + +If you find a security issue, do not open a public issue. Follow the process in [`SECURITY.md`](SECURITY.md). diff --git a/license.txt b/LICENSE similarity index 100% rename from license.txt rename to LICENSE diff --git a/README.md b/README.md index f4a70eb..e70aefe 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ A powerful, modern form builder built on the Frappe Framework. Forms Pro takes Frappe web forms to the next level with an intuitive drag-and-drop interface, advanced field types, and seamless integration. [![License: AGPL-3.0](https://img.shields.io/badge/License-AGPL--3.0-blue.svg)](https://opensource.org/licenses/AGPL-3.0) -[![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/) +[![Python 3.14+](https://img.shields.io/badge/python-3.14+-blue.svg)](https://www.python.org/downloads/) [![Vue 3](https://img.shields.io/badge/Vue-3-4FC08D?logo=vue.js)](https://vuejs.org/) Forms Pro Logo @@ -47,7 +47,7 @@ Forms Pro is a Frappe app and can be installed using the [bench](https://github. ### Prerequisites - Frappe Framework installed via bench -- Python 3.10 or higher +- Python 3.14 or higher - Node.js and npm/yarn (for frontend development) ### Install via Bench @@ -86,7 +86,7 @@ yarn build # For production build ## 🛠️ Tech Stack -- **Backend**: Python 3.10+, Frappe Framework +- **Backend**: Python 3.14+, Frappe Framework - **Frontend**: Vue 3, TypeScript, Vite - **UI Components**: Frappe UI, Tailwind CSS - **Form Builder**: Vue Draggable @@ -96,6 +96,7 @@ yarn build # For production build ## 🤝 Contributing We welcome contributions! Forms Pro uses `pre-commit` for code formatting and linting. +Please review [`CONTRIBUTING.md`](CONTRIBUTING.md) for the contribution workflow and [`SECURITY.md`](SECURITY.md) for responsible disclosure. ### Setup for Contribution @@ -135,7 +136,7 @@ This project uses the following tools for code quality: The project includes automated testing via GitHub Actions: -- **CI**: Installs the app and runs unit tests on every push to `develop` branch +- **CI**: Installs the app and runs unit tests on pull requests and pushes to `develop` - **Linters**: Runs [Frappe Semgrep Rules](https://github.com/frappe/semgrep-rules) and [pip-audit](https://pypi.org/project/pip-audit/) on every pull request ## 📄 License diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..5ba018d --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,17 @@ +# Security Policy + +## Supported Versions + +Security fixes are currently targeted at the active `develop` branch. + +| Version | Supported | +| --- | --- | +| `develop` | Yes | + +## Reporting a Vulnerability + +Please report vulnerabilities privately to [developers@buildwithhussain.com](mailto:developers@buildwithhussain.com). + +- Do not open a public GitHub issue for security reports. +- Include clear reproduction steps, impact, and any suggested mitigations if you have them. +- We will review the report, confirm the issue, and coordinate a fix and disclosure timeline with you. diff --git a/frontend/.gitignore b/frontend/.gitignore index bfaab69..18da7c8 100644 --- a/frontend/.gitignore +++ b/frontend/.gitignore @@ -4,6 +4,5 @@ dist dist-ssr *.local coverage -../ sites src/types/frappe-ui.d.ts \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index b451744..a68eb5c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ authors = [ { name = "BWH Studios", email = "developers@buildwithhussain.com" }, ] description = "Web Forms on steroids!" -requires-python = ">=3.10" +requires-python = ">=3.14" readme = "README.md" dynamic = ["version"] dependencies = [ @@ -31,7 +31,7 @@ frappe = ">=16.0.0-dev,<18.0.0" [tool.ruff] line-length = 110 -target-version = "py310" +target-version = "py313" [tool.ruff.lint] select = ["F", "E", "W", "I", "UP", "B", "RUF"]