From Idea to Reality: Creating My Full-Stack SaaS Application

The journey of building this project began with a clear goal: I wanted to create a solution that could seamlessly run on AWS Lambda. This decision was inspired by my desire to leverage my newly obtained AWS Solutions Architect certification and build something natively in the cloud. Along the way, I also aimed to contribute to my local developer community.

To share knowledge, I created a YouTube video showcasing the project, which sparked unexpected interest and engagement. Over time, more developers reached out for guidance, leading me to establish a Discord channel to foster a sense of community. The joy of helping one developer, who in turn helped others, fueled my motivation.

Driven by this sense of purpose, I designed an AWS SDK stack to simplify integration with the DGII (Dirección General de Impuestos Internos). The goal was to make electronic invoicing more accessible, accelerate adoption across my country, and empower other developers to create value and earn through their contributions.

After two years, I revisited the project to enhance its scalability and usability. This involved refactoring the infrastructure to support multi-tenancy and developing an intuitive user interface. These improvements made the solution even more accessible for developers and companies, streamlining the adoption of electronic invoicing processes.

Spanish Video with the instruction about how XML signature works.


Initial Vision and Motivation

When I set out to build this application, my primary focus was to create a robust solution that abstracted infrastructure complexity while delivering high performance. To achieve this, I chose AWS solutions as the foundation for the application. AWS provided the scalability, reliability, and flexibility I needed to handle the high traffic and transaction volumes generated by various types of customers, such as supermarkets, distribution companies, and retail stores. These businesses process a significant number of transactions daily, and I wanted to ensure the application could scale horizontally to meet the demands of each customer seamlessly.

My decision was also driven by my excitement to apply the knowledge I gained through earning the AWS Solutions Architect certification. This project provided an opportunity to go beyond the theoretical concepts covered in the course and put them into practice in a real-world scenario. While my main job allowed me to work with AWS, I wanted to build something entirely from scratch. This personal project would enable me to explore every detail of AWS services, from design and implementation to optimization, and truly understand their potential.

By designing a cloud-native application that could scale effortlessly, I aimed to create a solution that wouldn’t just serve the needs of individual businesses but could also adapt to growth. My vision was to empower developers and companies to adopt an efficient and modern invoicing process, eliminating the need to grapple with infrastructure complexity and allowing them to focus on their core operations.


Building the Backend

To provide the flexibility and scalability I envisioned for the application, I started by developing an npm package containing all the methods required to integrate with AWS Lambda functions. This package served as the backbone for my solution, encapsulating the core logic and functionality needed for electronic invoicing. It allowed me to maintain a modular approach while enabling seamless integration across multiple environments.

Once the npm package was complete, I realized the importance of automating infrastructure provisioning. Managing resources manually through the AWS Management Console wasn’t sustainable, especially as the project scaled to serve multiple customers. I explored infrastructure-as-code (IaC) options and decided to use AWS CloudFormation with the AWS SDK for JavaScript. This choice allowed me to stay within the same programming language ecosystem, making context switching between application logic and infrastructure provisioning much easier and more efficient.

https://github.com/victors1681/dgii-ecf

Spanish Version: Deploying stack


Designing the Frontend

User interface design has always been my passion. Over the years, I’ve developed a strong foundation in creating intuitive, clean, and efficient UIs that enhance user experiences. For this project, I relied on a modern, battle-tested stack that I’ve been using for years, ensuring both familiarity and efficiency in the development process.

The frontend was built using the following technologies:

Next.js: Chosen for its robust framework capabilities,and server-side rendering,.

NextAuth.js: Integrated for authentication, providing a secure and flexible way to manage user sessions.

Material-UI: Used for UI components to ensure consistency and speed up development while maintaining a polished and professional design.

React-Hook-Form: Simplified form handling with performance optimizations, making it easier to manage validation and submission flows.

Redux: Implemented as the state management library to handle global application state effectively.

Axios: Used to manage API requests with a focus on clean, reusable configurations and error handling.

TypeScript: Adopted to add type safety, improve code maintainability, and catch potential bugs early during development.

In addition to using a reliable tech stack, I incorporated design tools to organize ideas and ensure the application reflected a clean, minimalistic aesthetic:

Figma

Photoshop

Deployment and Automation

The frontend application is deployed on Vercel, which offers fast, reliable hosting with built-in serverless functions.

Screenshots and Showcase

Below are some screenshots showcasing the frontend interface, including:

1. Login Page: A clean and secure authentication flow.

2. Registration Form: A multi-step registration process and email verification.

3. Dashboard: step by step instructions for easy onboard

4. Document Management: List of the documents sent by the customers with the status and verification.

5. Manage customer Certificate: Allow customer to upload the certificate to apply XML signature to each electronic document.

6. API key management: Create a pi key to consume the service and track each request.

These images illustrate the balance between functionality and design simplicity.

Video Showcasing the application: Spanish with english subtitles


Community Building and Impact

Through this journey, I came to realize just how powerful a sense of community can be in motivating us to continue contributing and growing. Early in my career, I focused solely on building projects for myself, often having fears that sharing my ideas might lead to them being stolen. Over time, however, my perspective changed. While it’s true that some things—especially in large organizations or projects with security concerns—must remain private, I discovered that sharing ideas and helping others is one of the most rewarding experiences a developer can have.

This shift in mindset became evident when I posted my video tutorial showcasing my project. The response was overwhelming—I received countless emails, messages, and even calls from people looking for guidance. Some reached out for consulting, but instead of dedicating my time to one-on-one consulting sessions, I saw a bigger opportunity: building a community where others could learn from my experiences and, in turn, help one another.

