How agriya/on-demand-service works
Project type and purpose
• This is a full-stack, on-demand service booking platform (e.g., dog care, baby care, healthcare, labor services).
• Frontend: AngularJS single-page applications (user portal under client/app, admin console under client/app/ag-admin), plus a static Swagger API explorer.
• Backend: PHP Slim-based REST API exposing endpoints for bookings, users, payments, messaging, push notifications, etc.
• Persistence: PostgreSQL via Phinx migrations and seeders.
• Media: File storage for uploaded images and avatars under /media.
• Build tools: Node/Bower/Grunt for JS/CSS asset compilation; Composer for PHP dependencies.
File structure
• Top level:
• api_explorer/: static Swagger UI for API documentation & OAuth tester
• client/: front-end code, package.json, Bower, Grunt tasks, tests
• media/: user- and listing-uploaded files
• server/php/Slim/: REST-API code, models, controllers, configuration, migrations, seeders, plugins, public entrypoints, shell scripts
• sql/: blank and sample data dumps
• Patterns & components:
• Angular modules structured by domain (controllers, services, views, directives, plugins)
• PHP Slim MVC-light: routes in public/index.php, controllers inline in Slim bootstrap, models under lib/Models
• Plugins both in frontend (under client/app/scripts/plugins/...) and backend (under server/php/Slim/plugins/...) following similar directory layout
• Shell/cron jobs in server/php/Slim/shell for reminders & notifications
• Database versioning: server/php/Slim/database/migrations + seeds
README for additional insights
• Technology stack: AngularJS, PHP >=5.5.9, PostgreSQL, Nginx/Apache
• Responsibilities: user/provider workflows, OAuth token handling, email, SMS, payment gateways
• Deployment prerequisites and build pipeline
Detail is key
• Break out major SPA modules (e.g., Authentication, Booking, Payments, Messaging) as sub-components if desired
• Migration & seeding pipeline under database
• Build pipeline flows (Node/Grunt/Bower → compiled assets → Static Server)