From 98fda9629015a3b118d3dfcf49b209d5d572895d Mon Sep 17 00:00:00 2001 From: vedavith Date: Sat, 27 Jun 2026 13:04:38 +0530 Subject: [PATCH 1/6] Add ledger-api example project to README --- readme.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/readme.md b/readme.md index 04603be..199f29d 100644 --- a/readme.md +++ b/readme.md @@ -22,6 +22,34 @@ It provides everything needed to build a scalable SaaS backend: JSON-driven code --- +## Example Projects + +### [ledger-api](https://github.com/vedavith/ledger-api) + +A double-entry accounting REST API that demonstrates a complete EntityForge project using the `shared` tenancy strategy. + +**What it covers:** + +- Entity schemas for `Account`, `JournalEntry`, and `LedgerLine` with foreign key relations and tenant-scoped unique indexes +- Migrations generated with `generate:all --migration` and run with `migrate` +- Tenants created with `tenant:create` +- Controllers scaffolded with `make:controller` and filled in with CRUD logic using `$request->json()` and `BaseRepository` +- Middleware scaffolded with `make:middleware` — `TenantMiddleware` reads the `X-Tenant-ID` header and calls `TenantContext::setTenantId()` +- Transaction wrapping in `JournalController` — if any ledger line insert fails, the journal entry is rolled back atomically +- Routes wired in `public/index.php` via `Router` and `Pipeline` + +```bash +git clone https://github.com/vedavith/ledger-api.git +cd ledger-api +composer install +# create database, edit config/application.yaml, then: +php vendor/bin/ef migrate +php vendor/bin/ef tenant:create acme --name="Acme Corp" +php -S localhost:8181 -t public +``` + +--- + ## Requirements - PHP 8.3+ From b12bb02a882721a15fd5771ba8d0bb1970a5a1f4 Mon Sep 17 00:00:00 2001 From: Vedavith Ravula Date: Sat, 27 Jun 2026 22:34:10 +0530 Subject: [PATCH 2/6] Create SECURITY.md --- SECURITY.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 SECURITY.md diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..034e848 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,21 @@ +# Security Policy + +## Supported Versions + +Use this section to tell people about which versions of your project are +currently being supported with security updates. + +| Version | Supported | +| ------- | ------------------ | +| 5.1.x | :white_check_mark: | +| 5.0.x | :x: | +| 4.0.x | :white_check_mark: | +| < 4.0 | :x: | + +## Reporting a Vulnerability + +Use this section to tell people how to report a vulnerability. + +Tell them where to go, how often they can expect to get an update on a +reported vulnerability, what to expect if the vulnerability is accepted or +declined, etc. From 4d399937711d9154ccc3e9e17ce16e6810665e02 Mon Sep 17 00:00:00 2001 From: Vedavith Ravula Date: Sat, 27 Jun 2026 22:38:33 +0530 Subject: [PATCH 3/6] Add MIT License to the project --- LICENSE | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..5672bed --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Vedavith Ravula + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. From ee43365ccd69bb19584e5d85512c04e4ee81fefd Mon Sep 17 00:00:00 2001 From: Vedavith Ravula Date: Sat, 27 Jun 2026 22:43:45 +0530 Subject: [PATCH 4/6] Revise Code of Conduct for clarity and inclusivity Updated the Code of Conduct to reflect a more inclusive and welcoming tone, while streamlining sections on behavior expectations and enforcement. --- CODE_OF_CONDUCT.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 CODE_OF_CONDUCT.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..9ed61de --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,40 @@ +# Code of Conduct + +## Our Pledge + +EntityForge is a small open-source project and I want it to be a welcoming place for everyone — whether you're filing your first issue, submitting a pull request, or just asking a question. + +Participation in this project is open to everyone regardless of age, background, experience level, gender identity, nationality, race, religion, or sexual orientation. Respectful, constructive collaboration is the only expectation. + +## Standards + +**Behaviour that makes this project better:** + +- Being patient and respectful in discussions +- Giving feedback that focuses on the code or idea, not the person +- Accepting that people have different approaches and experience levels +- Acknowledging mistakes openly and moving forward constructively + +**Behaviour that is not acceptable:** + +- Harassment, insults, or personal attacks of any kind +- Dismissing contributors because of their experience level +- Sexualised language or unwanted advances +- Sharing someone's private information without their permission +- Any conduct that would be considered unprofessional in a collaborative setting + +## Scope + +This applies to all project spaces — GitHub issues, pull requests, discussions, and any public communication where you are representing EntityForge. + +## Reporting + +If something happens that makes you uncomfortable, please reach out directly at **veda_ravula@outlook.com**. All reports will be handled promptly, fairly, and with full respect for your privacy. + +## Enforcement + +Depending on the severity, responses may range from a private conversation and warning, to a temporary or permanent removal from the project. The goal is always to keep the project a good place to contribute — not to punish. + +## Attribution + +Adapted from the [Contributor Covenant v2.0](https://www.contributor-covenant.org/version/2/0/code_of_conduct.html). From 42ea5789f5abd8a9eca2bd4256fa7db189dff585 Mon Sep 17 00:00:00 2001 From: Vedavith Ravula Date: Sat, 27 Jun 2026 22:44:55 +0530 Subject: [PATCH 5/6] Update issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 38 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 20 ++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..dd84ea7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,38 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +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. iOS] + - Browser [e.g. chrome, safari] + - Version [e.g. 22] + +**Smartphone (please complete the following information):** + - Device: [e.g. iPhone6] + - OS: [e.g. iOS8.1] + - Browser [e.g. stock browser, safari] + - Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..bbcbbe7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +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. From 821c097556b58f8d66435a7cb95681c88ab3f2bc Mon Sep 17 00:00:00 2001 From: Vedavith Ravula Date: Sat, 27 Jun 2026 22:48:34 +0530 Subject: [PATCH 6/6] Add contributing guidelines to CONTRIBUTING.md --- CONTRIBUTING.md | 51 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..44aa7d6 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,51 @@ +# Contributing to EntityForge + +Thanks for taking the time to contribute. EntityForge is a small project and every improvement — whether it's a bug report, a fix, or a suggestion — is genuinely appreciated. + +## Getting Started + +```bash +git clone https://github.com/vedavith/Entity-Forge.git +cd Entity-Forge +composer install +``` + +Run the test suite to make sure everything is working: + +```bash +vendor/bin/phpunit +vendor/bin/phpstan analyse +``` + +All tests must pass and PHPStan must report no errors (level 8) before submitting a pull request. + +## Ways to Contribute + +- **Bug reports** — open an issue with a clear description of what happened, what you expected, and how to reproduce it +- **Bug fixes** — pick an open issue, fix it, and open a pull request +- **Feature suggestions** — open an issue to discuss the idea before building it; this saves time on both sides +- **Documentation** — improvements to the README, code comments, or examples are always welcome +- **Tests** — additional test coverage for untested paths is a great first contribution + +## Pull Request Guidelines + +- Branch off `main` and keep your branch focused on one thing +- Follow the existing code style — PHP 8.3+, strict types, no magic +- Write or update tests for any code you change +- Keep commits clean and descriptive +- Do not include unrelated changes in the same PR + +## Code Style + +- PHP 8.3+ features encouraged (enums, readonly, named arguments, fibers where appropriate) +- No commented-out code +- No `var_dump`, `print_r`, or debug output left in +- Column names passed to repository methods must be validated — never interpolate raw user input into SQL + +## Reporting Security Issues + +Please do **not** open a public issue for security vulnerabilities. Email **veda_ravula@outlook.com** directly with the details. I'll respond as quickly as possible. + +## Code of Conduct + +This project follows the [Code of Conduct](CODE_OF_CONDUCT.md). Please read it before participating.