REST API boilerplate using Slim 3, Eloquent ORM, JWT, PHPUnit, and more

I have been using Slim 3 in some recent projects and wanted to create a quick boilerplate for scaffolding out RESTful APIs. Slim is a PHP microframework that helps you quickly write simple yet powerful web applications and APIs. It provides framework essentials such as routing, middleware, and dependency injection without all the bloat other “kitchen-sink” frameworks provide. My boilerplate comes with the following configurations out of the box:

Slim 3 Framework
Built on the latest Slim v3.10 PHP microframework and supports PSR-7 interface.

Eloquent ORM
Boilerplate is bundled with Laravel’s Eloquent ORM, a popular object-relational mapping library for PHP. This allows for easier query building and management of database data using object-orientated models.

JSON Web Tokens (JWT)
JWT middleware is bundled and used for user authentication sessions and to guard protected routes.

Respect\Validation
Respect\Validation helps saves time by allowing us to write less boring validation code for user-inputted data.

Monolog
Monolog provides out-of-the-box PSR-3 interface application logging.

PHPUnit
PHPUnit also comes bundled and I’ve written enough test scripts to provide 100% code coverage of example To-Do List API.

Phinx
Phinx makes database migrations a breeze, allowing you to write migrations in both PHP and SQL, while providing easy version management of your database.

To-Do List API
A RESTful user-authenticated To-Do List API ships with the boilerplate as quick example. See API documentation on GitHub.

Find it on GitHub
Get all the code and see the documentation on GitHub: https://github.com/crankedapps/slim-rest-boilerplate

Hoptender 1.5 Update: Map view, Instagram links

Hoptender v1.5 update is now available on both iOS and Android platforms. This update provides a much-needed interactive map view (powered by Google Maps) which allows you to better visually discover breweries, bottle shops, and food trucks around your location. The map is interactive to where you can pan, zoom, and discover Hoptender listings all around NC. You can tap/click markers on the map to see details including opening hours, events hoppening that day, and a button to jump to the Hoptender listing’s details page.

We’ve noticed Hoptender’s Instagram following seems to be the strongest and most active out of all of our social media accounts – so we’ve decided to integrate Instagram links for all listings in Hoptender. Now you can view a listing’s Instagram by clicking the “More” button (on listing details page) and you’ll see a link for their Instagram.

In other news, we have made several updates to the Hoptender Business Portal. There is a new, friendlier GUI. We have also launched an embed-able calendar feature – you can now customize and embed your Hoptender Calendar on your Facebook page (as a tab), your website (copy & paste HTML code), or a WordPress blog/website (install our calendar plugin).

Thank you for using Hoptender! More updates are on their way soon!

CrankedBlue – A responsive WordPress theme in HTML5 & CSS3

I’ve had quite a few questions and requests for examples in regards to my experience with responsive web design and WordPress themes. I’ve worked with WordPress frequently over the last 10 years, and I wanted to do a quick example for those asking about my experience and figured I’d just release it free. There are lots of easy UI frameworks like Bootstrap where you can whip together responsive design with virtually no knowledge of HTML5, CSS3, media queries, etc but I wanted to create a project that showed I have the knowledge to build a responsive website design from scratch without using any UI frameworks, jQuery plugins, or similar technologies – just pure HTML5 and CSS3. I also wanted to demonstrate my knowledge of coding themes from scratch into WordPress, so I broke this project down into two sections.

The Mock-Up
So to start this project, I needed to put together a mock-up in just HTML and CSS. You can see that mock-up live here. I have started with the most basic necessities for a WordPress theme: a header, 2 columns (a posts/content column & a widgets column), and a footer. I coded this from scratch using CSS3 media queries to make it responsive. The most complicated part of the design was the responsive menu – I needed the dropdowns to go at least 3 tiers deep in preparation for WordPress. The nav menu is mostly composed of CSS, but eventually I had to add a little Javascript for toggling the dropdowns on smaller screens. You can download a zip of the mockup here.

