How icrewsystemsofficial/feedthepoor works
Main Components
• Backend Server (Laravel Application): This includes the core MVC components – controllers, models, views – that power both the donor-facing front end and the admin dashboards.
• Frontend Interface: Separate blade views and assets for the public website (donation pages, tracking, contact, policies) as well as dedicated components for donor interactions.
• Admin Panel: A collection of controllers, views, and routes (under resources/views/admin and corresponding controllers in app/Http/Controllers/Admin) designed to manage campaigns, causes, missions, donations, and FAQs.
• Database: The relational database structured via migration files (in the database/migrations folder), seeders, and models that represent core entities (User, Donation, Mission, Campaigns, etc.).
• Jobs & Queues: The asynchronous processing setup (app/Jobs, app/Console/Commands, config/queue.php) responsible for tasks such as processing donations, sending notifications, and generating procurement lists.
• Event–Listener System: Using Laravel events (in app/Events and app/Listeners) to trigger side tasks such as sending emails and notifications.
• External Services & APIs: There is integration with third-party payment gateways (e.g., Razorpay from API controllers) and possibly email/messaging services (via Mail classes in app/Mail) to handle communications and transaction confirmations.
• Static Assets & UI Libraries: The project leverages external UI kits like AdminKit and Pixel UI (located in public/adminkit, public/theme) and uses additional JavaScript and CSS assets for the frontend experience.
Relationships and Interactions
• The Frontend sends user requests (donations, volunteer actions, inquiries) to the API and regular controllers which then interact with the database. The controllers are logically grouped into API (for mobile interface or third-party integrations) and web-based (for public and admin interfaces).
• Authentication and Authorization are handled through dedicated controllers and middleware (app/Http/Middleware) which regulate access to sensitive admin routes.
• Controllers trigger Jobs to perform lengthy processing or email sending asynchronously, ensuring smooth user experience.
• Events are fired within the system (for donation received, mission updates, etc.) and captured by listeners that process associated actions (e.g., sending out emails or notifications).
• The database is tightly coupled with the Models that mimic the database schema defined in the migrations. Seeders help bootstrap the data for development.
Architectural Patterns and Key Design Principles
• MVC (Model-View-Controller): The core structure is organized as per Laravel's MVC conventions. Each layer is clearly segregated to manage business logic, data persistence, and presentation separately.
• Event-Driven: With events and listeners, many processes (such as sending emails or updating logs) work asynchronously, indicating modular and decoupled design.
• Job Queues & Asynchronous Processing: Jobs are used to handle notifications and email dispatch, which improves scalability and user experience.
• RESTful API Standards: The API controllers (under app/Http/Controllers/API) imply that some endpoints follow REST design for external consumption (as seen with Flutter or payment integrations).