AI-Powered Smart Carpool Matching System

Building an AI-Powered Smart Carpool Matching Platform with PHP, MySQL & Bootstrap: My Real-World Dev Journey

Hey everyone, if you live in a city like Metro Manila (or any big urban area really), you know the daily commute drill: insane traffic, jeepney lines that never move, Grab prices that spike when you need them most. A couple of years ago I got fed up with spending 3+ hours a day stuck in EDSA. That frustration turned into a side project that became way bigger than I expected — a web-based carpool matching platform that actually tries to be smart about who rides with whom.

We called it RideLink. It’s not another fancy mobile app that nobody downloads. It’s a straightforward web platform anyone can open in their browser on phone or laptop. Users sign up, enter their regular routes (home → office, for example), preferred times, and a few preferences (music taste, smoking, pets, etc.). Behind the scenes, a simple but surprisingly effective “AI” matching system suggests the best ride partners. And yes — we built the whole thing using classic PHP, MySQL, and Bootstrap. No React, no Node, no AWS bill that makes you cry. Just tools that are cheap, reliable, and fast enough even on slow mobile data.

This post is the honest story of how we actually built it — the good decisions, the ugly bugs, the compromises we made for speed-to-launch, and why I still think this stack was the right call for a project like this.

AI-Powered Smart Carpool Matching System-reports
AI-Powered Smart Carpool Matching System-reports

Why We Even Bothered Building Another Carpool Tool

There are already big players — BlaBlaCar, Waze Carpool (RIP), Angkas, etc. But in the Philippines especially, many people still hesitate to carpool with strangers. Trust is low, routes are hyper-local, and schedules change daily. Existing apps often feel too “Western” — long sign-up flows, mandatory phone verification, high fees, or matching people who live 40 km apart just because the algorithm said so.

We wanted something hyper-local and practical:

  • Focus on daily office/school commutes (not long-distance trips)
  • Very quick sign-up (under 90 seconds)
  • Matching that actually considers time windows (±15 min), detour tolerance, and basic compatibility
  • No mandatory real-name policy — nickname + verified phone is enough
  • Completely free for users (we planned small company sponsorships later)

The goal was never to beat Uber. It was to get 20–30% of people in one office building to share rides and cut morning traffic chaos just a little.

How the “Smart” Matching Actually Works (No Fancy ML Here)

Let’s be real — we didn’t train neural networks on GPUs. What we call “AI-powered” is really smart rule-based + weighted scoring logic written in PHP.

Every user has a “commute profile” stored in MySQL:

  • Home lat/long (or barangay-level approximate)
  • Office lat/long
  • Usual departure time window (e.g., 7:00–7:30 AM)
  • Return time window
  • Max detour minutes they’re willing to accept
  • Preferences: music volume, talking level, smoking, pets, gender preference (optional)
  • Vehicle info (if driver: seats available, plate number last 4 digits)

When someone marks themselves as “looking for a ride today”, the system runs a query that:

  1. Finds all potential matches within ±30 min time window
  2. Calculates route detour using Google Maps Distance Matrix API (cached heavily!)
  3. Scores each potential match on:
    • Time alignment (higher weight)
    • Detour time added to driver
    • Compatibility flags (music, smoking, etc.)
    • Historical rating between users (if they rode before)
  4. Sorts top 5–8 matches and shows them with percentage match score

That scoring function is just PHP math — but tuned over months with real user feedback. Turns out giving 40% weight to time match and 30% to detour works way better than equal weighting.

AI-Powered Smart Carpool Matching System-wallet
AI-Powered Smart Carpool Matching System-wallet

The Tech Stack Choices & Why We Didn’t Go “Modern”

We could have used Laravel + Vue + PostgreSQL + Redis. But that would have meant:

  • Higher hosting cost
  • Slower development for a 2-person team
  • Longer onboarding time for any future maintainer

Instead we went with:

  • PHP 8 (plain, with a few composer packages: PHPMailer, GeoPHP for distance calc, Predis for Redis caching)
  • MySQL 8 — spatial indexes on location points saved our life for “nearby” queries
  • Bootstrap 5 + minimal custom CSS/JS — responsive out of the box, looks decent on every phone
  • Google Maps JavaScript API + Distance Matrix API (free tier covers us so far)
  • Shared hosting (yes, really — upgraded to one with good PHP/MySQL performance)
  • Redis (via cheap addon) for caching API responses and active ride sessions

Total monthly cost right now? Around ₱1,200–1,500 including domain. That’s the main reason we could keep it free for users.

Features We Actually Built (and Use Every Day)

  • Super-fast registration/login with mobile OTP (via external SMS gateway)
  • Daily commute profile setup wizard
  • “I’m driving today” / “Need a ride today” buttons
  • Smart match list with match percentage and estimated detour
  • In-app private chat (simple MySQL message table + AJAX polling)
  • Post-ride rating & comment system
  • Admin dashboard for monitoring active rides, banning bad actors
  • Weekly email digest of top matches for inactive users
  • Mobile-friendly design that actually works on 3G

We skipped a lot of nice-to-haves: no live tracking (privacy + cost), no in-app payments (yet), no social media login. Kept it lean.

The Ugly Bugs & Lessons Learned the Hard Way

1. **Timezone hell** — users in different islands forgetting DST or setting wrong time zones. Solution: force Philippine time everywhere and show local time clearly.

2. **Distance Matrix API quota surprises** — we burned through free credits fast. Fixed with aggressive caching (store same origin-destination pairs for 24h).

3. **Fake accounts & safety concerns** — added phone verification + optional selfie upload for “verified driver” badge. Also let users report/block instantly.

4. **Slow queries on match page** — added composite indexes and limited matches to same city/region first. Dropped page load from 6s to 1.2s.

5. **Browser back-button ghosts** — lots of AJAX, so we had to be religious about history.pushState and proper state management in vanilla JS.

Real Numbers & User Stories After 10 Months

As of early 2026:

  • ~4,200 registered users
  • ~1,100 monthly active
  • Average 180–220 daily ride offers/requests
  • ~38% of offered rides get at least one match request
  • Top companies: one BPO with 400+ users, one university with student groups

One of my favorite messages: a user said “I saved ₱4,200 last month on Grab and made two new office friends.” That’s the kind of impact that keeps you coding at 2 a.m.

What’s Next & What I’d Change

Next priorities:

  • Push notifications via web push (finally adding service workers)
  • Basic fare splitting calculator
  • Corporate accounts for office-wide carpool programs
  • Maybe a Laravel migration when we hit 20k users

If I could start over I’d probably still use the same stack — but I would have invested earlier in automated tests (PHPUnit saved us so many times later).

Closing Thoughts: Sometimes Simple Tech Wins

RideLink isn’t going to IPO or raise millions. But it’s helping hundreds of people save time, money, and sanity every week. And it proved to me that you don’t need the shiniest stack to build something useful. PHP + MySQL + Bootstrap still has serious legs when your goal is to ship fast, keep costs low, and actually reach everyday users.

If you’re thinking about building something similar for your city or campus — start small, talk to real commuters early, and don’t over-engineer the first version. The users will tell you what matters.

Got questions? Want to see code snippets? Planning your own carpool project? Drop a comment — happy to chat.

Here’s to fewer cars on the road and more conversations in the front seat.

FREE DOWNLOAD SOURCE CODE

You may visit our Facebook page for more information, inquiries, and comments. Please subscribe also to our YouTube Channel to receive free capstone projects resources and computer programming tutorials.

Hire our team to do the project.

, , , , , , , , , , , , , ,

Post navigation