Coding to WordPress
Coding to WordPress is fairly straight-forward. Their documentation is long-standing and the API hasn’t really changed drastically over the years. Went smoothly, wrote several things in PHP using several action hooks and even a filter. I integrated WP Customization API so you can change the logo, header image, background color, header text colors, menus, etc via the WordPress Customizer in the admin panel. After I was finished, I did quick testing using Theme Unit Test provided by WordPress and also the Theme Check plugin recommended by the WordPress Theme Developer reference.

Overall, this serves as a quick example that I was able to throw together in some spare time over the weekend. I will most likely be following up with updates to CrankedBlue; and maybe a sister theme based on Bootstrap and/or some jQuery plugins, and maybe some WordPress custom plugins as well, just because to broaden my portfolio.

Live Demo & Download
Live demo is available here. I am submitting to the WordPress theme database, however apparently after searching, it appears the wait on review can be 6+ months. In the meantime, CrankedBlue is available for download and is licenced under GPL.

Introducing: Hoptender Business & the new Hoptender.com

Introducing: Hoptender Business

Hoptender Business Panel is now live! Hoptender businesses can claim and manage their listings by signing in via Facebook or Twitter. Here are some of the details:

Claim Your Business Listings

Sign in via Twitter – Log in via Twitter and any Hoptender business whose Twitter account matches yours will automatically be claimed.
Sign in via Facebook – Log in via Facebook and any Hoptender business who has a Facebook page to which you are an admin of on Facebook will automatically be claimed.
Update Business Listing – Edit contact information, opening hours, thumbnail photos, and more.

Manage Your Events

Business Calendars – View and edit events being imported from Facebook, your website, or exportable feeds.
Manage Events – Add, edit, and delete events from your calendar.
Tag Businesses – Tag other businesses and reach their audience via push notifications (example: a food truck tags they are going to be at a brewery, Hoptender users who favorite your truck and that brewery will get a push notification). You can also untag yourself from events other businesses tagged you in.
Sync Events from Exportable Feeds – Automatically sync events from your website via Google Calendar or iCalendar / ICS feed.

Misc Features

Dashboard – Overview of your listings, events, and tags
Hoptender Business Account Profile – Update your contact information so Hoptender can send you some free stuff or contact you if required.
Website & Social Badges – HTML codes for websites and blogs for “Find Us on Hoptender” badges. Also, there are some similar social media images available for sharing.

New/Redesigned: Hoptender.com

Hoptender.com has received a major face-lift! We have redesigned the entire landing page. The feature-limited web version of the Hoptender app will soon be depreciated, however you can still access it here for the time-being. It has been decided efforts are better focused on the app as that’s what the bulk of our users are using.

Hoptender v1.4 Update: New improved UI, bottle shops, favorites, social check-ins, and more!

Hoptender v1.4 is now available for Android and iOS! Hoptender v1.4 is a major update that features a new, improved user interface, a bottle shops category with over 190 shops, new favorites system, new social check-ins, 80% reduction in Android APK filesize, and more!

New & Improved UI
We decided to revamp Hoptender’s UI to make it look a little more modern. Everything is now on a footer navigation based system now, so we’ve made 3 main icon-based footer tabs – Breweries, Bottle Shops, and Food Trucks. We have also moved the menu button to the footer, menu now slides out from right, changed menu from list to icons, and made it responsive (2 columns on smaller screens, 1 column on larger).

Bottle Shops
Bottle shops are now a category in the app! You can see them under the second tab. We have started with over 190 bottle shops in the North Carolina. If you see any missing, please contact me and I’ll get them in as soon as possible.

Favorites System
After several requests, we decided to add a favorites system! Now you can “Favorite” breweries, bottle shops, and food trucks. You can also view feeds of only your favorites, so you don’t have to look through a bunch of listings you have no interest in – just keep updated with what you love! We are working now on integrating systems where if a food truck visits your favorite bottle shop or brewery, you will be notified. We are also working on a deeper notification subscription model where you can select how and when you get notified for new events Hoppenings at your favorite places.

