Sistema de assinaturas recorrentes
Introdução Desenvolvedores são seres predominantemente imaginativos, pensantes, incansáveis na busca para resolver este ou aquele problema. Indivíduos constantemene bombardeados com ideias muitas vezes mirabolantes e totalmente sem sentido mas que servem de alicerce para construção de soluções robustas. Entretanto, a maior dificuldade para tirar uma ideia do papel é o tempo. A escasses dele nos…
Auto-renewing subscription system - the story behind a technical project
Developers are imaginative thinkers, tirelessly seeking solutions to problems. Constantly bombarded with ideas, many brilliant yet seemingly nonsensical, they serve as the foundation for robust solutions. The biggest challenge in bringing an idea to life is time. Time constraints often force us to make poor choices, affecting our outputs and creating an unpayable technical debt.
Ironically, this very enemy also helps us stay on track by reducing our ability to generate technical debt. With the growing use of generative AI and AI agents, this barrier has been shattered, allowing once-dormant projects to transform into actual products or services.
The project architecture revolves around a subscription control system employing the state machine concept. The technology stack comprises:
- Backend: C# / .NET 10 (ORM: Entity Framework Core, Database: PostgreSQL)
- Authentication: JWT (JSON Web Tokens)
- Frontend: ReactJS 19 with TypeScript
- Infrastructure: Docker
The choice of technologies was driven by personal experience, especially with C# for the backend where business rules reside. EF Core streamlined application development, and PostgreSQL was chosen as the natural database for an MVP candidate, offering robustness without being overly heavy and providing excellent performance. JWT authentication was chosen due to its widespread adoption and established status.
ReactJS was used for the frontend, as it complements C# well, and Docker was selected to expedite application validation while maintaining a fully isolated environment.
The project aimed to control subscriptions, plans, subscribers, and plan changes (e.g., from trial to paid) — essentially a state machine. Integrating with real payment platforms was deliberately avoided, as the goal of this phase was to validate the process itself. The learning experience taught that no system is without bugs, a universal truth in software development.
This was attributed to the accumulation of code, uncommented snippets, fixed variables, and numerous ideas that pile up during development, needing attention later. AI has not changed this reality; it merely accelerates the creation of technical debt. Speed does not equal quality. While the project was completed in a short time, the author took care to verify each aspect of the construction.
They noticed that entire methods were copied into a version 2 with adjustments, turning the old code into obsolete waste. Thus, more technical debt was created. The positive aspect is that not everything is lost; some adjustments in a .md file led to cleaner code. This speed brought a curious effect: a typical programmer would take four weeks to create code considered medium-quality, while with AI, the same programmer would take only four hours to produce the same medium-quality code.
In other words, speed increased but code quality remained unchanged. Investing more time in project planning allows less time spent in the production phase. The author decided to invest more energy in planning, thoroughly understanding each phase of the project, reducing the chance of interruptions and accelerating progress.
In conclusion, AI has proven to be a valuable tool, akin to Stack Overflow. It is not a matter of declaring the end for anyone, but rather urging caution when rejecting its use or delegating 100% of tasks, including important decisions. While it is obvious that AI cannot program, it still relies on us to guide it. The current project was developed for purely educational purposes, and the complete code is available in the author's repository.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.