<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ignacio Rigoni on Medium]]></title>
        <description><![CDATA[Stories by Ignacio Rigoni on Medium]]></description>
        <link>https://medium.com/@nachokhan?source=rss-3c8849aef2c4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*WR5210ZEvsyd99Ths9rgOw@2x.jpeg</url>
            <title>Stories by Ignacio Rigoni on Medium</title>
            <link>https://medium.com/@nachokhan?source=rss-3c8849aef2c4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 13:28:01 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nachokhan/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Probé distintas plataformas de reservas para restaurantes: “Hacé Tu Reserva”, Vouchero, Resmio y…]]></title>
            <link>https://medium.com/@nachokhan/prob%C3%A9-distintas-plataformas-de-reservas-para-restaurantes-hac%C3%A9-tu-reserva-vouchero-resmio-y-7b907b837058?source=rss-3c8849aef2c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/7b907b837058</guid>
            <category><![CDATA[comida]]></category>
            <category><![CDATA[hotelería]]></category>
            <category><![CDATA[restaurant-business]]></category>
            <category><![CDATA[gastronomia]]></category>
            <category><![CDATA[turismo]]></category>
            <dc:creator><![CDATA[Ignacio Rigoni]]></dc:creator>
            <pubDate>Tue, 07 Jul 2026 02:38:06 GMT</pubDate>
            <atom:updated>2026-07-07T02:38:06.993Z</atom:updated>
            <content:encoded><![CDATA[<h3>Probé distintas plataformas de reservas para restaurantes: “Hacé Tu Reserva”, Vouchero, Resmio y Maitre.</h3><p>Elegir un sistema de reservas para un restaurante no debería ser una decisión menor. En muchos casos, la plataforma termina siendo parte del funcionamiento diario del local: organiza turnos, evita errores, ordena la comunicación con los clientes, permite gestionar señas o pagos y, si está bien pensada, también ayuda a tomar mejores decisiones comerciales.</p><p>Con esa idea en mente, realicé una prueba comparativa entre distintas plataformas de reservas: <strong>Vouchero, Resmio, Maitre y Hacé Tu Reserva</strong>. El objetivo no fue únicamente ver cuál “funciona”, sino analizar qué tan práctica resulta cada una para un restaurante real, especialmente desde tres aspectos clave:</p><ul><li>facilidad de uso;</li><li>nivel de configuración;</li><li>capacidad de adaptarse a la operación diaria del restaurante.</li></ul><h3>La importancia de que un sistema sea simple, pero no limitado</h3><p>Un sistema de reservas tiene que resolver una tensión bastante concreta: debe ser lo suficientemente completo como para adaptarse a distintos tipos de restaurantes, pero lo suficientemente simple como para que el equipo pueda usarlo sin fricción.</p><p>Si una plataforma es muy básica, probablemente sirva para casos simples, pero puede quedarse corta cuando el restaurante necesita reglas específicas, señas, distintos sectores, horarios particulares o reportes.</p><p>Por el contrario, si una plataforma tiene muchas opciones pero es difícil de configurar o de operar, el beneficio empieza a perder fuerza. En gastronomía, donde los equipos tienen poco tiempo y la operación diaria suele ser intensa, la usabilidad no es un detalle: es parte central del valor del producto.</p><h3>Vouchero: económico, intuitivo, pero limitado</h3><p>Vouchero se destaca por ser una herramienta económica y bastante intuitiva. La experiencia de uso es simple y permite resolver lo básico sin demasiada curva de aprendizaje.</p><p>Ese es, justamente, su principal punto fuerte: es fácil de entender y de usar.</p><p>Sin embargo, durante la prueba también quedó claro que sus opciones de configuración son más limitadas. Para restaurantes con una operación sencilla puede ser suficiente, pero en locales que necesitan mayor flexibilidad, reglas más específicas o una gestión más personalizada de las reservas, esa simplicidad puede convertirse en una restricción.</p><p>En resumen: Vouchero cumple bien en facilidad de uso y precio, pero puede quedarse corto para restaurantes que necesitan una configuración más completa.</p><h3>Resmio: simple y accesible, pero demasiado básica</h3><p>Resmio también se presenta como una opción fácil de usar. Su propuesta es simple, especialmente en la versión gratuita, donde el principal atractivo está claramente en el precio.</p><p>La plataforma puede ser útil para negocios que buscan una solución muy básica y no necesitan demasiadas funcionalidades avanzadas. Pero esa misma simpleza limita su alcance.</p><p>En la práctica, la versión gratuita resulta bastante reducida, y la plataforma no parece ofrecer un equilibrio sólido entre facilidad de uso y profundidad funcional. Es sencilla, sí, pero no necesariamente lo suficientemente completa para restaurantes que quieren gestionar sus reservas con mayor precisión o usar la información para mejorar su operación.</p><p>Su punto fuerte es el costo. Su punto débil, la falta de herramientas más robustas.</p><h3>Maitre: trayectoria, presencia y muchas opciones, pero con una experiencia compleja</h3><p>Maitre tiene una trayectoria extensa y presencia en muchos restaurantes. Eso, en sí mismo, no es menor: durante años fue una de las opciones más visibles y viables para quienes necesitaban digitalizar la gestión de reservas.</p><p>Esa presencia histórica le dio un lugar importante en el mercado. También cuenta con una cantidad considerable de opciones y funcionalidades, lo que la convierte en una herramienta completa desde el punto de vista técnico.</p><p>El problema aparece en la experiencia de uso.</p><p>Durante la prueba, la plataforma resultó menos intuitiva y más compleja de operar. Configurar y utilizar el sistema puede requerir más tiempo del necesario, y esa complejidad puede terminar afectando la adopción por parte del equipo del restaurante.</p><p>En un sistema de reservas, tener muchas funciones no alcanza. Si el uso diario no es claro, rápido y práctico, la cantidad de opciones deja de ser una ventaja evidente.</p><p>Maitre ofrece profundidad, pero esa profundidad viene acompañada de una curva de uso más alta.</p><h3>“Hacé Tu Reserva”: una alternativa más nueva, simple y flexible</h3><p>Hacé Tu Reserva es una plataforma más nueva en comparación con alternativas de mayor trayectoria. Tiene alrededor de cinco años en el mercado, pero justamente esa condición le permite partir desde una lógica más actual: una interfaz más clara, una experiencia más simple y un enfoque más flexible.</p><p>Durante la prueba, uno de los puntos más fuertes fue la combinación entre <strong>simplicidad de uso y capacidad de configuración</strong>.</p><p>La plataforma no se limita solamente a ordenar reservas. También permite trabajar con herramientas que impactan directamente en la operación y en la rentabilidad del restaurante, como:</p><ul><li>gestión de reservas;</li><li>configuración flexible según el tipo de restaurante;</li><li>manejo de pagos y señas;</li><li>organización operativa del local;</li><li>métricas y reportes para análisis;</li><li>información útil para tomar decisiones comerciales.</li></ul><p>Esto marca una diferencia importante: Hacé Tu Reserva no está pensada únicamente como una agenda digital, sino como una herramienta para mejorar la gestión y <strong>acompañar el crecimiento del restaurante</strong>.</p><p>La clave está en que esa funcionalidad no aparece envuelta en una experiencia compleja. La plataforma mantiene una interfaz simple, clara e intuitiva, lo que facilita que el equipo del restaurante pueda adoptarla sin depender de procesos largos o configuraciones difíciles.</p><h3>Completo no debería significar complicado</h3><p>Una conclusión clara de la prueba es que, en sistemas de reservas, la cantidad de funcionalidades no es suficiente para definir cuál es la mejor opción.</p><p>Un restaurante necesita una plataforma que sea:</p><ul><li>fácil de configurar;</li><li>fácil de usar por el equipo;</li><li>flexible ante distintos modelos de operación;</li><li>capaz de manejar casos reales como señas, pagos, horarios, sectores o reglas particulares;</li><li>útil no solo para ordenar, sino también para mejorar resultados.</li></ul><p>Desde ese punto de vista, la comparación muestra distintos enfoques.</p><p>Vouchero y Resmio son opciones simples y accesibles, pero con limitaciones funcionales. Maitre ofrece más profundidad y trayectoria, pero con una experiencia de uso más compleja. Hacé Tu Reserva, en cambio, busca ubicarse en un punto intermedio más equilibrado: ser completa, pero sin volverse difícil de usar.</p><h3>La plataforma ideal debe ayudar a operar y también a crecer</h3><p>Gestionar reservas no es solamente anotar nombres, horarios y cantidad de personas. Una buena plataforma puede ayudar a reducir ausencias, ordenar la demanda, mejorar la ocupación, anticipar la operación y entender mejor el comportamiento de los clientes.</p><p>Por eso, el valor de un sistema de reservas no debería medirse únicamente por su precio o por la cantidad de funciones disponibles, sino por su capacidad real de integrarse al día a día del restaurante.</p><p>En ese sentido, Hacé Tu Reserva aparece como una opción sólida para restaurantes que necesitan algo más que una herramienta básica, pero que tampoco quieren lidiar con sistemas complejos, pesados o poco intuitivos.</p><p>Su principal fortaleza está en combinar tres elementos que no siempre aparecen juntos:</p><p><strong>funcionalidad, simplicidad y flexibilidad.</strong></p><p>Para restaurantes que buscan ordenar su operación, profesionalizar la gestión de reservas y empezar a utilizar datos para crecer, esa combinación puede ser mucho más valiosa que elegir simplemente la plataforma más conocida o la más barata.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7b907b837058" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[N8N export/import: el fin de una era]]></title>
            <link>https://medium.com/@nachokhan/n8n-export-import-el-fin-de-una-era-52b896c8b528?source=rss-3c8849aef2c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/52b896c8b528</guid>
            <dc:creator><![CDATA[Ignacio Rigoni]]></dc:creator>
            <pubDate>Sun, 05 Apr 2026 23:32:11 GMT</pubDate>
            <atom:updated>2026-04-05T23:32:11.856Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zfm0nEQ9RU7bP0HySsACVA.png" /></figure><p>Imaginemos esta situación, bastante real si venís trabajando en serio con n8n. En tu entorno de DEV tenés un workflow root que resuelve un proceso importante del negocio, pero ese root llama a varios subworkflows, y algunos de esos subworkflows a su vez llaman a otros subworkflows. Además, tanto el root como sus dependencias usan credenciales de servicios externos como Google Drive, Google Sheets, OpenAI o Gemini. Y, para sumar contexto, en ese mismo entorno también tenés otros workflows root con sus propios subflujos y credenciales, compartidas o no, que todavía no querés mover a otro ambiente.</p><p>El objetivo es llevar solo ese primer workflow root a otro entorno n8n, junto con todo lo que realmente necesita para funcionar, sin arrastrar workflows que no corresponden y sin meterte en un export/import masivo.</p><p>Copiar workflows y credenciales a mano no escala: es fácil olvidarse un subworkflow, una referencia o una credencial compartida. Export/import tampoco resuelve bien este caso, porque suele mezclar más cosas de las que querés mover o te obliga a revisar demasiado a mano. Y cuando el grafo crece, ese proceso deja de ser confiable muy rápido. Si además querés repetirlo más de una vez entre entornos, la chance de error humano sube bastante. Ahí es donde ndeployse vuelve útil: te deja preparar y aplicar un deploy acotado al root workflow y sus dependencias reales.</p><p>La idea de ndeploy no es explicarte internamente cómo hace magia, sino darte una forma práctica de mover un workflow root con sus subworkflows, credenciales y demás dependencias, de forma controlada. En otras palabras: elegís qué workflow root querés desplegar, generás un plan, revisás el resultado y después lo aplicás. Sin andar tocando producción manualmente workflow por workflow. Y, salvo algún caso puntual como activar una credencial, tampoco deberías modificar el entorno de producción a mano.</p><p>Y hay otro punto práctico que suma bastante: ndeploy, tu instancia de DEV y tu instancia de PROD pueden estar tranquilamente en servidores distintos. ndeploy no necesita convivir físicamente con ninguno de los dos entornos; lo importante es que tenga acceso API a ambos.</p><h3>El enfoque</h3><p>Con ndeploy, el proceso recomendado gira alrededor de un workspace local. Ese workspace representa el deploy de un root workflow específico, no de toda tu instancia n8n. Eso es justamente lo interesante: trabajás sobre una unidad concreta de despliegue, con sus dependencias reales, y dejás afuera lo que todavía no querés promover.</p><p>La secuencia base es esta:</p><ol><li>create</li><li>plan</li><li>apply</li></ol><p>Después, como paso complementario para credenciales, está credentials update.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*rWc-LEvIk4ecYGU_.png" /></figure><h3>Antes de empezar</h3><p>Necesitás tener configurado el acceso API a ambos entornos n8n, por ejemplo en un archivo .env:</p><pre>N8N_DEV_URL=http://localhost:5678<br>N8N_DEV_API_KEY=dev_api_key<br>N8N_PROD_URL=http://localhost:5679<br>N8N_PROD_API_KEY=prod_api_key</pre><p>También necesitás tener disponible el CLI de ndeploy 2.0. Si ya lo instalaste y lo linkeaste, podés usar ndeploy directo. Si no, también podrías ejecutarlo desde npm según cómo tengas armado el proyecto.</p><p>Eso significa que podrías tener DEV en un server, PROD en otro y ndeploy corriendo desde tu máquina o desde una tercera máquina de automatización. Mientras el CLI pueda conectarse por API a ambos ambientes, el flujo de trabajo es el mismo.</p><h3>Paso 1: crear el workspace del deploy</h3><p>Primero elegís el workflow root de DEV que querés llevar al otro entorno. No seleccionás toda la instancia, no exportás una carpeta entera, no armás un zip raro: arrancás desde el workflow root correcto.</p><pre>ndeploy create &lt;workflow_id_dev&gt; [workspace_root]</pre><p>Por ejemplo:</p><pre>ndeploy create AbCdEf123</pre><p>Este comando crea una carpeta de workspace e inicializa workspace.json con la referencia al workflow root de DEV. A partir de ahí, ese workspace pasa a ser tu unidad de trabajo para este deploy puntual.</p><p>Esto tiene una ventaja importante: si mañana querés deployar otro root workflow distinto, armás otro workspace y listo. No mezclás despliegues, no pisás decisiones y no te llevás por delante otros flujos que todavía no tienen que salir de DEV.</p><h3>Paso 2: generar el plan</h3><p>Con el workspace ya creado, generás el plan:</p><pre>ndeploy plan &lt;workspace&gt;</pre><p>Por ejemplo:</p><pre>ndeploy plan mi-workflow-root</pre><p>Acá es donde ndeploy toma el root workflow configurado en ese workspace y arma el despliegue considerando sus dependencias recursivas. Es decir: detecta los subworkflows involucrados, las credenciales usadas y otros recursos relacionados que realmente forman parte de ese root.</p><p>El resultado principal queda en:</p><ul><li>&lt;workspace&gt;/plan.json</li><li>&lt;workspace&gt;/reports/plan_summary.json</li></ul><p>En la práctica, plan te da algo muy valioso: una vista concreta de qué se va a crear, qué se va a actualizar y qué se puede mapear contra recursos ya existentes en el entorno destino. Antes de tocar producción, podés revisar ese plan tranquilo, entender el alcance y validar que el deploy esté yendo por donde vos esperás.</p><p>Si venías de hacer estas cosas manualmente, este punto suele ser el quiebre. Ya no dependés de acordarte qué subworkflow llamaba a cuál, ni de reconstruir mentalmente qué credenciales estaban involucradas.</p><h3>Paso 3: preparar las credenciales</h3><p>Una vez generado el plan, el paso extra recomendado es actualizar el archivo de credenciales del workspace:</p><pre>ndeploy credentials update &lt;workspace&gt; --fill</pre><p>Por ejemplo:</p><pre>ndeploy credentials update mi-workflow-root --fill</pre><p>Este comando crea o actualiza production_credentials.json con las credenciales que usa ese root workflow y sus subworkflows recursivos. No trabaja sobre todas las credenciales de la instancia: trabaja sobre las que necesita este deploy.</p><p>Esto está buenísimo por dos motivos. Primero, porque te deja concentrarte solo en las credenciales realmente involucradas. Segundo, porque separa muy bien la preparación del deploy de la configuración sensible del entorno de destino.</p><p>Lo esperable acá es revisar production_credentials.json y completar o ajustar los valores necesarios para PROD. Dependiendo del tipo de credencial, puede que --fill ya te deje bastante adelantado el trabajo; otras veces simplemente te deja la estructura lista para terminar de completarla de forma controlada.</p><p>Si querés sumar una validación antes de aplicar, podés correr:</p><pre>ndeploy credentials validate &lt;workspace&gt; --strict</pre><p>No siempre hace falta mostrar este paso en una demo corta, pero en un flujo real suma bastante.</p><h3>Paso 4: aplicar el deploy</h3><p>Con el plan revisado y las credenciales preparadas, llega el momento de aplicar:</p><pre>ndeploy apply &lt;workspace&gt;</pre><p>Por ejemplo:</p><pre>ndeploy apply mi-workflow-root</pre><p>Este comando ejecuta el plan en el entorno destino y genera reportes como:</p><ul><li>&lt;workspace&gt;/reports/deploy_result.json</li><li>&lt;workspace&gt;/reports/deploy_summary.json</li></ul><p>Desde el punto de vista operativo, este es el beneficio central de ndeploy: llevás a otro entorno exactamente el workflow root que querías desplegar, junto con sus dependencias necesarias, sin tener que editar producción manualmente recurso por recurso.</p><p>Y esto vale remarcarlo: con ndeploy, el entorno de producción no debería tocarse a mano salvo excepciones puntuales, como activar alguna credencial o completar alguna configuración que, por política o por seguridad, preferís terminar directamente en ese ambiente. Pero el deploy del flujo como tal no debería depender de intervención manual.</p><p>Como detalle final, si después querés publicar manualmente el workflow root en destino, podés hacerlo con:</p><pre>ndeploy publish &lt;workflow_id_prod&gt;</pre><p>Ese paso manual mantiene algo importante: el control humano sobre la salida final del workflow principal, sin obligarte a operar el resto del deploy a mano.</p><h3>Qué se logra con este enfoque</h3><p>Cuando usás ndeployasí, ganás varias cosas al mismo tiempo:</p><ul><li>Desplegás un root workflow específico, no una porción difusa de la instancia.</li><li>Incluís sus dependencias reales, aunque estén anidadas en varios niveles.</li><li>Evitás arrastrar otros workflows root que todavía no tienen que salir.</li><li>Ordenás la gestión de credenciales alrededor del deploy concreto.</li><li>Reducís muchísimo el riesgo de errores manuales.</li><li>Podés repetir el proceso de forma más predecible entre entornos.</li></ul><p>Dicho simple: pasás de un deploy artesanal a un deploy controlado.</p><h3>Un flujo de trabajo recomendado</h3><p>Si tuviera que resumir el uso diario en una secuencia corta, sería esta:</p><pre>ndeploy create &lt;workflow_id_dev&gt;<br>ndeploy plan &lt;workspace&gt;<br>ndeploy credentials update &lt;workspace&gt; --fill<br>ndeploy credentials validate &lt;workspace&gt; --strict<br>ndeploy apply &lt;workspace&gt;</pre><p>Y después revisás los reportes generados por el workspace.</p><h3>Cierre</h3><p>Si trabajás con n8n en entornos donde hay varios workflows root, subworkflows compartidos y credenciales cruzadas, ndeployte resuelve un problema muy concreto: mover solo lo que corresponde mover, sin depender de export/import ni de una coreografía manual en producción.</p><p>No hace falta entender por dentro cómo construye el deploy para aprovecharlo. Lo importante, desde el lado del usuario, es que podés seleccionar un root workflow, generar un plan verificable, preparar sus credenciales y aplicarlo en otro entorno de forma prolija. Y eso, cuando los flujos empiezan a crecer de verdad, te ahorra bastante tiempo y varios dolores de cabeza.</p><p><strong>NDeploy ProjectWebsite</strong>: <a href="https://nachokhan.github.io/n8n-ndeploy/">https://nachokhan.github.io/n8n-ndeploy/</a></p><p><strong>NDeploy Technical Documents</strong>: <a href="https://nachokhan.github.io/n8n-ndeploy/tech/index.html">https://nachokhan.github.io/n8n-ndeploy/tech/index.html</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=52b896c8b528" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The End of n8n Export/Import: Meet NDEPLOY]]></title>
            <link>https://medium.com/@nachokhan/the-end-of-n8n-export-import-meet-ndeploy-11d543fa1456?source=rss-3c8849aef2c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/11d543fa1456</guid>
            <category><![CDATA[deployment]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[n8n]]></category>
            <dc:creator><![CDATA[Ignacio Rigoni]]></dc:creator>
            <pubDate>Sun, 05 Apr 2026 04:02:30 GMT</pubDate>
            <atom:updated>2026-04-05T04:02:30.097Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DTgaTVIm1kdTzyJVJ399TQ.png" /></figure><p>Imagine this situation.</p><p>Your team has an n8n workflow in development called Invoice Intake Pipeline. It receives incoming invoices, classifies them with OpenAI, stores audit data in Postgres, sends alerts to Slack, and pulls attachments from Gmail. That workflow also depends on four sub-workflows: one for OCR cleanup, one for vendor matching, one for exception handling, and one for final notifications. On top of that, it uses two data tables and several credentials.</p><p><strong>Now you want to move only that workflow to production.</strong></p><p>This is the moment where classic export/import starts to feel wrong. A workflow JSON file is not the same thing as a deployable unit. The root workflow may reference sub-workflows by ID. Nodes may point to credentials that exist in both environments, but under different IDs. Data tables may already exist in production with the same name, but not the same identifier.</p><p>That is the exact problem <strong>NDEPLOY 2.0</strong> is built to solve.</p><h3>Treating Workflows as Deployable Units</h3><p>NDEPLOY 2.0 is not a backup tool and it is not a raw import/export wrapper. It is a deployment CLI for promoting one n8n workflow graph from DEV to PROD in a controlled way.</p><p>Instead of treating a workflow as a single file, it treats it as a <strong>graph of dependencies</strong>. It discovers what the root workflow needs, builds a plan, checks whether DEV changed since that plan was created, maps DEV IDs to PROD IDs, patches the right references, and applies only the required changes.</p><p>The operator flow is simple:</p><pre>ndeploy create wf_dev_123 ./releases<br>ndeploy plan ./releases/Invoice-Intake-Pipeline<br>ndeploy credentials update ./releases/Invoice-Intake-Pipeline --fill<br>ndeploy credentials validate ./releases/Invoice-Intake-Pipeline --strict<br>ndeploy apply ./releases/Invoice-Intake-Pipeline<br>ndeploy publish &lt;root_workflow_id_prod&gt;</pre><p>Here is exactly what happens at each step:</p><ul><li><strong>ndeploy create</strong>: Initializes a workspace around one DEV workflow ID and stores its metadata.</li><li><strong>ndeploy plan</strong>: Analyzes the workflow graph and writes a reviewable plan.</li><li><strong>ndeploy credentials update --fill</strong>: Creates a separate credential template file for production.</li><li><strong>ndeploy credentials validate --strict</strong>: Makes sure required credential fields are ready before deployment.</li><li><strong>ndeploy apply</strong>: Executes the plan in PROD.</li><li><strong>ndeploy publish</strong>: The final manual step for the root workflow.</li></ul><p>That last step matters. In NDEPLOY 2.0, the root workflow is never auto-published. Sub-workflows can be activated automatically after they are created or updated, but the top-level workflow remains a human decision.</p><h3>Under the Hood: The Dependency Graph</h3><p>The interesting part is how much NDEPLOY does <em>before</em> it writes anything.</p><p>During planning, it walks the root workflow recursively and discovers sub-workflows through executeWorkflow nodes. It also collects credentials from node definitions, data tables from dataTableId and tableId, and error-handler dependencies through settings.errorWorkflow. The result is a <strong>deployment graph</strong>, not just a JSON export.</p><p>Then it generates a plan artifact with ordered actions:</p><ul><li>Credentials and data tables are matched in PROD by name.</li><li>Workflows are marked for create or update depending on whether a workflow with the same name already exists in PROD.</li><li>Actions are sorted topologically, so dependencies are handled before the workflows that need them.</li></ul><p>This is where the “end of export/import” idea becomes real. NDEPLOY is not doing a blind text copy. Before writing workflows, <strong>it patches references structurally</strong>. It rewrites credential IDs in node credentials, workflow references such as workflowId, data table references such as dataTableId or tableId, and settings.errorWorkflow. It does that through object traversal and an ID map, not through global string replacement.</p><h3>The Safety Layer: Checksum Validation</h3><p>There is another useful safety layer: <strong>checksum validation</strong>. When you run apply, NDEPLOY checks whether the DEV workflows still match the checksums stored in the plan. If someone changed the source workflow after planning, apply can stop before pushing stale assumptions into production. It also compares normalized workflow content in PROD and can skip updates when the effective content is already equivalent.</p><h3>Handling Secrets the Right Way</h3><p>Credentials are handled separately, which is the right design choice.</p><p>Instead of mixing secret handling into the deployment plan, NDEPLOY writes a dedicated production_credentials.json file. For each active credential in the workflow graph, it builds an editable template using the DEV credential schema when available. That gives you required fields, field names, and a place to enter or review production values. Credentials that are no longer used move into an archived section instead of disappearing silently.</p><p>When you use --fill, NDEPLOY first tries to obtain credential data from the DEV API. If some credentials still cannot be resolved, it can optionally call the included webhook fallback. That fallback is itself an n8n workflow: it receives a list of requested credentials, validates a token, runs n8n export:credentials --all --decrypted on the DEV host, filters the exported set in memory, and returns only the requested credential data.</p><h3>The Bottom Line</h3><blockquote><em>The simplest way to describe NDEPLOY 2.0 is this: it turns n8n promotion into a release process instead of a file transfer.</em></blockquote><p>With classic export/import, you move JSON and then fix the environment by hand. With NDEPLOY 2.0, you start from one workflow, discover its real dependency graph, review a plan, prepare credentials separately, validate freshness, patch references safely, and activate the root workflow only when you decide it is time.</p><p>That is why NDEPLOY 2.0 feels like the end of n8n export/import. The real unit of deployment was never the JSON file. It was the workflow graph all along.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=11d543fa1456" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[El problema de desplegar workflows de n8n en producción]]></title>
            <link>https://medium.com/@nachokhan/el-problema-de-desplegar-workflows-de-n8n-en-producci%C3%B3n-89fb3f077e50?source=rss-3c8849aef2c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/89fb3f077e50</guid>
            <category><![CDATA[n8n]]></category>
            <category><![CDATA[n8n-automation]]></category>
            <category><![CDATA[n8n-workflow]]></category>
            <category><![CDATA[n8n-self-host]]></category>
            <category><![CDATA[deployment]]></category>
            <dc:creator><![CDATA[Ignacio Rigoni]]></dc:creator>
            <pubDate>Tue, 17 Mar 2026 20:33:14 GMT</pubDate>
            <atom:updated>2026-03-17T20:33:14.511Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Separar entornos no alcanza. El problema aparece cuando hay cambios parciales, subworkflows compartidos, credenciales, Data Tables y la necesidad de desplegar solo lo que realmente está listo.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0z5y5N8i7bVlCpFWi22fBA.png" /></figure><p>Cuando uno empieza con n8n, el deployment suele parecer un detalle menor.</p><p>Al principio todo parece razonable. Haces un workflow, lo pruebas, ajustas algunos nodos y, cuando funciona, lo dejas activo. Si más adelante el proyecto crece, las salidas rápidas también parecen razonables: usar la misma instancia para todo, copiar workflows a mano entre entornos, o exportar desde desarrollo e importar en producción.</p><p>El problema es que esas estrategias suelen funcionar solo mientras el sistema sigue siendo chico, simple y relativamente aislado.</p><p>En cuanto aparecen varios workflows, subworkflows reutilizados, credenciales compartidas, Data Tables, pruebas en curso, cambios parciales y piezas que todavía no deberían llegar a producción, el problema deja de ser “cómo mover un JSON” y pasa a ser otro:</p><p><strong>cómo desplegar una parte del sistema sin arrastrar otras, sin romper referencias y sin depender de memoria manual.</strong></p><p>Ese, para mí, es el problema real del deployment en n8n.</p><p>En este artículo quiero recorrer <strong>tres</strong> estrategias muy comunes, mostrar por qué resultan tentadoras al principio y explicar por qué empiezan a romperse cuando el entorno deja de ser una demo y empieza a convertirse en un sistema real.</p><h3>1) Usar la misma instancia de n8n para desarrollo y producción</h3><p>Esta suele ser la estrategia más natural al comienzo.</p><p>Tienes una única instancia. Ahí convive todo: <em>workflows</em> estables, <em>workflows</em> en prueba, <em>POCs</em>, <em>subworkflows</em> reutilizables, <em>credenciales</em>, <em>Data Tables</em> y cualquier experimento que vayas haciendo mientras construyes.</p><p>A primera vista, simplifica bastante. No hay que mover nada entre servidores. No hay que sincronizar objetos. No hay que pensar demasiado en deployment porque, en cierto sentido, desarrollo y producción viven en el mismo lugar.</p><p>El problema aparece cuando necesitas hacer cambios parciales.</p><p>Imagina un caso típico. Tienes un workflow principal que procesa facturas. Ese workflow llama varias veces a dos subworkflows reutilizables: uno normaliza proveedores y otro clasifica documentos. Ambos usan credenciales compartidas y además dependen de una Data Table con mappings auxiliares.</p><p>Ahora quieres modificar <strong>solo uno</strong> de esos subworkflows porque encontraste una mejora para un border case. El cambio todavía no está del todo validado, así que no debería afectar producción todavía. O sea, no debería ser deployado.</p><p>Y ahí es donde la falta de separación real entre desarrollo y producción empieza a ser un dolor de cabeza.</p><p>No porque “tener una sola instancia” sea malo en sí mismo (aunque un poco lo es), sino porque te deja sin una distinción clara entre lo que está en uso real (<em>producción</em>) y lo que todavía está en exploración. Cuando esa distinción no existe, empiezan a aparecer problemas mucho más concretos:</p><ul><li>un cambio en un subworkflow compartido puede afectar varios workflows productivos al mismo tiempo</li><li>los POCs y experimentos quedan conviviendo con flujos reales de negocio</li><li>probar una nueva versión de una pieza compartida se vuelve riesgoso</li><li>deja de ser obvio -y trackeable- qué está listo y qué no está listo</li><li>el sistema entero empieza a depender demasiado de convenciones humanas y cuidado manual</li></ul><p>Dicho de otra manera: el problema no es filosófico. Es operativo, es real. Empieza a doler.</p><p>Cuando no hay separación real de entornos, <strong>un cambio local deja de ser local</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CcUuLMn5SHZWzQt3nBeesw.png" /><figcaption>Ejemplo de instancia única en n8n</figcaption></figure><p>Este escenario además tiene otro problema silencioso: te cuesta muchísimo decidir qué forma parte realmente de “producción” y qué no.</p><p>Si en esa misma instancia tienes workflows todavía inmaduros, pruebas a medio hacer o POCs que jamás deberían ejecutarse fuera del entorno de desarrollo, no basta con decir “bueno, esto no se usa”. El problema es que sigue estando ahí, compartiendo espacio, nombres, referencias y dependencias con el resto.</p><p>Y en cuanto el sistema crece, eso deja de ser una incomodidad menor y pasa a ser deuda operativa.</p><h3>2) Usar instancias separadas, pero mover workflows y dependencias manualmente</h3><p>La segunda estrategia ya parece más seria. Aunque, spoiler, no lo es. Ya la palabra “manual”, en el ámbito informático, nos hace ruido :)</p><p>Aquí sí tienes separación real entre entornos. Tienes una instancia DEV y una instancia PROD. Eso ya mejora mucho el aislamiento, porque puedes probar y modificar cosas en desarrollo sin tocar inmediatamente lo que se está ejecutando en producción.</p><p>Hasta ahí, todo bien.</p><p>El problema empieza en el momento del deployment.</p><p>Porque una cosa es separar entornos, y otra muy distinta es tener una forma robusta de desplegar cambios entre ellos.</p><p>Supongamos que en DEV terminaste una mejora en un workflow principal. Ese workflow llama a dos subworkflows, depende de ciertas credenciales y necesita una Data Table concreta para funcionar correctamente. Además, y siguiendo con el apartado anterior, en la misma instancia de desarrollo tienes otros workflows en prueba y algunos POCs que jamás deberían llegar a producción.</p><p>Si el deployment se hace manualmente, el proceso real suele parecerse bastante a esto:</p><ul><li><strong>copiar</strong> el workflow principal</li><li>identificar qué <strong>subworkflows</strong> necesita</li><li><strong>copiar</strong> también esos subworkflows</li><li>revisar si las <strong>credenciales</strong> existen en producción</li><li><strong>reconfigurar</strong> referencias</li><li>revisar Data Tables</li><li>corregir detalles <strong>a mano</strong> si algo no encaja</li><li>repetir el proceso cada vez que haya una nueva versión</li></ul><p>Eso puede funcionar cuando el sistema es pequeño. Pero en cuanto crece un poco, el problema deja de ser “mover objetos” y pasa a ser <strong>la falta de garantías</strong>. Aunque, honestamente, aún en sistemas pequeños me parece una locura total.</p><p><strong>No tienes garantía</strong> de haber movido <em>todo</em> lo necesario.</p><p><strong>No tienes garantía</strong> de haber movido <em>solo</em> lo necesario.</p><p><strong>No tienes garantía</strong> de que una dependencia compartida haya quedado apuntando a la versión correcta.</p><p>Y, sobre todo, no tienes garantía de poder repetir el mismo deployment dos veces con exactamente el mismo resultado.</p><p>Y como si todo esto fuera poco, ¡<strong>el tiempo y cansancio mental</strong> que conlleva esta tarea!</p><p>Ese es el punto donde la operación empieza a depender demasiado de memoria, atención, contexto y buena voluntad. Es decir: el comienzo del <strong>caos total</strong>.</p><p>Y ahí aparecen problemas muy concretos:</p><ul><li>el workflow principal llega a producción, pero falta un subworkflow</li><li>el subworkflow existe, pero no es la versión correcta</li><li>la credencial existe, pero no es la que ese flujo esperaba</li><li>la Data Table está incompleta o desactualizada</li><li>un cambio que debía desplegar solo una pieza termina arrastrando otras</li><li>una parte del sistema queda en una mezcla difícil de detectar entre “viejo” y “nuevo”</li></ul><p>Esta estrategia falla menos por falta de separación y más por algo más silencioso: <strong>el deployment deja de ser reproducible</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pgYWiQn4AYjlGCrgIIeQgw.png" /><figcaption>Copiar flujos manualmente</figcaption></figure><p>Este punto se vuelve especialmente grave cuando lo que quieres desplegar no es “todo lo que hay en DEV”, sino <strong>solo una parte</strong>.</p><p>Por ejemplo: quieres desplegar un workflow con sus subworkflows necesarios, pero no otros porque todavía están en prueba, porque son POCs o porque simplemente no forman parte de esta release.</p><p>Ahí el problema manual ya no es solo copiar cosas. El problema es que necesitas decidir, con precisión, <strong>qué forma parte de la unidad de cambio y qué no</strong>. Y si esa decisión depende de recordar relaciones, referencias y dependencias a mano, el margen de error crece muy rápido.</p><h3>3) Usar export/import como mecanismo de deployment</h3><p>La tercera estrategia parece, al menos al principio, una evolución natural de la anterior.</p><p>En lugar de mover cosas a mano, exportas desde desarrollo e importas en producción. Sobre el papel, suena mejor. Más prolijo. Más sistemático. Más cercano a una forma seria de deployment.</p><p>Y, sin embargo, el problema de fondo sigue ahí.</p><p>Porque exportar e importar no equivale automáticamente a desplegar bien.</p><p>Imagina una instancia de desarrollo donde conviven:</p><ul><li>workflows maduros</li><li>workflows en prueba</li><li>subworkflows compartidos</li><li>credenciales</li><li>Data Tables</li><li>POCs descartables</li><li>cambios que todavía no deberían salir</li></ul><p>Ahora imagina que tú <strong>solo quieres desplegar una mejora puntual</strong> en un flujo concreto, junto con las piezas estrictamente necesarias para que esa mejora funcione.</p><p>Ahí aparece una diferencia importante: <strong>mover estado no es lo mismo que hacer un deployment controlado</strong>.</p><p>Export/import puede transportar objetos. Pero eso no significa que esté modelando con precisión una unidad de cambio lista para producción.</p><p>El problema aparece en cuanto empiezas a hacer preguntas incómodas:</p><ul><li>¿<strong>qué entra exactamente</strong> en este deployment?</li><li>¿qué <em>dependencias</em> son <strong>realmente necesarias</strong>?</li><li>¿qué <em>partes compartidas</em> estoy arrastrando sin querer?</li><li>¿qué objetos <strong>ya existen</strong> en producción y cómo deben reconciliarse?</li><li>¿qué parte del estado exportado representa algo listo, y qué parte representa trabajo todavía en curso?</li></ul><p>En un sistema pequeño, esas preguntas se pueden responder manualmente. En uno real, dejan de ser manejables.</p><p>Y ahí export/import empieza a mostrar sus límites como estrategia de deployment.</p><p>No porque exportar sea inútil. No lo es. Sirve para mover información. Puede servir para migraciones, backups o intercambios puntuales.</p><p>Pero cuando el problema pasa a ser <strong>desplegar solo una parte del sistema con dependencias resueltas y sin arrastrar lo que no corresponde</strong>, export/import queda demasiado cerca de una foto cruda del estado y demasiado lejos de una unidad de cambio bien definida.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xmVcitxCChdCCaFJHtlzjw.png" /><figcaption>Exportar e importar flujos en n8n</figcaption></figure><p>El problema más traicionero de esta estrategia es que puede dar una sensación falsa de orden.</p><p>Como existe un archivo, como hay una exportación y una importación, parece que ya hay un proceso serio. Pero el corazón del problema sigue sin resolverse: <strong>qué se está desplegando exactamente, con qué dependencias, y por qué ese conjunto debería considerarse listo para producción</strong>.</p><h3>El problema real NO es mover workflows</h3><p>Hasta acá, las tres estrategias parecen distintas. Y lo son.</p><p>Pero en el fondo tropiezan con el mismo problema: tratan el deployment como si fuera simplemente mover objetos de un lado a otro, cuando en realidad debería tratarse como <strong>el despliegue controlado de una unidad de cambio</strong>.</p><p>Ese matiz importa mucho.</p><p>Porque en n8n, un <em>workflow</em> rara vez vive solo. Puede depender de <em>subworkflows</em>, <em>credenciales</em>, <em>Data Tables</em>, referencias compartidas y piezas auxiliares que no siempre están explícitas a simple vista. Además, en desarrollo suelen convivir cosas que todavía no están listas, o que nunca deberían llegar a producción (como las <em>pruebas de concepto</em>).</p><p>Entonces el problema deja de ser “cómo pasar algo de un lado a otro”.</p><p>Las preguntas correctas son otras:</p><ul><li>¿<strong>qué quiero desplegar</strong> exactamente?</li><li>¿<strong>cuáles son sus dependencias</strong> reales?</li><li>¿qué otras piezas <strong>no deben entrar todavía</strong>?</li><li>¿cómo garantizo que el resultado sea consistente?</li><li>¿<strong>cómo repito el mismo deployment</strong> sin depender de memoria manual?</li><li>¿<strong>cómo hago un cambio parcial</strong> sin arrastrar el resto del entorno?</li></ul><p>Ahí es donde aparece, de verdad, <strong>el problema real del deployment en n8n</strong>.</p><p>No cuando tienes que mover todo.</p><p>Sino cuando necesitas desplegar <strong>solo una parte</strong>, con sus dependencias reales, sin arrastrar lo demás y sin romper consistencia.</p><h3>Cierre y … ¿solución? :)</h3><p>Ese fue el punto en el que empecé a pensar <a href="https://nachokhan.github.io/ndeploy/"><strong>NDeploy</strong></a>.</p><p>¡Ojo!, no como una forma “más cómoda” de exportar e importar workflows, ni como un wrapper para copiar objetos entre instancias, sino como un intento de modelar el deployment en n8n de una forma más explícita: partiendo de una unidad de cambio concreta, resolviendo dependencias y evitando arrastrar estado que no corresponde.</p><p>En el próximo artículo voy a meterme justamente en eso: no en la implementación interna de <strong>NDeploy</strong>, sino en la lógica sobre la que está pensado NDeploy y en por qué, para este problema, esa lógica importa más que el simple traslado de JSONs entre entornos.</p><p>Gracias por haber llegado hasta acá! Si te gustó o te interesa el próximo artículo, comenta para saber y dejar tu opinión al respecto!</p><p>Gracias por leer! ☺️</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=89fb3f077e50" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[La Clave para que tu Restaurante No te de más Dolores de Cabeza]]></title>
            <link>https://medium.com/@nachokhan/la-clave-para-que-tu-restaurante-no-te-de-m%C3%A1s-dolores-de-cabeza-a2a3f108b547?source=rss-3c8849aef2c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/a2a3f108b547</guid>
            <category><![CDATA[restaurant]]></category>
            <category><![CDATA[booking-software]]></category>
            <category><![CDATA[food]]></category>
            <dc:creator><![CDATA[Ignacio Rigoni]]></dc:creator>
            <pubDate>Fri, 01 Nov 2024 00:30:01 GMT</pubDate>
            <atom:updated>2024-11-01T00:30:01.617Z</atom:updated>
            <content:encoded><![CDATA[<p>En Argentina, el competitivo mundo de la gastronomía obliga q que cada mesa cuenta, y contar con un sistema de reservas efectivo es clave para mantener la organización y maximizar las ventas. <a href="http://www.hacetureserva.com/"><strong><em>HaceTuReserva</em></strong></a> llega como una solución sencilla, moderna y especialmente adaptada a las necesidades de los restaurantes en Argentina, brindando a los dueños y administradores de estos negocios una herramienta poderosa para gestionar sus reservas de manera eficiente y sin complicaciones.</p><h3>¿Qué es HaceTuReserva?</h3><p>HaceTuReserva es una plataforma de gestión de reservas creada para ayudar a los dueños de restaurantes a simplificar el proceso de reserva y aumentar su ocupación de forma organizada. Con una interfaz fácil de usar y adaptada a cualquier dispositivo, HaceTuReserva se integra perfectamente al día a día de los restaurantes, permitiendo que tanto pequeños cafés como grandes locales optimicen su gestión sin necesidad de invertir en sistemas complejos o <strong>demasiado costosos</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u33JZIaQQlp2ndRqgRRtsw.png" /></figure><h3>Principales beneficios de HaceTuReserva</h3><ol><li><strong>Optimización del Espacio y del Tiempo</strong>: HaceTuReserva permite organizar las mesas de forma óptima, evitando problemas como la doble reserva o el desorden en los horarios. Esto permite a los restaurantes recibir más comensales sin estrés y mejorar la satisfacción del cliente.</li><li><strong>Reducción de Cancelaciones de Último Minuto</strong>: Uno de los mayores problemas en el sector gastronómico son las cancelaciones de último momento. HaceTuReserva ayuda a los administradores a gestionar y confirmar las reservas, minimizando estos inconvenientes.</li><li><strong>Gestión Integral y Sencilla</strong>: Todo lo que un restaurante necesita para gestionar sus reservas se encuentra en una sola plataforma. Desde el control de mesas hasta la organización de turnos y notificaciones, HaceTuReserva integra funcionalidades que simplifican el trabajo administrativo y ahorran tiempo al personal del local.</li><li><strong>Adaptado al Mercado Argentino</strong>: HaceTuReserva ha sido diseñado pensando en los desafíos y necesidades específicas de los restaurantes argentinos. Con un modelo de suscripción accesible y una atención al cliente cercana, es una herramienta creada para potenciar la gastronomía local.</li></ol><h3>Facilidad de Uso y Flexibilidad</h3><p>HaceTuReserva está pensado para ser fácil de implementar y utilizar, incluso para quienes no tienen experiencia con tecnología. Al ser accesible desde cualquier dispositivo con conexión a internet, los administradores pueden gestionar el sistema desde su computadora o smartphone. Además, la plataforma permite realizar modificaciones en las reservas y recibir notificaciones automáticas, garantizando una operación sin interrupciones.</p><h3>Plan de Suscripción: Accesible y Sin Complicaciones</h3><p>HaceTuReserva ofrece un plan de suscripción mensual que simplifica el proceso de contratación, sin atarse a largos contratos o complicadas condiciones. La suscripción puede gestionarse directamente a través de Mercado Pago o Paypal, asegurando un método de pago seguro y confiable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/487/1*t9n6TeSmHcjejBj8qz0_Bg.png" /></figure><h3>Un Apoyo Constante para los Restaurantes</h3><p>Además de la funcionalidad de la plataforma, HaceTuReserva proporciona atención personalizada para resolver dudas y mejorar continuamente la experiencia del cliente. La plataforma sigue evolucionando y adaptándose para satisfacer las cambiantes necesidades del mercado gastronómico.</p><h3>Conclusión</h3><p>HaceTuReserva es más que un simple sistema de reservas; es una herramienta para potenciar y profesionalizar la gestión de cualquier restaurante en Argentina. Su facilidad de uso, enfoque en el cliente local y beneficios tangibles hacen de HaceTuReserva una opción ideal para aquellos que buscan optimizar su negocio y asegurar una ocupación constante.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a2a3f108b547" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Are you Data Analyst or Scientist and hate writing SQL?]]></title>
            <link>https://medium.com/@nachokhan/are-you-data-analyst-or-scientist-and-hate-writing-sql-694d08ac8092?source=rss-3c8849aef2c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/694d08ac8092</guid>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[scientist]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[chatgpt]]></category>
            <dc:creator><![CDATA[Ignacio Rigoni]]></dc:creator>
            <pubDate>Thu, 18 Jul 2024 12:42:03 GMT</pubDate>
            <atom:updated>2024-07-18T12:42:03.410Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JrvrKOXYS4EqZvoOpDNbyQ.png" /></figure><h3>Links</h3><p>Github Repository: <a href="https://github.com/nachokhan/ask-my-db">https://github.com/nachokhan/ask-my-db</a></p><h3>Introduction</h3><p>In today’s data-driven world, data analysts and scientists play a crucial role in transforming raw data into valuable insights. However, querying complex databases can often be a challenging and time-consuming task. This is where “Ask My DB” comes in — a tool designed to facilitate the creation and execution of SQL queries using artificial intelligence, specifically tailored for data analysts and scientists.</p><h3>What is “Ask My DB”?</h3><p>“Ask My DB” is an innovative solution that allows users to efficiently and accurately generate SQL queries using OpenAI’s GPT-4 technology. The tool integrates seamlessly with PostgreSQL databases and can interpret the database schema to generate appropriate SQL queries in response to user requests. This functionality is particularly valuable for data analysts and scientists who deal with large and complex datasets.</p><h3>How to Use “Ask My DB”</h3><ol><li><strong>Preparation</strong>: Clone the repository and navigate to the project directory.</li></ol><pre>git clone https://github.com/nachokhan/ask-my-db<br>cd ask-my-db</pre><p><strong>2. Installing Dependencies</strong>: Ensure you have pip and Docker installed. Then, install the project dependencies.</p><pre>pip install -r requirements.txt  </pre><p><strong>3. Configuration</strong>: Create a .env file in the .conf folder based on .env.template and fill in the necessary environment variables (PostgreSQL credentials and OpenAI API key).</p><p><strong>4. Running with Docker</strong>: Use Docker to set up the environment.</p><blockquote>This is an optional step, you can configure the .env file to point your own database</blockquote><pre>docker-compose up -d</pre><p><strong>5. Using the Tool</strong>: You can modify and run the main.py script to see examples of how to perform queries.</p><pre>python src/main.py</pre><h3>Advantages of “Ask My DB” for Data Analysts and Scientists</h3><ol><li><strong>Ease of Use</strong>: “Ask My DB” allows you to generate SQL queries without needing to know the intricate details of the database schema, making the process much more accessible and efficient.</li><li><strong>AI Integration</strong>: Integration with GPT-4 enables the tool to interpret natural language requests and translate them into precise SQL queries. This reduces the time spent on writing complex queries and minimizes the risk of errors.</li><li><strong>Handling Complex Queries</strong>: The tool is especially useful when dealing with complex database schemas, where writing queries manually can be error-prone and time-consuming. “Ask My DB” simplifies this process, allowing you to focus on analyzing the results.</li><li><strong>CSV Results</strong>: Query results are automatically converted to CSV format, facilitating further analysis and easy sharing of data.</li></ol><h3>Conclusion</h3><p>“Ask My DB” is a powerful tool that combines artificial intelligence with database management, providing an efficient solution for generating and executing SQL queries. Its well-defined structure and ability to handle complex schemas make it a valuable addition for data analysts and scientists who need to extract insights from large datasets.</p><p>If you are looking to improve the efficiency of your SQL queries and leverage the power of artificial intelligence, “Ask My DB” is the tool you need. By simplifying the query generation process, it allows you to focus on what truly matters — analyzing and interpreting your data to drive impactful insights.</p><h3>Invitation for Collaboration</h3><p>This project is an initial prototype, and there is still much room for improvement. As an open-source project:</p><ul><li>Constructive criticism is welcomed, and you are invited to participate and help it grow.</li><li>Currently, it connects only to PostgreSQL databases, but it can be extended to support others with minimal effort.</li><li>While it currently uses ChatGPT, it can be adapted to accept other large language models (LLMs) for greater versatility.</li><li>I am aware that similar projects exist, but this one is my own creation, and I wanted to share it with the community.</li><li>Always remember that LLMs can generate errors, and a significant part of the user’s responsibility is not only to write good prompts but also to review the solutions.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=694d08ac8092" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[25 years later: AI remake of the game I programmed at 15 and lost in a sibling’s argument.]]></title>
            <link>https://medium.com/@nachokhan/25-years-later-ai-remake-of-the-game-i-programmed-at-15-and-lost-in-a-siblings-argument-89a73d76f8c9?source=rss-3c8849aef2c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/89a73d76f8c9</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[games]]></category>
            <category><![CDATA[game-development]]></category>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Ignacio Rigoni]]></dc:creator>
            <pubDate>Mon, 26 Feb 2024 19:49:56 GMT</pubDate>
            <atom:updated>2024-02-26T19:49:56.867Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w6X3MaATnL3KUBGsVbMgRg.png" /></figure><p>Once upon a time, in middle-size town of Argentina, where computers relied on floppy disks and the internet was still in its infancy, I had a grand idea. I was 15, I was learning C++ and basic assembler and I wanted to create a unique puzzle game — a world where players could immerse themselves in the adventures of a charming little frog named Froggy. With determination coursing through my veins and a keen grasp of computer skills and a low-to-none object oriented programming knowledge, I began crafting the game, piece by piece. Pixel by pixel.</p><p>But then tragedy struck. In those days, there were no clouds to store our creations, no GitHub repositories to safeguard our work. It was just me and my brother, both navigating the tumultuous waters of sibling rivalry. One day, amidst an argument about who knows what (for the life of me, I can’t recall), tempers flared, and in a fit of anger, my brother deleted the entire game. No “cpp” nor “h” file was left. Froggy and the vibrant world we had built together vanished without a trace. It felt as though all my hard work and passion had been wiped away in an instant. That was the last time I put my hands on game programming.</p><p>Twenty-five long years passed, and yet the memory of Froggy’s world haunted me still. Determined to right the wrongs of the past, I made the decision to embark on the journey once more. This time, I had a new companion by my side — a helpful AI named whose name I’m not going to say. Together, we ventured into the realm of Python, a different computer language, to breathe life back into Froggy’s world. It was as if we were resurrecting something from the void, piecing together fragments of memories and lines of code to rebuild what was lost.</p><p>As we toiled away, memories flooded back — the excitement of creation, the joy of seeing Froggy’s world come to life. It wasn’t just about making a game; it was about the connections forged and the happiness shared. And now, with Froggy’s world taking shape once more, I felt compelled to share that joy with others.</p><p>So, to all who seek adventure and camaraderie, I extend an invitation: join us on this journey through puzzles and friendly encounters. Welcome back to Froggy’s world, where the magic of creation knows no bounds, and where anything is possible.</p><p>If you want to play, take a look at the code, fork it, make levels, make a level editor or whatever, feel free to do it:</p><p>Github Repo: <a href="https://github.com/nachokhan/froggys_adventure_game">Froggy’s Adventure Game Remake</a></p><p>Thanks for the psico-session! 🙂</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=89a73d76f8c9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Can a game be created in ChatGPT without errors?]]></title>
            <link>https://medium.com/@nachokhan/can-a-game-be-created-in-chatgpt-without-errors-016c782c409b?source=rss-3c8849aef2c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/016c782c409b</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[software]]></category>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[game-development]]></category>
            <dc:creator><![CDATA[Ignacio Rigoni]]></dc:creator>
            <pubDate>Sun, 25 Feb 2024 16:39:44 GMT</pubDate>
            <atom:updated>2024-02-25T16:39:44.610Z</atom:updated>
            <content:encoded><![CDATA[<p>I’m sure if you’re a programmer you’ve already failed trying to ask ChatGPT to make a software project for you. We all go through the same and it seems that it can only do well with algorithms that it “already knows”. Do you think it’s possible for ChatGPT to really save you work on this? The answer could change the way you program…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_x-MaaueHsBVStJCR9vBjA.png" /></figure><h3>It’s all about prompts.</h3><p>That simple. Were you expecting magic? No. Just as we need to be super specific when writing instructions in a programming language to create an algorithm, we need to be super precise with the prompts we’re going to give to ChatGPT. Let’s suppose we want to create a game where the objective is to answer multiple-choice questions of three types: about computers, about music, and about nature. And upon answering 9 questions correctly, the game ends successfully. Failing 2 in a row results in losing the game. A possible prompt could be, beforehand:</p><pre>I want to create a multiple choice question and answer game of three different types: computing, nature, music.<br>If the user answers 3 questions correctly, they win. If they answer 2 in a row incorrectly, they lose. <br>The questions and their possible answers must be sourced from the internet. Pick up 10. <br>The game should be in Python. Give the whole code in a zip file, please, no explanations. Just the file.</pre><p>This will not effectively result in a <a href="https://github.com/nachokhan/gpt-prompting-tests/tree/main/game_prompt_1">game developed in Python</a> that probably works. The question is how good it will be in terms of software quality. Is its architecture good? Is it scalable? Is it designed with object orientation? Are the questions within the code or are they separate data files in an easily readable/modifiable format like JSON?</p><p>Most likely, if not all, the answers will disappoint us because without providing more specific information, ChatGPT will limit itself to doing the bare minimum to solve the problem.</p><blockquote>Just as humans are governed by the law of least effort, ChatGPT is governed by the law of least prompting.</blockquote><h3>Details, details, and more details!</h3><p>Now let’s expend a few more neurons to improve the previous prompt. Let’s think more about details and put our developer hat on. This could be an enhanced version:</p><pre>I need a game made in Python.<br>The game consists of a JSON file with 15 multiple-choice questions and answers that you will search for on the internet.<br>The game will run in game.py.<br>The game starts by asking the player&#39;s name.<br>Then we enter a loop of random questions obtained from the group of questions.<br>If the player answers 2 questions incorrectly in a row, they lose the game.<br>If the player answers 5 questions correctly (even if not consecutive), they win the game.<br>If they win, they will be shown a congratulatory message.<br>Whether they win or lose, the player&#39;s response statistics must be displayed.<br>Finally, you will update a JSON file called &quot;history.json&quot; with the player&#39;s data, response statistics, and the date and time they played.<br>You will define the format of &quot;history.json&quot; based on the provided data.<br>The game must be clearly programmed and follow good programming practices.<br>If you consider it necessary to separate into methods to make it more readable and maintainable, do so.<br><br>Give the whole project in a zip file, no explanations. Just the file.</pre><p><a href="https://github.com/nachokhan/gpt-prompting-tests/tree/main/game_prompt_2">This version</a> significantly changes things. Obviously, we had to invest a bit more morning energy into thinking, but this meant ChatGPT could be more organized. This version of the game has been greatly improved, and we even asked for some extra features, like keeping a game history. Lovely, isn’t it?</p><h3>Can it be even better?</h3><p>What kind of question is that? Of course, it can be improved!</p><p>Both for ourselves and for the computer. Let’s look at two different types of improvements.</p><ol><li><strong>Improving the prompt for humans.</strong></li></ol><p>If we’re going to write a long and complex prompt because our project requires it, it wouldn’t hurt if we could reread and modify it if necessary, and for this, it would be good if we could understand it. A simple improvement is to divide it into sections or tags that are clearer to us. In this case, we use 5: <em>Business Rules, Technical Aspects, Data Management, User Interface Design, Software Engineering Practices</em>.</p><pre>Business Rules:<br>- The game consists of a JSON file with 15 multiple-choice questions and answers.<br>- The game starts by asking the player&#39;s name.<br>- Random questions are presented from a group of questions.<br>- If the player answers 2 questions incorrectly in a row, they lose the game.<br>- If the player answers 5 questions correctly (even if not consecutive), they win the game.<br>- If they win, a congratulatory message is shown.<br>- Display of the player&#39;s response statistics after winning or losing.<br><br>Technical Aspects:<br>- The game will run in game.py.<br>- Use of Python for game development.<br>- Updating a JSON file called &quot;history.json&quot; with player data, response statistics, and the date and time they played.<br><br>Data Management:<br>The format and structure of the JSON file for questions.<br>Defining the format of &quot;history.json&quot; based on provided data.<br>Management and storage of player&#39;s response statistics.<br><br>User Interface Design:<br>- Interaction design for asking the player&#39;s name.<br>- Presentation of questions and answer options to the player.<br>- Displaying the congratulatory message and response statistics.<br><br>Software Engineering Practices:<br>- The game must be clearly programmed and follow good programming practices.<br>- Consideration for separating the game into methods for readability and maintainability.</pre><p>Of course, you can use the tags that best fit your project and its complexity, but these are fairly generic and simple examples to follow.</p><blockquote>You can even save yourself the trouble of classifying them yourself by giving ChatGPT the “raw” list of prompt items and asking it to classify those items according to the list of tags (which you must also provide).</blockquote><p><strong>2. Improvement through ChatGPT Abuse</strong></p><p>If we already have ChatGPT and use it to program for us, what’s stopping us from asking it to improve our prompt as well? This is known as <em>pre-prompting</em>.</p><p>For example, we can ask our friend the following:</p><pre>Given this prompt that represents the requirements for a project that ChatGPT must solve I need you to enhance it as much as possible. Please keep the items-form.<br><br>&quot;I need a game made in Python.<br>The game consists of a JSON file with 15 multiple-choice questions and answers that you will search for on the internet.<br>The game will run in game.py.<br>The game starts by asking the player&#39;s name.<br>Then we enter a loop of random questions obtained from the group of questions.<br>If the player answers 2 questions incorrectly in a row, they lose the game.<br>If the player answers 5 questions correctly (even if not consecutive), they win the game.<br>If they win, they will be shown a congratulatory message.<br>Whether they win or lose, the player&#39;s response statistics must be displayed.<br>Finally, you will update a JSON file called &quot;history.json&quot; with the player&#39;s data, response statistics, and the date and time they played.<br>You will define the format of &quot;history.json&quot; based on the provided data.<br>The game must be clearly programmed and follow good programming practices.<br>If you consider it necessary to separate into methods to make it more readable and maintainable, do so.<br><br>Give the whole project in a zip file, no explanations. Just the file.&quot;</pre><p>This gives us a new, supposedly <a href="https://github.com/nachokhan/gpt-prompting-tests/tree/main/game_prompt_3">improved prompt</a>, which we can pass to ChatGPT to create the game. You can find the pre-prompt, improved prompt, and the game in this part of the repo.</p><blockquote><strong>TIP</strong>: We should <strong>always</strong> check the results provided by ChatGPT to ensure that it hasn’t changed or misinterpreted any of the requirements.</blockquote><h3>State of my art</h3><p>This way of developing projects has generally yielded very good results for me. Although I don’t specialize in game programming and this was just a fun example to keep the reading from becoming too tedious, I am using it in personal projects. Currently, I use ChatGPT together with <a href="https://github.com/nachokhan/pstruc">PStruc</a> to develop and improve projects, whether it’s fixing errors, adding documentation, implementing simple features, or automating parts that are cumbersome for humans to perform. In this <a href="https://medium.com/@nachokhan/optimizing-python-projects-with-chatgpt-and-pstruc-a-case-study-7d8f4ea8e6d4">link</a>, I explain how you can do it too.</p><h3>Community Improvements:</h3><p>If you’ve read this far and have any suggestions that could help improve this article or how to enhance prompting, leave them in the comments, and I’ll open a new section to incorporate those that are relevant.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=016c782c409b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ChatGPT meets PStruc to enhance software Projects]]></title>
            <link>https://medium.com/@nachokhan/optimizing-python-projects-with-chatgpt-and-pstruc-a-case-study-7d8f4ea8e6d4?source=rss-3c8849aef2c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/7d8f4ea8e6d4</guid>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Ignacio Rigoni]]></dc:creator>
            <pubDate>Mon, 19 Feb 2024 16:21:01 GMT</pubDate>
            <atom:updated>2024-02-25T16:38:33.382Z</atom:updated>
            <content:encoded><![CDATA[<p>Let’s dive into an simple example-project that exemplifies the synergy between software development and the prowess of Large Language Models (LLMs) like <em>ChatGPT</em>. This exploration centers around the <a href="https://github.com/nachokhan/pstruc_example"><em>pstruc_example</em></a> repository, a Python-based endeavor that showcases the use of the <a href="https://github.com/nachokhan/pstruc"><em>PStruc</em></a> library in tandem with LLMs to optimize its own structure and code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DVPzhk6E0YquK1hqD9UYWQ.png" /></figure><h3>Overview of PStruc Library</h3><p><strong><em>PStruc</em></strong> is a Python library designed to streamline project structures. In our example, <em>PStruc</em> is employed to generate a <em>JSON/YAML/plain text</em> file depicting the project’s architecture and content, providing a clear blueprint for analysis and enhancement.</p><p>For example, considering a simple project snapshot like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*LsMLlBlzgj0-GBv3NLACDw.png" /></figure><p>Running <em>PStruc</em> on it will give us this <em>JSON</em> file containing the whole project:</p><pre>{<br>    &quot;.&quot;: {<br>        &quot;requirements.txt&quot;: &quot;colorama==0.4.6\npstruc==0.3.1\nPyYAML==6.0.1\n&quot;,<br>        &quot;README.md&quot;: &quot;# PStruc Example Project\n\nThis project demonstrates the PStruc library usage for enhancing a project with ChatGPT&#39;s assistance. PStruc creates a `pstruc_example.yaml` file, which, along with specific questions, is provided to ChatGPT. The insights or enhancements suggested by ChatGPT are then used to modify the code.\n\nThe project is split into three versions, each representing a stage of development:\n\n- `version_1`: Initial version with potential code issues and missing elements.\n- `version_2`: Revised code based on ChatGPT&#39;s suggestions, improved to adhere to PEP8 guidelines.\n- `version_3`: Further enhancements and feature additions proposed by ChatGPT.\n\nEach version folder contains the project files and a `readme.md` file, detailing the ChatGPT interactions and suggested modifications. The `readme.md` in `version_1` is empty as it&#39;s the starting point.\n\n*Note*: Setting up and running the project is optional and mainly for experimentation with ChatGPT enhancements.\n\n## Setup Instructions\n\n### 1. Clone the repository.\n\n```\ngit clone https://github.com/nachokhan/pstruc_example.git\n```\n\n### 2. Create and activate the virtual environment:\n\n```\npython -m venv .env\nsource .env/bin/activate\n```\n\n### 3. Install dependecies.\n\n```\npip install -r requirements.txt\n```\n\n### 4. Run the code \n```\npython main.py\n```\n\n## USing PStruc\nRun the following command to generate the project structure:\n\n```\npstruc -ip \&quot;.env\&quot;,\&quot;.git\&quot;,\&quot;*pycache*\&quot;,\&quot;*.yml\&quot;,\&quot;version_*\&quot;,\&quot;readme.md\&quot; -fc \&quot;*.py\&quot; -o pstruc_example -f yaml\n```\n\n### Argument Explanation\n- **-ip**: Ignores specified patterns like `.env`, `.git`, `*pycache*`, `*.yml`, `version_*`, and `readme.md`.\n- **-fc**: Includes the content of Python files (`*.py`).\n- **-o**: Sets the output file&#39;s name as `pstruc_example.yaml`.\n- **-f**: Chooses YAML as the output format.\n\nThe command generates a `pstruc_example.yaml` file, representing the project&#39;s structure, including Python files&#39; content while excluding the defined patterns.\n\n\n\n&quot;,<br>        &quot;.gitignore&quot;: &quot;.env\n*.yaml\n__pycache__&quot;,<br>        &quot;main.py&quot;: &quot;from moduleA.person import Person\nfrom moduleB.pet import Pet\n\nif __name__ == \&quot;__main__\&quot;:\n\n    juancito = Person(\&quot;Juancito\&quot;, 67)\n    juancito_pet = Pet(\&quot;Rocky\&quot;, 10)\n    juancito.set_pet(juancito_pet)\n\n    mayra = Person(\&quot;Mayra\&quot;, 20)\n    mayra_pet = Pet(\&quot;Cuchuflo\&quot;, 4)\n    mayra.set_pet(mayra_pet)\n\n    juancito.print_person_data()\n    mayra.print_person_data()\n&quot;<br>    },<br>    &quot;moduleB&quot;: {<br>        &quot;pet.py&quot;: &quot;class Pet:\n\n    def __init__(self, pet_name: str, pet_age: int):\n        self.name = pet_name\n        self.age = pet_age\n\n    def print_pet_info(self):\n        print(f\&quot;This pet&#39;s name is {self.name} and it is {self.age} years old.\&quot;)\n\n    def change_pet_age(self, new_age):\n        self.age = new_age\n\n    def change_pet_name(self, new_name):\n        self.name = new_name\n&quot;<br>    },<br>    &quot;moduleA&quot;: {<br>        &quot;person.py&quot;: &quot;from moduleB.pet import Pet\n\n\nclass Person:\n    def __init__(self, name, age):\n        self.name = name\n        self.age = age\n        self.pet = None\n\n    def print_person_data(self):\n        print(f\&quot;This person is called {self.name} and is {self.age} years old.\&quot;)\n        if self.pet:\n            self.pet.print_pet_info()  # Calling print_pet_info of Pet class\n\n    def change_age(self, new_age):\n        self.age = new_age\n\n    def change_name(self, new_name):\n        self.name = new_name\n\n    def set_pet(self, pet: Pet):\n        self.pet = pet\n&quot;<br>    }<br>}</pre><p>And now we have the whole project in the form of a JSON file.</p><h3>Merging PStruc together with ChatGPT</h3><p>I’m pretty sure I don’t need to explain what is <em>ChatGPT</em> and how it works. So jump into how do we combine these tools. We will use <em>PStruc</em> to create a structured representation of the project, which is then enhanced through <em>ChatGPT’s</em> insights.</p><p>The process begins by generating a <em>YAML</em> or <em>JSON</em> file (in this case pstruc_example.yaml) file using <em>PStruc</em>, effectively mapping the project&#39;s structure and content including the content of <em>Python</em> and <em>YAML</em> files. We can choose which files’s content to insert based on our goals.</p><p>This structured data is then provided to <em>ChatGPT</em> together with a<em> prompt</em>, which analyzes it to offer suggestions for improvements, optimizations, etc. <em>ChatGPT&#39;s</em> role is to identify potential issues, suggest code enhancements, and propose new features, transforming the project across its different versions.</p><p>This collaboration exemplifies the integration of automated structural analysis with AI-driven code optimization, fostering a more efficient and innovative development process.</p><h3>Example’s Structure and its Versions</h3><p>This example project is fundamentally divided into three distinct versions (in separate ‘<em>version’</em> folders), each representing a significant phase in its development. The initial version, while operational, contains potential issues and is missing certain elements. Progressing through the versions, we observe the significant impact of LLMs. In the repository, each ‘version’ folder displays the state of the project prior to implementing ChatGPT’s proposed changes, which are then incorporated in the subsequent version.</p><h3>What is the project’s code about?</h3><p>The code primarily revolves around two Python classes: Person and Pet. These classes are contained in separate modules, moduleA and moduleB, respectively. The Person class includes methods for initializing person objects, printing their data, changing their name and age, and setting their pet. The Pet class, on the other hand, is designed to initialize pet objects, with methods to change their name and age, and a placeholder for printing pet information. The main.py script demonstrates the creation of Person and Pet objects and showcases their interaction. This setup forms a simple model representing the relationship between people and their pets.</p><h3><strong>From Version 1 to Version 2:</strong> Missing code and PEP8 compliance.</h3><p>Version 1 serves as our baseline. It includes the fundamental code with classes Person and Pet in separate modules, modeling a simple relationship between people and their pets.</p><p>To move on to our next version, we take the snapshot of our project running the following command:</p><pre>pstruc . -f json -igi -ip &quot;.git&quot;,&quot;requirements.txt&quot; -o output -fc &quot;*.py&quot;</pre><blockquote>Note: we are instructing pstruc to ignore all patterns specified in .gitignore, exclude the .git folder and the requirements.txt file, and include only the content of .py files.</blockquote><p>This give us the following output file:</p><pre>{<br>    &quot;.&quot;: {<br>        &quot;readme.md&quot;: null,<br>        &quot;main.py&quot;: &quot;from moduleA.person import Person\nfrom moduleB.pet import Pet\n\n\nif __name__ == \&quot;__main__\&quot;:\n\n    juancito = Person(\&quot;Juancito\&quot;, 67)\n    juancito_pet = Pet(\&quot;Rocky\&quot;, 10)\n\n    mayra = Person(\&quot;Mayra\&quot;, 20)\n    mayra_pet = Pet(\&quot;Cuchuflo\&quot;, 4)\n\n    juancito.print_person_data()\n    mayra.print_person_data()\n&quot;<br>    },<br>    &quot;moduleB&quot;: {<br>        &quot;pet.py&quot;: &quot;class Pet():\n\n    def __init__(self, petName: str, perAge: str) -&gt; None:\n        self.name = petName\n        self.age = perAge\n\n    def print_pet_info(self):\n        #\u00a0TODO\n\n    def change_pet_age(self, newAge):\n        #\u00a0TODO\n\n    def change_pet_name(self, newName):\n        # TODO\n&quot;<br>    },<br>    &quot;moduleA&quot;: {<br>        &quot;person.py&quot;: &quot;from moduleB.pet import Pet\n\n\nclass Person():\n    def __init__(self, name, age) -&gt; None:\n        self.name = name\n        self.age = age\n        self.pet = None\n\n    def print_person_data(self):\n        print(f\&quot;This person is called {self.name} and it&#39;s {self.age} years old.\&quot;)\n        if self.pet:\n            print(f\&quot;This person has a pet!: {self.pet.print_pet_info()}\&quot;)\n\n    def change_age(self, new_age):\n        self.age = new_age\n\n    def change_name(self, newName):\n        self.name = newName\n\n    def set_Pet(self, pet: Pet):\n        self.pet = pet\n&quot;<br>    }<br>}</pre><p>And finally we give it to <em>ChatGPT</em> together with the following prompt:</p><pre>Considering this project in JSON format, I need you to complete the missing parts and adjust the project to the PEP8 style guide:<br><br>```<br>[Content of JSON structure file goes here]<br>```</pre><p>After executing this prompt in <em>ChatGPT</em>, we get the answer from the LLM (which you can see with full details in the corresponding <a href="https://github.com/nachokhan/pstruc_example/tree/main/version_2#readme">README.md file</a> in the repository). Let’s summarize the recommended modifications here:</p><p>These are the modifications proposed for <em>person.py:</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kMm1YcoiV_3f6JcO50xc-g.png" /></figure><p>These are the modifications proposed for <em>pet.py:</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fP41HF7dOR5wpt0S8nFI8Q.png" /></figure><p>As we can see, ChatGPT completed the missing parts (<em>#TODOs</em>) and proposed changes to meet PEP8 compliance.</p><h3>From Version 2to Version 3: Feature Addition</h3><p>This iteration involves a more complex task. It consist in asking ChatGPT ChatGPT to not only modify existing code but also to understand and integrate it with other files.</p><p>We will run the same <em>pstruc</em> command as before to get the new snapshot with the above showed modifications and pass them to ChatGPT together with a new prompt:</p><pre>Considering the following project structure,  I would need some way of showing the pet&#39;s info when the person&#39;s info is being shown<br><br>```<br>[Content of JSON structure file goes here]<br>```</pre><p><em>ChatGPT</em> need to understand not only the <em>Person</em> class to see which method to modify but also de <em>Pet</em> class to know how to call the methods inside it.</p><p>You can see the whole answer of ChatGPT in this other <a href="https://github.com/nachokhan/pstruc_example/blob/main/version_3/readme.md">README.md file</a>, but again I’ll show you the proposed changes.</p><p>Changes proposed for <em>main.py:</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4dKL75LjH5kVz-klB3zguQ.png" /></figure><p>Changes proposed for <em>person.py:</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PJnduS8k6wcqPFkcb0PmIA.png" /></figure><p>This process illustrates a deeper level of interaction between the LLM and the evolving codebase, showcasing the dynamic capabilities of ChatGPT in understanding and improving complex software projects.</p><h3>LLM’s Role in Project Optimization</h3><p>Throughout each version, LLMs like ChatGPT play a pivotal role. From identifying areas for improvement to suggesting specific code enhancements, these models act as virtual collaborators, bringing a new dimension to the development process.</p><h3>Conclusion</h3><p>As we wrap up our exploration, it’s evident that the integration of LLMs in software development is not just a possibility but a practical and beneficial reality. Projects like “pstruc_example” are testaments to the potential of such collaborations, paving the way for more efficient, effective, and innovative software development practices.</p><p>The fusion of PStruc and LLMs in this project is a vivid example of how technology is evolving, making the process of coding more accessible and robust. This blend of automation and human-like understanding from LLMs opens new horizons for developers and the tech community at large.</p><h3>Links</h3><p><a href="https://github.com/nachokhan/pstruc_example">This Example’s repository</a><br><a href="https://github.com/nachokhan/pstruc">PStruc Repository</a><br><a href="https://medium.com/p/fd7aaee7ed21">Simplifying Software Project Visualization for Analysis</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7d8f4ea8e6d4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Simplifying Software Project Visualization for Analysis]]></title>
            <link>https://medium.com/@nachokhan/exploring-pstruc-simplifying-software-project-visualization-made-easy-fd7aaee7ed21?source=rss-3c8849aef2c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/fd7aaee7ed21</guid>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[projects]]></category>
            <category><![CDATA[tools]]></category>
            <dc:creator><![CDATA[Ignacio Rigoni]]></dc:creator>
            <pubDate>Fri, 16 Feb 2024 04:17:19 GMT</pubDate>
            <atom:updated>2024-02-16T18:15:58.550Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>Have you ever wished you could take a snapshot of your project for analysis? There are several tools available for this purpose, such as Dir2Json, FileTreePrinter, and the Unix/Linux tree command, all of which provide a view of your project’s folder structure. However, I noticed a missing feature that I needed: the ability to ignore certain file patterns (similar to what .gitignore does) and to include the content of some files in the snapshot of the structure. This led me to create &#39;PStruc&#39; (Project Structure).</p><p><a href="https://github.com/nachokhan/pstruc">Github Link</a></p><p>In the world of software development, managing and understanding the structure of your project directories is crucial. Here’s where PStruc shines - a versatile tool for generating, customizing, and visualizing directory structures. This article dives into the workings of PStruc, showcasing its capabilities through command-line and Python library examples. At the end, I’ll introduce some interesting way of using it with AI alhtough it’s not the purpose of this article.</p><h3>What is PStruc?</h3><p>PStruc is a tool available as both a command-line interface (CLI) and a Python library. It allows users to generate directory structures in formats like JSON, YAML, or plain text. Its features include the ability to <strong>exclude</strong> certain patterns (akin to .gitignore), <strong>include</strong> the content of specified files, and <strong>pretty-print</strong> the structure with color.</p><p>For this article we are going to assume that we have a small python project as follows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/678/1*2bNUnshoCwvj664o1IgXFw.png" /></figure><blockquote>Note: This example works with a “python” project, but it could be whatever language the reader prefers.</blockquote><h3>Command-Line Usage</h3><h3>Basic Usage</h3><p>To start using PStruc from the command line, first ensure it&#39;s installed via pip:</p><pre>pip install pstruc</pre><p>Once installed, you can generate a directory structure with a simple command:</p><pre>python pstruc.py /path/to/directory -f json -o output_structure</pre><p>This command generates a JSON representation of the directory structure for /path/to/directory and saves it to output_structure.json.</p><p>Let’s imagine we are already in the directory of the sample project mentioned above. In this case, it won’t be necessary to specify the path since we can replace it with . (a period).</p><pre>pstruc . -f json -o output_structure</pre><p>This will create an <em>output_structure.json</em> file with the structure, but I’m not going to show it here because, if you pay attention, there are two complicated folders that we might want to avoid: .env and data. Both folders might contain thousands of files and folders that we don&#39;t really need now (at least in this case for this example😉).</p><p>We can ignore this folder by using pattern ignore option:</p><p>--add-ignore-patternsor simply -ip</p><p>So let’s run</p><pre>pstruc . -f json -o output_structure -ip &quot;.env&quot;,&quot;data&quot;</pre><p>Now we re-create the <em>output_structure.json</em> file but excluding those tricky folders. This is the content of the json file:</p><pre>{<br>    &quot;.&quot;: {<br>        &quot;output.json&quot;: null,<br>        &quot;docker-compose.yml&quot;: null<br>    },<br>    &quot;api_service&quot;: {<br>        &quot;models.py&quot;: null,<br>        &quot;requirements.txt&quot;: null,<br>        &quot;Dockerfile&quot;: null,<br>        &quot;database.py&quot;: null,<br>        &quot;main.py&quot;: null,<br>        &quot;blueprints&quot;: {<br>            &quot;user.py&quot;: null<br>        }<br>    },<br>    &quot;db_service&quot;: {<br>        &quot;Dockerfile&quot;: null,<br>        &quot;init&quot;: {<br>            &quot;create_tables.sql&quot;: null<br>        }<br>    }<br>}</pre><blockquote>Note: the <strong>null</strong> value just indicates there is no value to show (in this case because we didn’t indicate the opposite).</blockquote><p>This is very nice, but this can be done by many tools. So let’s add something else. Let’s imagine that we want to include the content of some files in this project, say the content of Python files and YAML files. So, let’s add some more options to the script. For this, we are going to use the add file content option:</p><p>--add-content-file-patternsor simply-fc</p><pre>pstruc . -f json -o output_structure -ip &quot;.env&quot;,&quot;data&quot; -fc &quot;.py&quot;,&quot;.yml&quot;</pre><p>This will add the content of the matching pattern files, in this case every <em>python</em> file and every <em>YAML</em> file:</p><pre>{<br>    &quot;.&quot;: {<br>        &quot;output.json&quot;: null,<br>        &quot;docker-compose.yml&quot;: &quot;version: &#39;3.8&#39;\nservices:\n  db_service:\n    build: ./db_service\n    volumes:\n      - ./db_service/data:/var/lib/postgresql/data\n      - ./db_service/init:/docker-entrypoint-initdb.d\n    environment:\n      POSTGRES_DB: flaskdb\n      POSTGRES_USER: user\n      POSTGRES_PASSWORD: password\n    networks:\n      - flask_network\n\n  api_service:\n    build: ./api_service\n    ports:\n      - \&quot;5002:5002\&quot;\n    depends_on:\n      - db_service\n    networks:\n      - flask_network\n\nvolumes:\n  postgres_data:\n\nnetworks:\n  flask_network:\n&quot;<br>    },<br>    &quot;api_service&quot;: {<br>        &quot;models.py&quot;: &quot;\nfrom sqlalchemy import Column, Integer, String\nfrom database import Base\n\n\nclass User(Base):\n    __tablename__ = &#39;users&#39;\n    id = Column(Integer, primary_key=True)\n    name = Column(String(100))\n    email = Column(String(100))\n&quot;,<br>        &quot;requirements.txt&quot;: null,<br>        &quot;Dockerfile&quot;: null,<br>        &quot;database.py&quot;: &quot;from sqlalchemy import create_engine\nfrom sqlalchemy.orm import scoped_session, sessionmaker\nfrom sqlalchemy.ext.declarative import declarative_base\n\n\nengine = create_engine(&#39;postgresql://user:password@db_service/flaskdb&#39;)\ndb_session = scoped_session(sessionmaker(autocommit=False, autoflush=False, bind=engine))\n\nBase = declarative_base()\nBase.query = db_session.query_property()\n\n\ndef init_db():\n    # Import all modules here that might define models so that\n    # they will be registered properly on the metadata. Otherwise\n    # you will have to import them first before calling init_db()\n    import models\n    Base.metadata.create_all(bind=engine)\n&quot;,<br>        &quot;main.py&quot;: &quot;\nfrom flask import Flask\nfrom blueprints.user import user_blueprint\n\napp = Flask(__name__)\napp.register_blueprint(user_blueprint)\n\n\n@app.route(&#39;/&#39;, methods=[&#39;GET&#39;])\ndef lala():\n    return \&quot;HOLIS\&quot;\n\n\nif __name__ == &#39;__main__&#39;:\n    app.run(debug=True)\n&quot;,<br>        &quot;blueprints&quot;: {<br>            &quot;user.py&quot;: &quot;from flask import Blueprint, jsonify, request\nfrom models import User\nfrom database import db_session\nimport random\n\nuser_blueprint = Blueprint(&#39;user_blueprint&#39;, __name__)\n\n\n@user_blueprint.route(&#39;/users/create/&#39;, methods=[&#39;POST&#39;, &#39;GET&#39;])\ndef create_user():\n    # Example logic to create a random user\n    name = f&#39;User{random.randint(100, 999)}&#39;\n    email = f&#39;{name.lower()}@example.com&#39;\n    new_user = User(name=name, email=email)\n    db_session.add(new_user)\n    db_session.commit()\n    return jsonify({\&quot;message\&quot;: \&quot;User created\&quot;, \&quot;user\&quot;: {\&quot;name\&quot;: name, \&quot;email\&quot;: email}}), 201\n\n\n@user_blueprint.route(&#39;/users/&#39;, methods=[&#39;GET&#39;])\ndef get_users():\n    users = User.query.all()\n    return jsonify({\&quot;users\&quot;: [{\&quot;id\&quot;: user.id, \&quot;name\&quot;: user.name, \&quot;email\&quot;: user.email} for user in users]}), 200\n&quot;<br>        }<br>    },<br>    &quot;db_service&quot;: {<br>        &quot;Dockerfile&quot;: null,<br>        &quot;init&quot;: {<br>            &quot;create_tables.sql&quot;: &quot;\nCREATE TABLE IF NOT EXISTS users (\n    id SERIAL PRIMARY KEY,\n    name VARCHAR(100),\n    email VARCHAR(100)\n);\n&quot;<br>        }<br>    }<br>}</pre><p>Now lets sumarize all the possible option that are available for this tool.</p><h3>Advanced Options</h3><p>pstruc offers various arguments for more control:</p><ul><li>-f, --format: Choose the output format (json, yaml, txt, dict).</li><li>-o, --output: Specify the output file name.</li><li>-p, --print: Print the directory structure without saving.</li><li>-ip, --add-ignore-patterns: Add custom patterns to ignore (like *.log or __pycache__).</li><li>-iff, --ignore-from-files: List of files to get the ignore patterns from.</li><li>-igi, --ignore-git-ignore: Ignore the patterns inside .gitignore file.</li><li>-fc, --add-content-file-patterns: Include the content of specified files (like *.md or *.txt).</li><li>-ns, --not-save: Do not save the generated structure to an output file.</li></ul><h3>Using PStruc as a Python Library</h3><p>After installing PStruc, you can use it in your Python scripts:</p><pre>from pstruc import get_project_structure, save_structure_to_file, pretty_print<br><br># Generate directory structure<br>structure = get_project_structure(&#39;/path/to/directory&#39;, &#39;json&#39;, ignore_patterns=[&quot;*.log&quot;, &quot;__pycache__&quot;], file_content=[&quot;*.md&quot;, &quot;*.txt&quot;])<br><br># Save to a file<br>save_structure_to_file(&#39;output_structure.json&#39;, structure)<br><br># Pretty-print the structure<br>pretty_print(structure)</pre><p>This script does the same as the advanced command-line example but in a Pythonic way.</p><h3>Customizing Output</h3><p>The get_project_structure function is highly customizable. You can specify the start path, output format, patterns to ignore, and file content to include.</p><h3>Why Should You Care About This Tool?</h3><p>I created this tool driven by curiosity about how modern Large Language Models (LLMs) can assist us in our coding endeavors. The significance of an LLM extends beyond understanding individual code snippets; it lies in grasping the entirety of a project. When an LLM is equipped with comprehensive project context, its capacity to perform tasks effectively skyrockets. It gains the ability to comprehend overarching project guidelines, decipher folder structures, and potentially generate more pertinent content for files, among other things. Currently, the only constraints I can foresee are the inherent limitations of the LLMs themselves.</p><p>Imagine the potential of integrating this tool with an LLM like ChatGPT-4 through its API. Such an amalgamation could revolutionize our efficiency in project management. It’s not just about the individual tools but the synergy they create when combined. This integration would allow for a more nuanced and holistic approach to project development, opening up new horizons in how we interact with and utilize AI in coding.</p><p>I’m aware that there are existing projects with similar functionalities, but <em>PStruc</em> stands out as a versatile tool applicable to a wide range of projects, not just limited to software development. Its simplicity and adaptability make it a valuable asset for various types of project structures. While there are some current limitations, the expansive potential of Large Language Models (LLMs) is reason enough to keep a close eye on developments in this field.</p><p>Moreover, I envision <em>PStruc</em> serving purposes beyond what I have initially considered. This adaptability is the essence of a truly useful tool, right? It’s not just about the intended use; it’s about the unforeseen applications that emerge as the tool is embraced by a diverse user base.</p><h3>Conclusion</h3><p><em>PStruc</em> was born out of a vision to empower developers and project managers with a robust tool for visualizing and managing project structures with ease. Bridging the gap between command-line efficiency and Python library flexibility, <em>PStruc</em> is designed to cater to a diverse range of needs, extending its utility beyond the realm of software development.</p><p>As we explore the burgeoning potential of Large Language Models (LLMs), <em>PStruc</em> stands as a testament to the evolving landscape of project management tools — simple in its approach yet expansive in its application. This tool isn’t just a static creation; it’s in a state of continual evolution, growing through new features and improvements, fueled by community contributions and insights.</p><p>Everyone is invited to join this journey, contributing to a project that’s straightforward yet significant. Whether it’s finding new uses, enhancing functionality, or refining its capabilities, your input can help shape <em>PStruc</em> into a tool that not only addresses current project management needs but also anticipates the future dynamics of LLM integration and beyond.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fd7aaee7ed21" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>