How amey-thakur/car-rental-system works
1. Repository shape
- This is a single monolithic PHP/MySQL application for car rental management.
- The runnable app lives under Source Code/; the rest of the repo is mainly academic documentation, diagrams, papers, and packaging assets.
2. Core runtime stack
- Server-side logic is procedural PHP 7.x running behind Apache.
- Persistence is MySQL, with schema and seed/design captured in Source Code/sqlfile/carrental.sql.
- The UI is built with HTML/CSS, Bootstrap 3, and jQuery, plus a few legacy plugins for forms and dashboard widgets.
3. Main architectural boundary: public site vs admin backend
- The app is split into two clear surfaces:
- Source Code/ public customer-facing pages.
- Source Code/admin/ administration console.
- Both sides share the same database and common include patterns, but they expose different workflows and permissions.
4. Shared application infrastructure
- Source Code/includes/ and Source Code/admin/includes/ contain the shared cross-cutting pieces such as:
- database configuration (config.php)
- header/footer layout fragments
- login/registration/password recovery helpers
- This indicates a page-per-action architecture with repeated includes rather than a framework-driven MVC structure.
5. Customer-facing flows
- Public pages cover the end-user journey:
- landing page: index.php
- vehicle discovery: car-listing.php, search-carresult.php, vehicle-details.php
- availability checks and booking: check_availability.php
- account area: profile.php, my-booking.php, update-password.php
- support/content: contact-us.php, page.php
- Authentication and account setup are handled by includes/login.php, registration.php, and forgotpassword.php.
6. Booking and inventory flow
- The main transactional flow is:
- user browses vehicles
- user checks availability for a date range
- user submits a booking
- booking status is later tracked in the account area
- Vehicle data and booking state are stored in MySQL and surfaced through the search/detail pages and the booking history page.
7. Administrative control plane
- The admin area is the operational backend for managing the rental business:
- dashboard metrics: dashboard.php
- fleet CRUD: manage-vehicles.php, create-brand.php, edit-vehicle.php, edit-brand.php, post-avehicle.php
- booking moderation: manage-bookings.php
- user/admin records: reg-users.php
- content and engagement: manage-pages.php, testimonials.php, manage-contactusquery.php, manage-subscribers.php
- This side also includes image-management and password/admin-session utilities, showing that the backend handles both data administration and content maintenance.
8. Data model boundary
- carrental.sql is the source of truth for the relational schema.
- Based on the file structure and feature set, the schema centers on entities such as:
- users
- vehicles
- brands
- bookings
- contact inquiries
- subscribers
- testimonials
- CMS-style pages
- The README also calls out query optimization around vehicle brand and price filtering, so inventory search is a key data access path.
9. Frontend asset layer
- Public assets are in Source Code/assets/; admin-specific assets are in Source Code/admin/css, js, fonts, and img.
- The presence of chartData.js, fileinput.js, and nicEdit.js suggests the admin dashboard includes charts, file uploads, and rich-text editing.
- UI rendering is mostly server-generated HTML with client-side enhancement rather than a SPA.
10. Deployment and environment assumptions
- The repository is intended for a local LAMP-style setup such as XAMPP/WAMP/MAMP.
- Database credentials are configured directly in Source Code/includes/config.php and Source Code/admin/includes/config.php.
- This is a legacy-style deployment model with no containerization or modern framework abstraction.
11. Documentation and academic layer
- docs/ and Mini-Project/ contain the system specification, UML/ER diagrams, report PDFs, and publication artifacts.
- These materials are important for understanding intended design, but they are not part of the runtime request flow.
- The root index.html appears to support repository presentation / GitHub Pages demo content rather than the PHP app itself.
12. What an architecture diagram should show
- A user/browser talks to two PHP surfaces: public site and admin console.
- Both surfaces call into the same MySQL database through shared config files.
- The public side supports browsing, authentication, booking, profile management, and support.
- The admin side supports fleet, bookings, users, CMS pages, testimonials, and inquiries.
- Supporting layers include static assets, shared includes, and a separate documentation/research artifact set.
Main entry points: Source Code/index.php Public site · admin/index.php Admin console · carrental.sql MySQL · car-listing.php Catalog flow
Components 18
Runtime
Browser-facing PHP application surfaces and shared request handling.
- Browser · User agent entering the site and admin console.
- Public site · Customer-facing PHP pages for browsing, booking, and account actions.
Source Code/index.php - Shared includes · Common public helpers for config, layout, auth, and forms.
Source Code/includes - Catalog flow · Vehicle listing, search, detail, and availability pages.
Source Code/car-listing.php - Booking area · Booking history, profile, password update, and booking submission flow.
Source Code/my-booking.php - Support pages · Contact, static page rendering, and support entry points.
Source Code/contact-us.php - Auth entry · Login, registration, password recovery, and logout endpoints.
Source Code/includes/login.php - Admin console · Operational backend for fleet, bookings, users, and CMS management.
Source Code/admin/index.php - Admin includes · Shared admin config, header, and navigation fragments.
Source Code/admin/includes - Fleet ops · Brand and vehicle CRUD, image handling, and inventory publishing.
Source Code/admin/manage-vehicles.php - Booking ops · Admin moderation and tracking of reservations.
Source Code/admin/manage-bookings.php - Content ops · Pages, testimonials, contact queries, and subscriber management.
Source Code/admin/manage-pages.php - Users ops · Registered users and admin password/session maintenance.
Source Code/admin/reg-users.php
Data
Database schema and persistence layer.
- MySQL · Single shared database for users, vehicles, bookings, content, and inquiries.
Source Code/sqlfile/carrental.sql
Assets
Static UI resources for public and admin interfaces.
- Public assets · Front-end CSS, JS, fonts, and images for the customer site.
Source Code/assets - Admin assets · Admin CSS, JS, fonts, and uploaded vehicle images.
Source Code/admin/css
Docs
Specification, papers, and presentation artifacts.
- Docs pack · Specification, report PDFs, and academic project artifacts.
docs/SPECIFICATION.md - Mini-project · Publication and draft materials supporting the repository narrative.
Mini-Project
Connections 23
- Browser → Public site: use · Customers access the public PHP site.
- Browser → Admin console: administer · Operators access the backend console.
- Public site → Shared includes: includes · Public pages reuse shared layout, config, and auth helpers.
- Public site → Catalog flow: hosts · Vehicle discovery and availability flow.
- Public site → Booking area: hosts · Booking history and account management.
- Public site → Support pages: hosts · Support and content pages.
- Public site → Auth entry: auth · Login, registration, recovery, and logout.
- Catalog flow → MySQL: reads/writes · Searches vehicles and checks availability against shared data.
- Booking area → MySQL: reads/writes · Stores and retrieves bookings and profile state.
- Auth entry → MySQL: reads/writes · Authenticates users and persists account records.
- Support pages → MySQL: reads/writes · Loads pages and stores inquiries where applicable.
- Admin console → Admin includes: includes · Admin pages share config and navigation fragments.
- Admin console → Fleet ops: manages · CRUD for brands, vehicles, and images.
- Admin console → Booking ops: manages · Moderates and tracks bookings.
- Admin console → Content ops: manages · Maintains pages, testimonials, contact requests, and subscribers.
- Admin console → Users ops: manages · Maintains registered users and admin access state.
- Fleet ops → MySQL: reads/writes · Updates fleet and inventory records.
- Booking ops → MySQL: reads/writes · Updates reservation status and history.
- Content ops → MySQL: reads/writes · Stores CMS and engagement records.
- Users ops → MySQL: reads/writes · Reads users and updates admin credentials.
- Public site → Public assets: uses · Serves customer-facing UI assets.
- Admin console → Admin assets: uses · Serves admin dashboard assets and uploads.
- Docs pack → Mini-project: complements · Documentation and academic artifacts overlap in purpose.