<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Fernando Bryan Reza Campos</title>
    <description>The latest articles on DEV Community by Fernando Bryan Reza Campos (@yrrrrrf).</description>
    <link>https://dev.to/yrrrrrf</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3482648%2Fb685cb6f-5159-4746-99dc-f384714bc14d.jpeg</url>
      <title>DEV Community: Fernando Bryan Reza Campos</title>
      <link>https://dev.to/yrrrrrf</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yrrrrrf"/>
    <language>en</language>
    <item>
      <title>Your Database is Your API: Auto-generate a FastAPI Backend in Seconds</title>
      <dc:creator>Fernando Bryan Reza Campos</dc:creator>
      <pubDate>Sat, 06 Sep 2025 00:26:47 +0000</pubDate>
      <link>https://dev.to/yrrrrrf/your-database-is-your-api-auto-generate-a-fastapi-backend-in-seconds-2hip</link>
      <guid>https://dev.to/yrrrrrf/your-database-is-your-api-auto-generate-a-fastapi-backend-in-seconds-2hip</guid>
      <description>&lt;p&gt;&lt;strong&gt;Stop writing boilerplate. Seriously.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Every time you build an API for a database, you repeat the same tedious tasks: define Pydantic models, write CRUD endpoints for each table, manually add validation... it's a soul-crushing time sink that keeps you from building actual features.&lt;/p&gt;

&lt;p&gt;What if your database schema &lt;em&gt;was&lt;/em&gt; your API specification?&lt;/p&gt;

&lt;p&gt;This is the principle behind &lt;strong&gt;&lt;a href="https://github.com/Yrrrrrf/prism-py" rel="noopener noreferrer"&gt;prism-py&lt;/a&gt;&lt;/strong&gt;, a Python library that generates a complete, type-safe, and feature-rich FastAPI backend directly from your database.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Magic: How It Works
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;prism-py&lt;/code&gt; isn't just mapping tables; it's a complete, three-stage architectural process that runs at startup:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Deep Introspection&lt;/strong&gt;: It connects to your database (initially PostgreSQL) and performs a deep query of the system catalogs. It learns everything: tables, views, column types, constraints, enums, and even the exact signatures of your functions and stored procedures.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Dynamic Generation&lt;/strong&gt;: This rich metadata is then used to dynamically generate Pydantic models for type validation and SQLAlchemy models for database interaction. It literally writes the models for you, in memory.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Route Assembly&lt;/strong&gt;: Finally, it constructs a full suite of FastAPI routes for every discovered object, complete with advanced features, and attaches them to your app instance.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The result? An API that is always a perfect mirror of your database schema. Add a column, restart the server, and your API is instantly updated.&lt;/p&gt;

&lt;h3&gt;
  
  
  Production-Ready Features Out-of-the-Box
&lt;/h3&gt;

&lt;p&gt;This isn't just basic CRUD. You get a production-grade API with zero configuration:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Full DB Support&lt;/strong&gt;: Generates endpoints for tables (&lt;code&gt;GET&lt;/code&gt;, &lt;code&gt;POST&lt;/code&gt;, &lt;code&gt;PUT&lt;/code&gt;, &lt;code&gt;DELETE&lt;/code&gt;), views (&lt;code&gt;GET&lt;/code&gt;), functions (&lt;code&gt;POST&lt;/code&gt;), and procedures (&lt;code&gt;POST&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Advanced Filtering&lt;/strong&gt;: Built-in support for complex queries like &lt;code&gt;?age[gte]=18&amp;amp;status[in]=active,pending&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Robust &amp;amp; Type-Safe&lt;/strong&gt;: Enforces type safety based on your schema, including string lengths from &lt;code&gt;VARCHAR(n)&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Composite Key Mastery&lt;/strong&gt;: Flawlessly handles tables with multi-column primary keys—a feature many auto-generators fail at.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Admin Endpoints&lt;/strong&gt;: Includes built-in &lt;code&gt;/health&lt;/code&gt; checks and a &lt;code&gt;/dt/schemas&lt;/code&gt; metadata API for programmatic schema exploration.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Quick Start: 10 Lines to a Full API
&lt;/h3&gt;

&lt;p&gt;Seeing is believing. Install it (&lt;code&gt;pip install prism-py&lt;/code&gt;), create a &lt;code&gt;main.py&lt;/code&gt;, and paste this in:&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
python
# main.py
from fastapi import FastAPI
from prism import ApiPrism, DbClient

# 1. Your FastAPI app
app = FastAPI(title="My Auto-Generated API")

# 2. Point it at your database
db_client = DbClient(db_url="postgresql://user:pass@host/db_name")

# 3. Initialize the generator
api_prism = ApiPrism(db_client=db_client, app=app)

# 4. Generate EVERYTHING
api_prism.generate_all_routes()

