This is a Python sample project, with the required file structure to easily deploy to Vercel, Docker
or Replit environments. This project uses FastAPI and MongoDB.
Click here to take a look on the upcoming features.
Based on the MVC (Model-View-Controller) architecture.
Go to the Git Repo
For a cuple of obvious reasons...
Mongo makes it easier, by leaving the heavy duty to your Models, that are the core of a non-relational database based API. And even if you decide to change to a relational database, it comes on handy, because the changes you will need to do are less complicated than otherwise.
When using MongoDB, you can just create a cluster on the official Mongo website and you are ready to go! Your models can handle your object mapping and even a migration can be configured with some steps.
MongoDB atlas is huge! The official cloud-hosted MongoDB service, offers a range of features like automated backups, monitoring, and easy scalability. Using MongoDB Atlas or similar managed services allows you to focus on your FastAPI application development without worrying about database management.
ORM's have different syntaxes across differents programming languages. The Mongo packages provided for the most popular programming languages are almost the same, although the language it self can be different, using the same framework syntax can help you to have a better understanding of the code even if you're not familiar with Python.
MongoDB stores data in JSON-like documents called BSON (Binary JSON). This makes it easy to work with data as it closely aligns with the JSON format commonly used in web development.
MongoDB's architecture and indexing capabilities contribute to its high performance. It can handle read and write operations efficiently, making it suitable for applications that require fast response times.
This project gives easier access for some of the customizations that we always need to do
while performing deployment to the Docker, Replit or Vercel environments. But in the counter hand it came
with routing, controllers and middleware which are commonly used in Node.js or TypeScript
implementations.
For more information about the usage of the present content:
Go to documentation.
But first, take this advice: This project architecture was developed to delivery a great readability of the
code. But it is quite confusing
if you're not into it.
it's highly recommended
to start at least one project by yourself, without
using this
"shortcut".
They are all over the place, just to help you to know what might be replaced. The following code shows where the "new" tag can be located:
These code was obtained in one of the default route files included in the project, in order to create a new get route we can simply get this code and replace the "new_" for "whatever_you_want". And you will have a basic get endpoint. But of course this is just the tip of the iceberg.
Developed by: Tom Neto