New Social Check-Ins
We have overhauled the check-in system. It is now more integrated socially – you can share your check-in on Facebook, Twitter, etc via Hoptender! You should see a share dialog appear after you check-in. Now you can post where you are and Hoptender will keep a log where you’ve been at!

80% APK filesize reduction on Android
We removed the Crosswalk runtime, as it appears the project is no longer maintained. On a positive note, this reduced the APK filesize by over 80%. On a negative note, older devices, specifically phones running any Android OS below Android 4.4 are no longer supported. iOS never relied on Crosswalk, so iOS app size remains almost unchanged.

Misc Features & Bug Fixes
Calendar jump-to-date selector, tap to expand event descriptions, improved geolocation functionality with tabs, several bug fixes, and other small improvements.

We encourage all our existing users to update as soon as possible. Everybody can find the latest version of Hoptender on both Google Play and the App Store.

Thank you for reading, more updates coming soon!

Hoptender Update: New app version, 90+ new breweries, 15+ new food trucks

There have been quite a few updates to report since the launch of Hoptender on Saturday. Most notably, we have pushed versions V1.1/V1.2 of the mobile app on both iOS and Android, this includes new search functionality on the Browse All page, some improvements, and a couple small bug fixes. Everyone who has already downloaded the app is encouraged to update to the latest version available in the App Store or Google Play.

90+ new breweries and 15+ food trucks have been added to the database. Database totals below:

Current Hoptender Stats (Last Updated: 6/20/2017):
Total Breweries: 212 breweries
Total Brewery Website Calenders Being Synced: 95 breweries
Total Brewery Facebook Events Being Synced: 211 breweries
Total Food Trucks (Google Calendar Sync): 45 (we are contacting several trucks this week working on trying to get a lot more into the app)

Please keep those suggestions and bug reports coming, just send us a message via any method on the contact page. We appreciate everyone who has downloaded the app, liked our Facebook page, followed us on Twitter, or shared any of content in the last few days, I can’t thank you enough!

More updates to come soon!

Hoptender is here…

Hoptender is here, available on iOS and Android. There is also a web version that is limited in features.

Hoptender is an interactive brewery directory for North Carolina that includes synchronization of events from brewery websites and Facebook, browse events and breweries by your GPS location, rate, check-in, view calendars, food trucks, and more!

Synchronized Events
Hoptender pulls data in from brewery website calendars and Facebook page events all into one simple interface. View calendar of events from all breweries or view individual breweries’ calendars.

GPS Assisted
Find breweries, food trucks, and events around you based on your phone’s GPS location. You can disable this option and browse the directory alphabetically.

Check In
Check-in to your favorite breweries and keep a log of where you’ve Hopped around! This feature is exclusive to mobile app users.

Ratings
A 5-star rating system has been included that is exclusive to Hoptender mobile app users! Rate your favorite brewers and see what other Hop-heads are rating.

Over 200 Breweries
Hoptender has over 120+ breweries at the time of launch, with almost 90 more to be added in the next couple days. Right now, Hoptender will be focusing in the NC area, however it may decided to expand the geographic at some point in time. If you don’t see your favorite brewery, please contact us and we’ll be sure to add them in as soon as possible!

Food Trucks
Because, why not? Most food trucks in the Triangle area use Google Calendar which has a super-easy API. Since food trucks and breweries seem to go hand-in-hand, it seemed only good sense to add food truck listings to the app.

Feedback? Suggestions? Bug reports?
Please contact us as soon as you can. If reporting a bug, please include your device make/model, what OS version you are running, and any relevant screenshots.

Thank you for all the support to everyone who has helped make this possible! Special thanks to Andrew Harrison for the logo, icon, and creative counseling; Katie Boyd for endless data entry work and creative counseling; and the many friends and family that have helped with beta testing, suggestions, bug reports, creative counseling, and overall support.

Download Hoptender today!