I need to completely rebuild/refactor a small directory/info service I run for blind people; it's too complex to maintain having been built in 2013, based on a now-deprecated thing called php-mini, last updated in 2015.
As it's not a commercial project, there's no advertising and no charge for users, this needs to be as affordable and boilerplate/bootstrap/turnkey as possible. I'm thinking Laravel or something based on it? Or something I've missed? I'm comfortable with PHP and MySQL but I've spent the weekend trying to find the closest match and there are many choices, including a bewildering array of Laravel packages, but I feel I've missed something in my searching which might help. So...
Here's what my service currently looks like: https://find.talking-news.info. Yes, back in the day, that was REALLY good for people with screen readers. Now it's an embarrassment.
How it currently works
- User types of town OR service name (one search box).
- If it matches a service name, show the service and other services nearby.
- If it matches a town name, then show service names within 20 miles.
- Allow clicking on results to display organization and service details, via an accessible page.
What I need
- Very simple CRUD backend that users log into and make changes - simple data plus a few toggles/tickboxes.
- 2 users levels - admin or user.
- Some JSON REST stuff to pull data from MYSQL RDB
- A user can run multiple organisations, the organisations can have multiple publications.
- Just 3 tables - users, publications and services - nothing more complex than
users.userID <-> organisations.userID <-> publications.organisationID
- A front end which consists off pulling a few DB queries and reading a couple of static files - currently, Twig 1 and Bootstrap 3 is used to render the output.
- An enquiry form which sends emails - I currently use PHPMailer with a Gmail SMTP connection.
For search results, I used a jaro-winkler-similarity mysql routine so that someone typing "macnhester" would get "manchester" rather than no result. https://packagist.org/packages/fza/mysql-doctrine-jaro-winkler-function
For the "nearest" results, I use SELECT *, 69 * DEGREES( ACOS( COS( RADIANS( latpoint ) ) * COS( RADIANS( lat ) ) * COS( RADIANS( longpoint ) - RADIANS( lng ) ) + SIN( RADIANS( latpoint ) ) * SIN( RADIANS( lat ) ) ) ) AS distance_in_miles FROM services JOIN (SELECT :lat AS latpoint, :lng AS longpoint) AS p ORDER BY distance_in_miles LIMIT 10
This means geocoding everything and storing it in my DB.
Does a public API or SaaS already exist?
- Where I could upload the service id and address (or just UK postcode or lat/long), and it would return a list of IDs and distance.
- I could pull the remaining data from my DB based on the returned IDs.
- Low usage, preferably free. 500 queries a day would be more than enough.
I would have thought Google Maps API would have this by now, but apparently not unless I'm missing something?
Finally, I see a lot of questions like this are closed with "not enough detail", or simply pointed to https://stackoverflow.com/questions/838028/choosing-the-right-php-framework and then closed. However, that page now doesn't exist and would be rather generic. Thanks!