This blog is meant to be focused in CG, so this post will probably look very off in a while.

But I spent a couple of weeks just to write my own blog system that I thought the effort deserved to also be shared!


I could possibly had done a blog in a Saturday afternoon using Wordpress and I’d be able to start sharing content right away. But last year I spent many many months working in a project for a startup, where I was the lead developer of a big online application. Back there, I was very rusty in web development/design, so I decided to use a development language that is very familiar to me, Python!


In Python’s universe I found an amazing package called Flask. Which is an elegant and simple web application framework. You could say it is like Django, but naked.  Working with Flask really made me ( for the first time ever ) have some fun with web development. So, when this idea of starting a blog came to me, I couldn’t imagine myself using anything else. Especially PHP, which was the last language that I ‘learnt’ before I decided to move out of software development to pursue a career in design, photography and animation, back in 2007.


Ironically, when I finally made into the big animation industry, programming became a big part of my days. All of this brings me here!


This blog is also a very expandable environment for me. Like flask, it’s simple. Which make it very easy to adapt, grow and connect with all kinds of systems. I really don’t know how far I’ll go, but I needed a space where I would not feel limited by deprecation, technique or complexity.


Instead of using standard servers. I decided to deploy it in a modern cloud platform, called Heroku. Which provides a great pipeline that easily allow you to deploy a web application using Github.  The pipeline automatically creates PR reviews, stage and production instances of the apps, which is awesome, because it allows many stages of testing before pushing a code to the online version of the blog.

The best of all, it comes for free (in the beginning at least)


Heroku provides a series of add-ons, including a cloud based Postgre SQL , which is very convenient, it makes easy to integrate a database to the web application.


Heroku is good for running the applications, but not ideal for hosting Media.

That’s when Amazon's AWS came in. I wrote a system to upload, resize and serve images from S3 (Amazon's storage system), which provides availability and speed that is hard to rival. The costs are fair and calculated on demand (pay for what you use).


For the front end, I’m using Twitter’s Bootstrap framework and Javascript. Bootstrap is also a very simple framework that allows developers to easily build responsive templates out of the box, making the websites compatible to mobile and other formats.


On top of those, I used several open source packages to avoid reinventing the wheel. Well… at least not completely reinventing, since there are infinite blog systems for free out there.



For writing the posts, I’m using this amazing text editor called Summernote. It was released under MIT license by some very young and talented developers.  Since Summernote creates its data in HTML format, I was able to move away from markdown text editor which are a bit limiting. The biggest issue I had with Summernote is the images upload. It is supported, but the images are converted and saved inside the text that is sent to the Postgre SQL database. While Postgre is robust enough to serve images to a small blog like mine, it could cause problems in the future. So I wrote a Flask and Javascript engine to capture the images that were inserted in the text editor and send them to my media storage bucket at the AWS S3.


It was a fun ride, I’ve been writing this blog in a quite generic way, so I hope to someday, after much more refining, I also release the source code to the community.


Be sure to come back and read a bit about CG next time!! ;)


Cheers!


Share this post: