Inspiration

Whenever you get the inspiration to create something, there's always the issue of it taking so long to get even the basic minimum viable product or proof of concept done. Everyone always spends either too much time on the backend to make it work properly, but it flops at the presentation, or they spend too much time on the frontend to make it look flashy, but it flops at the functionality. As such, I wanted to remove that pressure by creating Fail Faster. The goal of Fail Faster is to allow you to move even faster than you already were and break even more things while doing it. Fail Faster allows you to create an API with all your necessary business logic and without the weird bugs from the language you're using.

What it does

Rather than writing the same code over and over again to do the same generic things, you can quickly prototype your app with Fail Faster using only YAML. This lets you focus on the business logic rather than the syntax or intricacies of whatever language you're using. Currently, it can interact with a MongoDB Atlas database to store data, serve static files, generate random values, and do basic arithmetic operations. I hope to expand these to the capabilities of a full programming language.

Not only is it useful for prototyping APIs, but it can also help teach programming without the complicated syntax of some programming languages. Since you write your API definition in YAML, it makes it considerably easier to understand because it is just a bunch of lists with some extra fields.

How I built it

I built Fail Faster using Flask, a PostgreSQL database, and a MongoDB Atlas database. Flask handles all the routing and running of the apps. I used PostgreSQL to store the user account and deployment information and I used the MongoDB Atlas instance to store any user-generated database data. I chose to use two databases instead of either MongoDB Atlas or PostgreSQL to ensure higher efficiency when deploying it and to reap the benefits of the unstructured nature of MongoDB for users' data along with the high throughput of PostgreSQL. For the frontend, I am using Jinja2 templates with a Bootstrap integration to make them look nicer.

Challenges I ran into

The biggest challenge I ran into was dynamically adding routes to a running Flask instance because it required me to dig deeper into Flask's routing mechanisms.

What's next for Fail Faster

In the near future, I hope to bring a more featureful version of Fail Faster to market (and maybe find a better name while I'm at it). This includes, but is not limited to, organizational projects, code generation, fine-grained request validation, and a larger standard library. I would also like to add a browser editor to make it even easier to start writing APIs for your projects.

Share this project:

Updates