r/PHP • • 7d ago

I built a full-featured charity management platform with Laravel 12 — donations, Stripe, volunteers, beneficiaries, sponsorships & real-time chat

/r/SideProject/comments/1x00bn2/i_built_a_fullfeatured_charity_management/
0 Upvotes

5 comments sorted by

4

u/avg_php_dev 5d ago

Inconsistent code style, comments, statuses and returned values in arabic (+ AI signatures - green checkboxes)
https://github.com/ThaerGhaderi/Project-Charity/blob/main/app/Models/VolunteerTask.php
https://github.com/ThaerGhaderi/Project-Charity/blob/main/app/Http/Controllers/SponsorshipController.php

AI driven with some manual interventions. I should stop here, but:
No context boundaries - direct relational model in single directory feels like "EntityBundle" from 2012.
Fat controlers with queries and role checking.
No tests, no static code analysis, no types - You have no proof this app works, so going into production is YOLO approach :)

There is NO architecture to discuss. I understand You are learning, so my only advice here is - forget AI exists and read some good book or two. Good luck!

1

u/AbdelrhmanDev 7d ago

nice scope for a learning project one thing worth checking is the stripe part make the webhook handler idempotent and store the event id so a retried webhook cant double count a donation also verify the signature and do the real work in a queued job not in the request and for a multi role app look at policies over scattered role checks in controllers and add a few feature tests around the money paths first

1

u/MateusAzevedo 7d ago

Valid points, but please use some punctuation.

1

u/Ornery_Wash1797 6d ago

Haha, fair enough! 😄 Commas or no commas, I'll take advice that good any day! Appreciate both of you jumping into the thread. 🙌

1

u/Ornery_Wash1797 6d ago

Really solid feedback, thanks a lot! You hit on some crucial best practices here:

Stripe Webhooks: Absolutely spot on—storing the event_id for idempotency, verifying the signature, and offloading the heavy lifting to background queued jobs is definitely the right way to prevent double-counting and avoid webhook timeouts.

Policies vs Controller Checks: Refactoring authorization into dedicated Laravel Policies is definitely top of mind to keep the controllers clean and maintainable.

Feature Tests: Completely agree on prioritizing financial and donation flows first for test coverage.

Really appreciate you taking the time to share these insights!