
From Idea to Reality: Creating My Full-Stack SaaS Application
ecf.mseller.app is a cloud-based platform that acts as middleware between businesses’ ERP systems and the Dominican Republic’s tax authority, DGII. It automates the creation, digital signing, submission, and tracking of tax-compliant transactional documents such as invoices, credit notes, and product returns. Designed to simplify the complexities of tax reporting, the platform ensures real-time compliance, secure document management, and seamless integration, making tax processes more efficient for businesses of all sizes.
Goal
The goal of ecf.mseller.app is to streamline tax reporting processes, reduce inefficiencies, and enable businesses to meet their compliance obligations with ease. By simplifying the interaction with DGII’s API and automating XML signature generation with customer-specific digital certificates, the platform makes tax submission faster and more reliable for all parties involved.
Intention
The platform is designed to empower businesses in the Dominican Republic by eliminating barriers to tax compliance. By transforming invoices into XML, applying XMLDSig digital signatures, securely storing documents, and submitting them to the DGII in real-time, ecf.mseller.app ensures seamless tax reporting. It also facilitates the automatic exchange of signed documents between certified entities, creating a more efficient and interconnected business ecosystem.
Journey
The journey of building this project began with a clear goal: I wanted to create a solution that could seamlessly run on the cloud. 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 home country 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 CDK (Cloud Development Kit) stack to simplify integration with the DGII (Dominican Republic’s tax authority). 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 CDK (Cloud Development Kit) 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, routing, and server-side rendering (Landing Page coming soon).
• 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. Email Verification: UI to enter the verification code to activate the account.
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.

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 (DGII – Dominican Republic’s tax authority )—Development, Certification, and Production—while introducing multi-tenant capabilities and allow the user to manage API keys, environments, from a single platform. 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 biggest challenges was building a system that could support multiple customers while staying secure and fast. Each customer needed separate storage for certificates, custom user plans, secure documents, and secure access controls.
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.
• 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.
Circular Dependency Issue – Getting a bit technical!
This issue arose while solving a complex problem involving the creation of multiple usage plans in API Gateway. The goal was to set up three usage plans corresponding to three different environments and assign the appropriate plan to each stage. Additionally, the system needed the capability to create API keys specific to particular plans using API Gateway.
Here’s the intended order of execution:
- Create Usage Plans in API Gateway.
- Create Stages for the environments.
- Assign Stages to Usage Plans.
- Create a Lambda Function to handle customer-specific API creation and data retrieval.
- Create API Resources for API handlers and associate the Lambda function with these resources.
The circular dependency issue arises from managing the interdependencies between these steps. Specifically, conflicts occur during execution when assigning stages to usage plans and associating API resources with Lambda functions, as each depends on the successful setup of the other. To resolve this issue, I implemented an additional Lambda function. This function sets environment variables for the primary Lambda function responsible for handling the API resources, effectively decoupling the dependencies and enabling smooth execution. 😩 it was painful!

> Code Snippet – Click to spand
Usage Plans
Lambda function that set the dependencies
Key Improvements Achieved
Key Improvements Achieved
- Unified Stack for Three Environments
- Instead of maintaining separate AWS stacks for each environment; Development, Certification, and Production, I consolidated them into a single stack. This made deployments more efficient and reduced operational overhead.
- Enhanced Security Measures
- Leveraged KMS (Key Management Service) encryption to securely store customer certificates and their associated secrets. Certificates could now be retrieved securely, with access limited to authorized operations.
- Improved Scalability
- Designed the system to handle high-traffic scenarios across multiple tenants by utilizing AWS services like DynamoDB, S3, and Lambda.
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
- Faster Certification: Developers now have an accessible pathway to complete certifications in record time, breaking down barriers to entry and encouraging broader participation.
- 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.
- Community Growth: Developers share ideas, best practices, recommendations, and help each other with the certification process.
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:
- 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.
- Flexible plans designed for businesses of all sizes make it easy to adopt, stay affordable and competitive.
- Developer Contributions and Coaching
- I want to bring in more developers to work on the system, encouraging teamwork and shared responsibility.
- I will also provide coaching and mentoring to help developers improve their skills, grow as leaders, and feel confident in their work.
- Building a Consulting Portal
- I plan to create a portal where businesses can request consulting services. These requests will be matched with developers based on their skills, helping businesses get customized solutions and creating opportunities for developers in the Dominican Republic.
- This portal will connect developers with businesses and boost the reputation of Dominican developers.
- Introducing a Commission Plan for Developers
- Developers who bring new customers to the platform will earn a share of the revenue.
- • This program will motivate community members to promote the platform and give them extra income.
Long-Term Vision
My goal is to transform the tech scene in the Dominican Republic. I want developers to tackle local problems while competing globally, making our country a leader in innovation and technology. By promoting learning, collaboration, and shared success, I aim to create a lasting impact for everyone.
Whether it’s helping a small business update its invoicing, assisting a developer with certification, or sparking new ideas in community discussions, this platform is about creating value for all.
-Community & Crowd
“If you build communities and you do things in public”
“you don’t have to find the right people, they find you.”
Chris Anderson from Exponential Organizations by Salim Ismail