# 5. A nice welcome message with a link to the docs
api_prism.print_welcome_message(host="127.0.0.1", port=8000)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>python</category>
      <category>api</category>
      <category>database</category>
      <category>showdev</category>
    </item>
    <item>
      <title>Go from Zero to a Full-Stack, Type-Safe, Cross-Platform App in Seconds</title>
      <dc:creator>Fernando Bryan Reza Campos</dc:creator>
      <pubDate>Sat, 06 Sep 2025 00:00:20 +0000</pubDate>
      <link>https://dev.to/yrrrrrf/go-from-zero-to-a-full-stack-type-safe-cross-platform-app-in-seconds-1c8j</link>
      <guid>https://dev.to/yrrrrrf/go-from-zero-to-a-full-stack-type-safe-cross-platform-app-in-seconds-1c8j</guid>
      <description>&lt;p&gt;I've been working on a project that I'm really excited to share with the dev community! My goal was to create a modern, powerful, and easy-to-use foundation for building full-stack applications that are type-safe from the database all the way to the frontend.&lt;/p&gt;

&lt;p&gt;The result is the &lt;strong&gt;&lt;a href="https://github.com/Yrrrrrf/gwa" rel="noopener noreferrer"&gt;General Web App (GWA)&lt;/a&gt;&lt;/strong&gt;, a comprehensive application template, and its companion tool, &lt;strong&gt;&lt;a href="https://github.com/Yrrrrrf/gwa-create" rel="noopener noreferrer"&gt;&lt;code&gt;gwa-create&lt;/code&gt;&lt;/a&gt;&lt;/strong&gt;, an interactive CLI for scaffolding new projects in seconds.&lt;/p&gt;

&lt;p&gt;If you've ever felt the pain of keeping your backend API and frontend types in sync, or wanted a single codebase that can be deployed to the web, desktop, and mobile, then this might be what you're looking for!&lt;/p&gt;

&lt;h2&gt;
  
  
  ✨ What is General Web App (GWA)?
&lt;/h2&gt;

&lt;p&gt;GWA is a full-stack, production-ready application template built on a modern, high-performance technology stack:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Backend:&lt;/strong&gt; &lt;strong&gt;&lt;a href="https://www.postgresql.org/" rel="noopener noreferrer"&gt;PostgreSQL&lt;/a&gt;&lt;/strong&gt; database with a &lt;strong&gt;&lt;a href="https://www.python.org/" rel="noopener noreferrer"&gt;Python&lt;/a&gt;&lt;/strong&gt; &lt;strong&gt;&lt;a href="https://fastapi.tiangolo.com/" rel="noopener noreferrer"&gt;FastAPI&lt;/a&gt;&lt;/strong&gt; server. The magic here is the use of &lt;a href="https://github.com/Yrrrrrf/prism-py" rel="noopener noreferrer"&gt;&lt;code&gt;prism-py&lt;/code&gt;&lt;/a&gt;, which automatically generates a complete REST API directly from your database schema.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Frontend:&lt;/strong&gt; A blazing-fast &lt;strong&gt;&lt;a href="https://svelte.dev/" rel="noopener noreferrer"&gt;Svelte 5 (with Runes!)&lt;/a&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;a href="https://kit.svelte.dev/" rel="noopener noreferrer"&gt;SvelteKit&lt;/a&gt;&lt;/strong&gt; frontend, powered by the &lt;strong&gt;&lt;a href="https://deno.land/" rel="noopener noreferrer"&gt;Deno&lt;/a&gt;&lt;/strong&gt; runtime instead of &lt;a href="https://nodejs.org/" rel="noopener noreferrer"&gt;Node.js&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;End-to-End Type Safety:&lt;/strong&gt; By combining &lt;a href="https://github.com/Yrrrrrf/prism-py" rel="noopener noreferrer"&gt;&lt;code&gt;prism-py&lt;/code&gt;&lt;/a&gt; on the backend and &lt;a href="https://jsr.io/@yrrrrrf/prism-ts" rel="noopener noreferrer"&gt;&lt;code&gt;prism-ts&lt;/code&gt;&lt;/a&gt; on the frontend, you get a "zero-friction" data pipeline. Your database schema becomes the single source of truth, with types seamlessly propagated to your client application.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Cross-Platform Ready:&lt;/strong&gt; The template comes with &lt;strong&gt;&lt;a href="https://tauri.app/" rel="noopener noreferrer"&gt;Tauri&lt;/a&gt;&lt;/strong&gt; integrated out-of-the-box, allowing you to bundle your SvelteKit application as a native desktop app for Windows, macOS, and Linux using a &lt;strong&gt;&lt;a href="https://www.rust-lang.org/" rel="noopener noreferrer"&gt;Rust&lt;/a&gt;&lt;/strong&gt; backend. There's even a proof-of-concept for Android support!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvcatagz930p7qfsfizn4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvcatagz930p7qfsfizn4.png" alt=" " width="800" height="483"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  🚀 &lt;code&gt;gwa-create&lt;/code&gt;: The Interactive Scaffolder
&lt;/h2&gt;

