2. About Me
• Lead Developer
• Full-stack PHP Developer
• From designer to developer
• Experience in SEO & CRO
• Volunteer student pastor and
world traveler.
4. About Us
• Faith-based international
non-profit charity based in
Rochester, MI
• Hosted thousands of
travelers since 2004. Over 44
trips to 4 continents and
dozens of countries.
• Facilitate humanitarian aid
including water wells,
houses, rescue homes,
orphanages, shoes, and
more.
5. One Nation One Day
The greatest achievements
begin with audacious questions
6. MM Network of Sites
• dominicrusso.com
• angelhouse.me
• 1nation1day.com, shop.1nation1day.com
• lamejorrepdominicana.com
• missions.me, api.missions.me
7. The MM App
• Website (marketing, info)
• CMS (staff & users)
• CRM
• Crowd Fundraising Tool
• Social Network
• Web Service (API for mobile
apps - iOS, Android)
8. MM App Overview
• Frontend Website
Marketing, information, etc.
• User application
Mange trip reservations, projects, fundraisers, donations,
records, profile
• Admin portal
CMS, CRM
• Web Services
API for Mobile Missions app (iOS, Android)
9. Current Setup
• Two networked SSD VPS on Digital Ocean
managed by Forge with a MySQL database
• Laravel 4.2, and Lumen; Bootstrap 3, jQuery, Vue.js
• Beanstalkd, Google Apps for Non-profits (SMTP)
• authorize.Net API payment gateway
• MaxCDN; BugSnag; GitHub
10. Evolution of MM App
• Started with Codeignitor, Foundation; Shared web
hosting, FTP, and no version control!
• 3 mo. development time, 6 developers, bankrupt
our startup, launched v1.0 in the summer of 2013.
• I was hired full-time in October 2013. I rebuilt the
app by myself in one month, using Laravel 4.0.
• By Mid 2014 we’d upgraded to Larvel 4.2 and
migrated to DigitalOcean and Forge.
11. - Leonardo da Vinci
“Simplicity is the ultimate sophistication.”
12. Timezones
PROBLEMS:
- Deadlines for everything.
- International user base.
- Admins setting deadlines in EST but the server
saves and returns UTC.
13. Timezones
SOLUTION:
- Accessor and Mutator
methods on models.
- Carbon library to add or
subtract the necessary GMT
offsets and set the correct
timezone.
14. Relationships
PROBLEMS:
- Database normalization can
require a lot of extra tables.
- A user has the following
relationships: contact, profile,
timezone, shirt size, groups …
- Admin created content needs
a table. Then that content gets
manipulated by a user, so that
needs a new table; so on and
so on.
16. BIG Data
PROBLEMS:
- N+1,
- detailed filters and searches
- exporting, Eloquent
sometimes too slow for large
memory-intensive exports
(server time outs).
17. BIG Data
SOLUTIONS:
Eager loading for N+1 issue.
URI query strings with
Query Scopes in the models
allowed for thousands of
result variations.
Query builder, raw SQL
statements, and pushing
that logic to a queue job, I
was able to get the export
speed needed.
20. Slugable
PROBLEM:
A lot of pages need
user-friendly URLs
over numerical IDs
(pages, profiles,
projects, fundraisers,
etc.)
21. Slugable
SOLUTION:
The power of
polymorphism!
Use a slugs table,
validation to ensure
unique slugs, a
polymorphic relationship,
and a PagesController to
lookup a slug and then
route it to it’s class type.
22. Security
PROBLEM:
We save a lot of sensitive
personal information.
Medical records, passport
copies, visas, etc.
We have to comply with
laws: PCI, Hippa
23. Security
SOLUTION:
We can encrypt using
Laravel’s Bcrypt method.
We can store and retrieve
files in a secure app/
storage outside the public
directory using Laravel’s
file class.
24. Time Savers
Automate “chores”
and “tedious” tasks
with custom artisan
commands.
Example: grab all
profile pics, rename,
and organize in
minutes
25. Scaling
Missions.Me works at a
relentless pace, is
growing rapidly, and is
a pioneer in it’s
industry.
Mobile Missions API in
just 4 weeks using
Lumen.
lamejorrepdominicana.
com - 1 week dev time
with Laravel.
27. The Future of MM
• Refactor - some code is 2 years old - lots of code smells!
• Upgrade to Laravel 5.1
• Move to distributed system managed with Envoyer - load
balancer, multi-servers, zero down time
• Adopt an API centric architecture (Lumen micro-services)
• Create a richer UI with a JavaScript framework (polymer,
vue.js)
• Offer Missions.Me as a SAAS