Author: Sergio Lema

  • Mastering Docker Compose for Local Development and Testing

    Mastering Docker Compose for Local Development and Testing

    This article emphasizes the importance of creating a local development environment that closely resembles production using Docker Compose. It covers setting up microservices, databases, and caching systems, while discussing necessary configurations for effective unit testing. The ultimate goal is to minimize discrepancies and enhance software development efficiency.

  • Multi-Environment Configuration in Spring Boot

    Multi-Environment Configuration in Spring Boot

    In this article, I talk about the importance of proper configuration in Spring Boot applications across multiple environments. By using Maven profiles, environment variables, and CI/CD pipelines, developers can maintain clean and flexible configurations. The goal is to ensure a seamless application experience whether running locally or in production, without the risk of misconfigurations.

  • React Performance Tips and Tools

    React Performance Tips and Tools

    In this article, I discuss the importance of optimizing React app performance, placing the responsibility on developers rather than blaming users. I highlights common issues, such as unnecessary re-renders, inefficient state management, and large bundle sizes. Solutions include memoization, flattening component trees, state centralization, code splitting, and using appropriate tools for diagnosis and improvement.

  • I’ve Created a RAG in Two Days

    I’ve Created a RAG in Two Days

    In the AI era, web developers must integrate AI into projects to stay relevant. I’ve built a Retrieval-Augmented Generation (RAG) system in two days, combining a knowledge database with an LLM. Key components included data chunking and retrieval. The project showcased AI’s ability to provide specific responses, using creative datasets for testing.

  • Forms in React, with or without React Forms

    Forms in React, with or without React Forms

    Forms in web development are essential for user interaction, yet often frustrating. This content compares traditional HTML forms with React Form Components, discussing their pros and cons. Basic forms are simplistic but limited in validation, while React libraries enhance user experience with advanced features. Choose based on form complexity and validation needs.

  • Stop & Start GCP SQL Instances at Nights

    Stop & Start GCP SQL Instances at Nights

    One of the great things about Google Cloud SQL instances is that they let me shut them down at night. The data sticks around (hopefully), but I can’t access it, which is exactly what I want. Since my backend servers are already tucked in for the night (explained in another article), keeping the database running…

  • SQLAlchemy and JSON values

    SQLAlchemy and JSON values

    Storing JSON in a relational database? Sounds like a contradiction, but sometimes, it’s the best solution. SQLAlchemy makes it easy to use a JSON column in Postgres—until you try to update a single value inside it. Turns out, SQLAlchemy doesn’t track those changes by default, leading to silent failures. The fix? Marking the column as…

  • GCP Cloud Functions with SQL Access

    GCP Cloud Functions with SQL Access

    I’ve created a Google Cloud Function for a weekly task to streamline backend dependencies but faced complications with database connectivity. GCP requires a proxy, which undermines the initial goal of simplicity. Ultimately, I’ve moving all back into an existing backend to save extra fees from having a proxy up and running.

  • Deploying a Spring Boot Application to AWS ECS Fargate

    Deploying a Spring Boot Application to AWS ECS Fargate

    Why AWS ECS is Your New Best Friend for Microservices So, you’ve built a shiny new Spring Boot application, and now you’re wondering how to deploy it without losing your sanity. Enter AWS ECS (Elastic Container Service), the managed container orchestration service that lets you run Docker containers without having to babysit a Kubernetes cluster.…

  • Handle The Errors with Flask Correctly

    Handle The Errors with Flask Correctly

    Effective error management in Flask applications is crucial for security, usability, and debugging. Implement custom exceptions to centralize handling and use blueprints for clean error responses. Additionally, log useful details while avoiding exposing sensitive information. This strategy ensures a better user experience and maintains application integrity.