Zero to development of an idea

One of the places I have identified as a blocker to me starting on a project is the bootstrapping of a project.

Laravel Code

By this I mean going from ‘I’ve got an idea’ stage to writing the first line of code and getting it uploaded to a web server with a database connection set-up. (Most of my personal side projects are web based!)

I’ve found the faster I can get an idea off the ground, the more likely I am to continue it. So what have I done to reduce the bootstrap time?

Most of my projects end up getting hosted on my FlorxLabs server, it has wildcard subdomain DNS setup, with a simple Apache rewrite.

<VirtualHost *:80>   
    ServerName chaos.florxlabs.com:80
    VirtualDocumentRoot /var/www/html/%2.0/%1.0/
</VirtualHost>

So if I would like a project under the URL project.florxlabs.com, I simply create the folder /var/www/html/florxlabs/project and I’m ready to go. No more config necessary.

This rewrite also has the scope to have more domains added, so if I wanted to host my portfolio at www.jakehall.io I simply need to create /var/www/html/jakehall/www and throw in whatever PHP or HTML I want.

There are limitations however, if I have multiple domains that have the same middle section but TLDs (e.g. jakehall.io or jakehall.co.uk) they would map to the same folder under this rewrite. Also I have to rewrite all of the non-www domains to www as if the subdomain is missing, again this messes up the rewrite.

So that’s the subdomain sorted, I’ve got somewhere to publish the site so I can test it properly. But what about the database? In order to stay quick with this - I’m slightly lazy, I use one account that can access everything to connect with my development projects. The MySQL database is inaccessible from the web, and it requires an SSH tunnel using Public-Private key authentication. So safe enough for a little development box (that’s not a challenge by the way…).

Sublime, Heidi SQL, PHPStorm

I use Sublime Text 2 generally on smaller projects - using the SFTP plugin to upload to the server after every CTRL+S, bringing out PHPStorm when it’s a large project (or I’m using Laravel - I wish I could use this everyday.)

My development flow is usually, to develop directly on the server as most of my work is done in an agile fashion with my colleague defining and fleshing out the requirements as we go. He takes on the role of the Business Analyst, and myself the sole Developer.

Heidi Screenshot

Lastly I use HeidiSQL to connect to the MySQL database, it’s an incredible UI and works really well. There are a few minor usability issues that I should probably get round to raising a forum post about - but they’re barely worth mentioning.

Out of curiosity, I took a quick look at my back catalogue of side projects from the last few years. There are 101 projects there as of writing this, which works out to a new side project every 3 weeks (I have no idea how many got deleted during this time). I note that a few of these aren’t really that small though, as they took several thousand in attendance fees and registrations for over 500 scouts… but that’s a story for another day.

Let me know what your development cycle is!
- @florx

 
4
Kudos
 
4
Kudos

Now read this

What’s in a version?

Building distributed systems in using a microservice pattern is hard. At my company we’re always looking for ways to automate any manual processes, or anything that is difficult. Computers don’t make mistakes, but humans aren’t... Continue →