A quick start in the SaaS world
Discover new technological horizons: a holiday guide to innovative projects and frameworks.
The time between Christmas and the New Year is usually a quieter period in IT projects, so it is also a good time for self-development and scanning the Internet for new, exciting solutions and technologies. If you work at ConnectPoint, this is the perfect moment to devote these few days to self-development (out of the pool of 20 that we have available for this purpose each year).
My interest was solutions (semi-prepared products), which enabled us to start the project quickly. The criterion I adopted at the beginning was to consider primarily universal functionalities required in every project, such as, among others, authorization, user role management, integration (e.g., payments, CMS), and other valuable options that somebody could use. Two projects made it to the finals:
1) ScaffoldHub – an interesting starter for web applications created entirely based on the NextJS framework,
2) SaaS Boilerplate – starter for SaaS applications created and supported by the company apptension.
ScaffoldHub
The main advantage of this project is technological minimalism – the use of one and (it seems) already proven framework, which is NextJS, guarantees quick implementation
into the code and easier maintenance in the future. After installing locally and initializing the local database (Postgres), the application starts with an error in the console regarding the Prisma ORM configuration. Nevertheless, the app launches in the browser, and everything works fine.
An exciting feature of this solution is the database model generator, which allows you to create a basic database structure quickly:
I treated the generator as a helpful addition, enabling quick generation/updating of the model. The result of the generator is a JSON file that can be exported and shared with other users.
After more extended tests, I noticed that NextJS often rebuilt files and “silenced”. Sometimes, it took a few seconds before the app could display anything. I didn’t find any settings that could limit this process to specific or only changed files.
The project’s file structure and code organization looked quite reasonable and allowed for easy navigation through its functionalities:
During further tests (adding new relation entities and new fields to the existing model) and handling forms in the administration panel, I encountered several errors in the “controlled vs uncontrolled” console related to incorrect handling of the state of edited form fields.
To sum up, the project made a good impression on me, but I needed help to fully convince myself of the NextJS framework, partly due to the frequent rebuilding of files related to SSR technology. According to the information on the website, I applied for a refund, which is due within seven days of purchase. The money was refunded within an hour.
SaaS Boilerplate
We install the project directly from npm – it has been available for free for some time now. The installation is effortless, and in case of any problems, the service has excellent documentation. During the CLI installation from the console, it asks us to provide (optional) API keys for integration with Google, Facebook, Stripe, and Contentful CMS – this can be done later by editing the .env file. After installation and launch, we see the login screen:
The application’s architecture is very well thought out, and thanks to its use of pnpm, we do not duplicate libraries between the frontend and backend. We have some predefined commands from the pnpm level for running and migrating Postgres. Everything works very smoothly. A codegen is configured so that we create and provide shared types between the front and backend after migration.
As part of science, I expanded the existing CRUD example with a new field. I also corrected the code (error in item pagination) from the CRUD example:
I hadn’t programmed in Python before, but the project encouraged me enough to start digging deeper. I became interested in the popular Django (structure, endpoints, and validation), then I moved on to learning Python strictly (objects and data types, functions in Python, arguments args kwargs, objects).
To sum up, I really liked the simple example from CRUD and felt encouraged to learn – everything you need is there. The advantages are well-thought-out application architecture, also in terms of performance (GraphQL cache is used, and only the necessary amount of data is downloaded), and excellent documentation of the entire project. Code for deploying the entire infrastructure on Amazon is also available. Python itself, which I haven’t dealt with before, seems manageable. The project on GitHub appears to be supported and developed on an ongoing basis by a dozen developers, and the company that created the project turns out to be from… Poznań.
Summary
Both projects have advantages and disadvantages, but each can be a solid starting point for developers looking for practical solutions in rapid prototyping and development of applications in the SaaS model. I aimed to get inspired and “suspect” the architecture in an already existing and recognized solution — the time I spent motivated me to refresh my knowledge of GraphQL. Despite my lack of experience with Python, the SaaS Boilerplate project gained my attention and applause. Congratulations to the project’s creators, and I’m keeping my fingers crossed for its continued development.