&lt;p&gt;To make GWA incredibly easy to start with, I built &lt;code&gt;gwa-create&lt;/code&gt;, a command-line tool written in &lt;strong&gt;&lt;a href="https://www.rust-lang.org/" rel="noopener noreferrer"&gt;Rust&lt;/a&gt;&lt;/strong&gt;. Instead of manually cloning a repo and replacing placeholder values, this tool gives you an interactive wizard to configure your new project.&lt;/p&gt;

&lt;p&gt;It guides you through:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Naming your project.&lt;/li&gt;
&lt;li&gt;  Choosing which components to include (Backend, Frontend, or both).&lt;/li&gt;
&lt;li&gt;  Setting up application identifiers for Tauri.&lt;/li&gt;
&lt;li&gt;  Configuring your database credentials.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In seconds, it generates a complete, ready-to-run project structure. For power users and automation scripts, you can also use a &lt;code&gt;--yes&lt;/code&gt; flag to skip the prompts and use sensible defaults.&lt;/p&gt;

&lt;h2&gt;
  
  
  🛠️ Getting Started in 3 Steps
&lt;/h2&gt;

&lt;p&gt;Ready to give it a try?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Install the Scaffolder&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You'll need &lt;strong&gt;&lt;a href="https://www.rust-lang.org/tools/install" rel="noopener noreferrer"&gt;Rust and Cargo&lt;/a&gt;&lt;/strong&gt; installed. Then, simply run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cargo &lt;span class="nb"&gt;install &lt;/span&gt;gwa-create
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2. Create Your New Project&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Run the &lt;code&gt;create&lt;/code&gt; command and follow the interactive prompts:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gwa create my-awesome-app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;3. Run Your Application!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Once the project is generated, &lt;code&gt;cd&lt;/code&gt; into the new directory and follow the instructions in the &lt;code&gt;README.md&lt;/code&gt;. You can typically get the backend and frontend running with just a couple of &lt;strong&gt;&lt;a href="https://www.docker.com/" rel="noopener noreferrer"&gt;Docker&lt;/a&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;a href="https://deno.land/" rel="noopener noreferrer"&gt;Deno&lt;/a&gt;&lt;/strong&gt; commands.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Start the backend&lt;/span&gt;
&lt;span class="nb"&gt;cd &lt;/span&gt;my-awesome-app
docker compose up &lt;span class="nt"&gt;-d&lt;/span&gt;

&lt;span class="c"&gt;# Start the frontend&lt;/span&gt;
&lt;span class="nb"&gt;cd &lt;/span&gt;generic-app
deno task dev &lt;span class="nt"&gt;--open&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And that's it! You now have a fully functional, type-safe, full-stack application ready for you to build upon.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I Built This
&lt;/h2&gt;

&lt;p&gt;I believe that modern development should be fast, safe, and enjoyable. By combining best-in-class tools like &lt;strong&gt;&lt;a href="https://svelte.dev/" rel="noopener noreferrer"&gt;Svelte 5&lt;/a&gt;&lt;/strong&gt;, &lt;strong&gt;&lt;a href="https://deno.land/" rel="noopener noreferrer"&gt;Deno&lt;/a&gt;&lt;/strong&gt;, &lt;strong&gt;&lt;a href="https://fastapi.tiangolo.com/" rel="noopener noreferrer"&gt;FastAPI&lt;/a&gt;&lt;/strong&gt;, and &lt;strong&gt;&lt;a href="https://tauri.app/" rel="noopener noreferrer"&gt;Tauri&lt;/a&gt;&lt;/strong&gt;, and focusing on solving the critical problem of type-safety across the stack, GWA aims to provide a superior developer experience.&lt;/p&gt;

&lt;p&gt;This is a project I'm passionate about, and it's built for developers like you. I'd love for you to check it out, and any feedback, suggestions, or contributions are more than welcome!&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;GWA Template Repo:&lt;/strong&gt; &lt;a href="https://github.com/Yrrrrrf/gwa" rel="noopener noreferrer"&gt;https://github.com/Yrrrrrf/gwa&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;&lt;code&gt;gwa-create&lt;/code&gt; Scaffolder Repo:&lt;/strong&gt; &lt;a href="https://github.com/Yrrrrrf/gwa-create" rel="noopener noreferrer"&gt;https://github.com/Yrrrrrf/gwa-create&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let me know what you think in the comments below!&lt;/p&gt;

</description>
      <category>svelte</category>
      <category>rust</category>
      <category>python</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
