My experience building Spazi

Carlos Zuluaga
6 min readMar 26, 2020

--

Spazi landing page

Spazi is the web application to take care of your pets.We connect people who need their pets to be cared for, with people who love animals and are willing to take care of them.

Spazi was built by Daniela Gómez, Dionisio Arango, and me, Carlos Zuluaga, software developers from Medellín, Colombia.

The Team

Daniela Gómez worked on the front-end, Dionisio Arango worked on the front-end and back-end and I was in charge of part of the back-end and infrastructure.

Spazi was born out of our love for pets and a conversation. Daniela, who recently had a trip to Germany, mentioned that she had trouble finding someone to take care of Arya, her huskee, while she was away. Her parents could not take care of her because they were out of town and she had to move her trip for a few days so that her parents could take care of Arya. Later she found out that a friend, who had pets, would have taken care of her without any problem.

We started discussing similar problems and decided to create Spazi App.

Besides materializing the idea, we decided to create the application with technologies we wanted to learn. With a 2 week deadline to have an MVP in production it was a risky decision, but we still made it.

Once we iterated on the concept before writing the first line of code and got down to business we planned the tasks on a Trello board and assigned responsibilities according to personal likes and strengths.

Spazi’s Trello board

Technologies

We chose the MERN stack (Mongo DB, Express.js, React.js , Node.js). There are several reasons why we chose this stack.

MERN Stack — MongoDB, Express, React and Node.js

The main one is that it empowers the whole development team because only JavaScript is used as programming language and it allows the development to be much faster. It’s also a high-demand stack. More and more applications of different sizes and in all industries are migrating to this stack.

Let’s explore each of these technologies a bit more and why they were chosen in particular.

MongoDB

MongoDB is an open source database management system (DBMS) that uses a document-oriented database model which supports various forms of data. It is one of numerous nonrelational database technologies which arose in the mid-2000s under the NoSQL banner for use in big data applications and other processing jobs involving data that doesn’t fit well in a rigid relational model. Instead of using tables and rows as in relational databases, the MongoDB architecture is made up of collections and documents.

Documents as JSON-like data type (BSON).

A record in MongoDB is a document, which is a data structure composed of field and value pairs. MongoDB documents are similar to JavaScript Object Notation objects but use a variant called Binary JSON (BSON) that accommodates more data types. The fields in documents are akin to the columns in a relational database, and the values they contain can be a variety of data types, including other documents, arrays and arrays of documents.

My database experience is mostly dominated by SQL databases. In this project, we had to iterate fast. Fortunately MongoDB is incredibly versatile, and the fact that it is schema-less saved us a lot of headaches that we would have had with an SQL database. Plus, the syntax sugar of the Mongoose library makes working with data object oriented and much easier than, say, SQLAlchemy.

Node.js

Node.js is a JavaScript runtime built on Chrome’s V8 JavaScript engine.

Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient.

Two important parts here: JavaScript and non-blocking. Using the same language as the front-end makes development easier. And having a non-blocking paradigm does not depend on execution threads for each new request but a single process and execution thread can handle many requests.

Express

Express is a minimal and flexible Node.js web application infrastructure that provides a robust set of features for web and mobile applications.

Express makes developing an API incredibly fast.

React

React is a declarative, efficient, and flexible JavaScript library for building user interfaces. It lets you compose complex UIs from small and isolated pieces of code called “components”.

React is a framework developed by Facebook and has become incredibly popular. Besides, Dani wanted to learn it.

Other technologies

We used other technologies such as JSON Web Tokens (JWT) for authentication, Github, Ubuntu, Nginx and AWS and Cloudinary cloud computing services.

Infrastructure

The infrastructure of this application was deployed using AWS services. We wanted the infrastructure to be flexible and scalable. That’s why we decided to use Elastic Container Service (ECS) and have separate Docker container clusters for each microservice. One cluster for the front end and one for the back end (API).
Users access the application through the domain https://spazi.rocks.

DNS requests are answered through Route 53 and point to a load balancer that redirects traffic for one of the containers within the front-end, API requests are redirected by load balancing to the containers in the back-end.

In the front and back-end, the load balancer has SSL termination to serve the content securely.

We are initially looking for a replacement solution for MongoDB. DynamoDB was one of the options, as well as the new AWS DocumentDB service to be our NoSQL database. But we discovered that MongoDB Atlas can be deployed within an AWS region and has a free layer that fits our needs, including replication nodes and back-up options.

Planned infrastructure

Then the images of the Spazis (caregivers) and users were to be stored in S3. We decided to use Cloudinary and its photo storage service as an easier alternative.

Finally, CloudWatch was used to monitor the status of the services.

Deployed infrastructure

We had a number of technical difficulties. Deploying and ensuring availability, secure connection with SSL, authentication settings with JWT, route protection on the front and back. We were able to solve all these challenges together.

If you’re reading this, and learning Nginx, be sure to read this Digital Ocean guide. It made everything much clearer.

Despite the technical challenges, I learned that good communication is essential. We were delivering 2 or 3 times more results when we were talking all the time and we all knew what we were working on.

In this project I learned that I have to ask for help when I need it and I have to fragment the tasks into manageable challenges. Which I will continue to learn along the way.

I had the privilege of working with professionals and exceptional people.
Daniela Gómez , who is passionate about the front end, animals and is nurse.
Dionisio Arango, who is passionate about the back end and programming, is a mechanical engineer, an exercise fanatic, and the one who kept the team performing well.

You can enter Spazi or the repository.

About me

I’m Carlos Zuluaga. Process engineer and software developer, I deeply believe in the impact of technology on people’s lives. I have worked in the food industry, commercial aviation and biotechnology research.

If you can’t find me on my computer, I’m probably in a café.

You can contact me on LinkedIn. See you soon.

--

--