I created a Discord channel as a hub for developers interested in the project and broader topics about how to obtain their certification and electronic invoicing. What started as a small group grew into a thriving network of developers collaborating and sharing knowledge. Many members brought unique perspectives, working in different programming languages and domains, yet we were able to support and learn from each other.

Join Us ecf-dgii


Refactoring and Scaling

During the 2024 holiday season, I took on the challenge of refactoring the AWS stack that powered the platform. My goal was to simplify and optimize the infrastructure to handle three environments provided by the Dirección General de Impuestos Internos (DGII)—Development, Certification, and Production—while introducing multi-tenant capabilities. This required balancing security, scalability, and maintainability, all while ensuring that customer data remained isolated and protected.

The Challenges of Multi-Tenancy

One of the primary technical challenges was designing a system capable of supporting multiple tenants without compromising security or performance. Each customer had unique requirements, such as isolated storage for certificates, tailored user plans, and secure access management.

Managing AWS Cognito in a multi-tenant environment proved to be particularly tricky. I needed to:

• Add custom attributes to the Cognito access tokens to support tenant-specific data.

• Implement session and token refresh processes to ensure seamless user experiences.

• Dynamically handle user plan configurations, such as rate limits and document quotas, based on their subscription tiers.

• Securely store and retrieve customer certificates using AWS Key Management Service (KMS) for encryption.

Investing Time Despite the Holidays

The sheer complexity of these tasks required an intense focus. I spent many late nights over Christmas Eve and Christmas Day debugging issues, fine-tuning configurations, and solving critical problems. At the same time, I made an effort to balance work with family time, even though the workload was overwhelming. This period tested my determination and ability to deliver under pressure, but it also reinforced my passion for solving complex challenges.

Key Improvements Achieved

1. Unified Stack for Three Environments

• Instead of maintaining separate AWS stacks for Development, Certification, and Production, I consolidated them into a single stack. This made deployments more efficient and reduced operational overhead.

2. Enhanced Security Measures

• Leveraged KMS encryption to securely store customer certificates and their associated secrets. Certificates could now be retrieved securely, with access limited to authorized operations.

• Isolated tenant data at every level, ensuring that no customer could inadvertently access another’s information.

3. Improved Scalability

• Designed the system to handle high-traffic scenarios across multiple tenants by utilizing AWS services like DynamoDB, S3, and Lambda.

• Optimized the application to scale horizontally, accommodating the growing number of customers without impacting performance.

4. Flexible Multi-Tenant Architecture

• Added support for managing multiple customer plans, allowing businesses of various sizes to seamlessly adopt the platform.

• Built automation for tenant onboarding, simplifying the creation and configuration of new accounts.

Results and Future Plans

The results of this platform have been remarkable. More and more developers are joining, and many are completing the certification process faster than ever before. This platform has become the only service in the Dominican Republic that allows both developers and companies to certify for free while providing access to a system with a limited number of documents processed per month at no cost. This has created an unprecedented opportunity for developers to build their skills, companies to modernize their processes, and the ecosystem as a whole to grow.

Results and Impact So Far

1. Faster Certification: Developers now have an accessible pathway to complete certifications in record time, breaking down barriers to entry and encouraging broader participation.

2. Empowerment Through Free Services: Offering a free tier has made the platform inclusive, helping startups, small businesses, and independent developers gain access to modern solutions without upfront financial burdens.

3. Community Growth: The platform has fueled the growth of a collaborative and supportive developer community, where knowledge is shared and innovation thrives.

Next Steps and Future Plans

The success of this platform has inspired me to set ambitious goals for its future, focusing on sustainability, expansion, and empowerment:

1. Acquiring Paid Customers

• To ensure the platform’s longevity and continued improvement, the next step is to onboard paying customers. This revenue will allow for the scaling of operations, enhancement of features, and reinvestment into the platform and its community.

• Offering flexible plans tailored to businesses of different sizes will make adoption easy while maintaining affordability.

2. Developer Contributions and Coaching

• I aim to onboard more developers to actively contribute to the system, fostering collaboration and shared ownership.

• Beyond technical contributions, I will offer coaching and mentoring to help developers hone their skills, become leaders in their field, and feel confident in their contributions to the project.

3. Building a Consulting Portal

• To further support businesses and developers, I plan to build a dedicated portal where companies can request consulting services. These requests will be matched with developers from the community based on their expertise, ensuring businesses receive tailored solutions while creating new opportunities for local developers.

• This portal will not only connect developers with businesses but also elevate the reputation of Dominican developers on a global scale.

4. Introducing a Commission Plan for Developers

• To incentivize growth and reward developers for their efforts, I intend to establish a commission-based program. Developers who onboard new customers to the platform will earn a percentage of the revenue generated.

• This plan will encourage community members to become ambassadors for the platform while providing them with an additional source of income.

5. Empowering and Educating Local Developers

• At the heart of this initiative is a commitment to empower and educate developers in my country. By sharing my experiences, I want to inspire others to pursue excellence, embrace collaboration, and innovate fearlessly.

• This includes hosting workshops, webinars, and hackathons to further equip the community with the tools they need to succeed.

Long-Term Vision

Ultimately, my goal is to transform the tech ecosystem in the Dominican Republic. I want developers to not only solve local challenges but also compete on a global scale, positioning our country as a hub for innovation and technological advancement. By fostering a culture of learning, collaboration, and shared success, I hope to create a lasting legacy that benefits everyone involved.

Whether it’s by helping a small business modernize its invoicing process, enabling a developer to achieve certification, or sparking new ideas through community discussions, this platform is about creating value for everyone.

If you share this vision or want to be part of this journey, join us. Together, we can build something that empowers individuals, supports businesses, and elevates our community to new heights.

Leave a Comment