Home Projects Portfolio Dashboard Export PDF Log in

Languages

English
189

Latest Updates

Documenting code, one commit at a time.

Swagger 10 posts
×

Enhancing API Documentation with Type-Safe Auth DTOs

Improving API Clarity

When building a SaaS backend, the line between a secure implementation and a developer-friendly API often comes down to documentation. In our crm-saas-backend project, we recently focused on standardizing our authentication layer by implementing explicit Data Transfer Objects (DTOs) and integrating them with Swagger.

The Challenge

Previously, our authentication

Standardizing NestJS: Setting Up Global Pipes and API Infrastructure

In a backend codebase, inconsistency is a silent performance killer. When every developer handles validation and route prefixing differently, the API surface becomes unpredictable. Recently, I tackled the initial configuration for the crm-saas-backend project to bring order to our NestJS architecture.

The Problem: The Wild West of Routing

Without a unified global configuration, every new

Securing NestJS Endpoints: Implementing JWT Authentication

Securing API endpoints is the gatekeeper moment for any SaaS platform. In the crm-saas-backend project, we recently focused on shifting from open access to a robust, identity-aware architecture using NestJS and JWTs.

The Challenge

As we scale our CRM capabilities, protecting sensitive business logic within our controllers became a priority. We needed a way to ensure that only authenticated

Structuring Domain Interactions: Implementing Data Transfer Objects in NestJS

Standardizing Business Logic

In our crm-saas-backend project, we often find ourselves managing various customer touchpoints. As the system grows, passing raw objects or loose data structures between services leads to "hidden" dependencies and runtime errors that are difficult to debug. To solve this, we recently implemented a formalized Data Transfer Object (DTO) pattern to strictly define

Adopting Immutability: Why We Removed Our Update Endpoints

In our work on the SBSofiaBartoli/crm-saas-backend project, we recently reached a significant milestone in our data architecture. We decided to pivot away from traditional update-heavy CRUD operations, favoring an immutable approach to record management.

The Problem with Traditional Updates

In our initial implementation, we treated records as mutable entities. Any change meant performing an

Standardizing Data Input with DTOs in NestJS

Introduction

In the crm-saas-backend project, we are focusing on improving the maintainability of our CRM follow-up system. As our application scales, managing incoming request data becomes critical to ensure data integrity and API clarity. To address this, we are moving toward a strictly typed Data Transfer Object (DTO) pattern using NestJS and Swagger.

The Challenge of Unstructured

Optimizing CRM Data Retrieval: Implementing Aggregate Metrics Endpoints

The Bottleneck

In the crm-saas-backend project, our dashboard performance was suffering due to N+1 network requests. To display high-level metrics, the client-side application had to fire multiple separate API calls to various resources, leading to increased latency and unnecessary overhead for the user.

The Challenge

As our SaaS platform grew, the cost of these individual requests

Securing File Uploads: Implementing Mime-Type Validation in CRM SaaS

In our crm-saas-backend project, we recently hit a bottleneck regarding data ingestion. Our users need to bulk-import client lists, and the system needed a robust way to ensure that only expected file formats enter our processing pipeline. Allowing arbitrary files is like inviting a stranger into your home without checking their ID—you never know what kind of malicious payload might follow.

Streamlining Data Ingestion: Implementing Robust DTOs in NestJS

Managing file imports in a growing SaaS platform often leads to a common bottleneck: inconsistent data structures entering the system. In the crm-saas-backend project, we recently addressed the need for stricter validation when processing batch imports, moving away from loose object handling toward structured Data Transfer Objects (DTOs).

The Challenge of Unstructured Imports