<?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: Patrick Wright</title>
    <description>The latest articles on DEV Community by Patrick Wright (@mrpatrickwright).</description>
    <link>https://dev.to/mrpatrickwright</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%2F1423652%2Fe297abee-d6bd-4044-af4d-ea7ef82fe15d.jpg</url>
      <title>DEV Community: Patrick Wright</title>
      <link>https://dev.to/mrpatrickwright</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mrpatrickwright"/>
    <language>en</language>
    <item>
      <title>Use Code Generation To Advance Your Career</title>
      <dc:creator>Patrick Wright</dc:creator>
      <pubDate>Tue, 10 Jun 2025 15:29:03 +0000</pubDate>
      <link>https://dev.to/mrpatrickwright/use-code-generation-to-advance-your-career-88g</link>
      <guid>https://dev.to/mrpatrickwright/use-code-generation-to-advance-your-career-88g</guid>
      <description>&lt;h2&gt;
  
  
  Opening Story
&lt;/h2&gt;

&lt;p&gt;This post will detail one example of how I have used code generation to advance my career. While working for a large government contractor the team was looking for a software solution for tracking server configurations. We wanted to know what applications were installed on the servers and what versions of the applications were installed. We also wanted information on some applications that were xcopy deployed on the servers. We also needed information about the patches installed on Oracle instances. After listening to a vendor's presentation about their solution to our problem on a Friday afternoon I realized that I could build a 90% solution over the weekend.&lt;/p&gt;

&lt;h2&gt;
  
  
  My Solution
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Retrieve the Server Configuration Information
&lt;/h3&gt;

&lt;p&gt;I started with a database schema to hold the data I needed to produce the reports that are required. I wrote a .Net console application that queried Windows Management Instrumentation (WMI) to get a list of installed programs. From the .Net program I was able to call OPatch to get the info I needed from Oracle. I just checked for the existence of files to verify that our xcopy deployed tools were present. I now had all of the info I needed to put in the database and the database schema.&lt;/p&gt;

&lt;h3&gt;
  
  
  Generate a Web Application to View Server Configuration Information
&lt;/h3&gt;

&lt;p&gt;At this point in my career I had created a database driven code generator that I used to generate code for me when working on database projects. I used to sell a code generator commercially. Depending on where I was working at the time I would use the one I used to sell or I would create one to use at work. In this case I created one to use at work and I had templates that would generate a CRUD application using ASP.Net. The next step was to point my code generator at my new schema and had a working application that would display data for my new database. I used the business and data tiers from the generated code in my console application to write the queried information to the database.&lt;/p&gt;

&lt;h3&gt;
  
  
  Modify the Generated Web Application
&lt;/h3&gt;

&lt;p&gt;With the data in the database I needed to provide the users a way to see the information in the format they wanted. They needed more than data entry pages and views of single records. I added a few pages to the web app to allow users to view server configuration information over time by server and report on it. I packaged up the console app to make it easy to deploy. The application was installed by copying it to a server, updating a json config file and setting up a scheduled task to run the program. The scheduled task would fire off the program, the program would get the server configuration information and write it to the database and users could view the information from the web application.&lt;/p&gt;

&lt;p&gt;The following Monday I demoed the application and it was very well received. We deployed it and used it for years.&lt;/p&gt;

&lt;h2&gt;
  
  
  From Manual to Automated
&lt;/h2&gt;

&lt;p&gt;Code generation is a game-changer because it replaces repetitive, error-prone manual work with automation. Before I embraced it, I spent countless hours writing boilerplate code for APIs, data models, and configuration files. Each line had to be carefully crafted, tested, and maintained. And despite my best efforts, human error was inevitable.&lt;/p&gt;

&lt;p&gt;With code generation, those days are behind me. Instead of writing the same code repeatedly, I create templates and scripts that generate it automatically. Not only does this save an incredible amount of time, but it also ensures consistency and reduces the likelihood of bugs. For example, instead of manually writing API backends for different services, I now use code generation to generate the CRUD endpoints in seconds. I also generate the units tests for the generated code. The team can now focus their time on business rules and adding business value.&lt;/p&gt;

&lt;p&gt;Automation also frees up developers to focus on more valuable work—solving complex problems, designing better architectures, and improving performance. The more we automate, the more we can shift our efforts toward innovation rather than repetition.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Career Boost
&lt;/h2&gt;

&lt;p&gt;Mastering code generation doesn't just save time—it makes you invaluable to your team and organization. When I introduced automated code generation to my workflow, I quickly became the go-to person for improving development efficiency. My team started relying on me to find ways to streamline our processes, and before long, my reputation as a productivity booster spread.&lt;/p&gt;

&lt;p&gt;Employers and managers love developers who can deliver results faster and more reliably. Code generation skills set you apart as someone who thinks critically about efficiency and scalability. It's not just about writing code—it's about writing less code while achieving more.&lt;/p&gt;

&lt;p&gt;Because of my expertise in automation, I've had opportunities to work on high-impact projects, lead process improvements, and even mentor others in adopting these techniques. This has led to promotions, salary increases, and a stronger professional network. The ability to automate tedious tasks is a superpower in the software development world.&lt;/p&gt;

&lt;h2&gt;
  
  
  Quick Wins
&lt;/h2&gt;

&lt;p&gt;The best way to start with code generation is by tackling small, practical projects. Here are a few simple ways to get quick wins:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Generate Configuration Files&lt;/strong&gt;: Writing JSON, YAML, or XML configuration files by hand is tedious. Use templates to generate them dynamically based on input parameters.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automate Boilerplate Code&lt;/strong&gt;: If you frequently write similar classes, functions, or API endpoints, create a script to generate them from a template.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use OpenAPI for API Clients&lt;/strong&gt;: Many modern APIs provide OpenAPI specifications. Tools like Swagger Codegen or OpenAPI Generator can create API clients for various programming languages automatically.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scaffold Projects&lt;/strong&gt;: Instead of setting up a new project manually every time, create a project generator that initializes everything with best practices already in place.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Leverage ORM Code Generators&lt;/strong&gt;: Many ORMs (Object-Relational Mappers) support generating models from database schemas, reducing the need to write tedious data models by hand.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Leverage a code generator like &lt;a href="https://monstarillo.com" rel="noopener noreferrer"&gt;Monstarillo&lt;/a&gt;&lt;/strong&gt; to generate code from your database or ORM model.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each of these projects builds confidence and demonstrates immediate value. Once you see the power of automation, you'll start looking for opportunities to apply it everywhere.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Automation isn't just a buzzword—it's a career accelerator. By mastering code generation, you can eliminate repetitive work, reduce errors, and become an indispensable asset to any team. Whether you start with simple tasks like generating configuration files or build full-fledged automation tools, the impact is undeniable.&lt;/p&gt;

&lt;p&gt;Looking back, that weekend project wasn't just about saving time—it was about transforming my approach to software development. Today, I write less code while achieving more, and my career has taken off because of it. If you're a developer looking to level up, start exploring code generation. It might just be your secret weapon for success.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>career</category>
      <category>careerdevelopment</category>
    </item>
    <item>
      <title>Stop Writing Docs, Start Generating Them: How I Document My Code in Minutes with Syntax Scribe</title>
      <dc:creator>Patrick Wright</dc:creator>
      <pubDate>Tue, 10 Jun 2025 15:09:32 +0000</pubDate>
      <link>https://dev.to/mrpatrickwright/stop-writing-docs-start-generating-them-how-i-document-my-code-in-minutes-with-syntax-scribe-174m</link>
      <guid>https://dev.to/mrpatrickwright/stop-writing-docs-start-generating-them-how-i-document-my-code-in-minutes-with-syntax-scribe-174m</guid>
      <description>&lt;p&gt;We've all been there. You've built an amazing TypeScript project, spent weeks perfecting the code, and then... you need to document it. 😅&lt;/p&gt;

&lt;p&gt;The README sits there, mocking you with its emptiness. Your functions are clean, your types are perfect, but explaining what everything does? That's going to take &lt;em&gt;hours&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;What if I told you there's a tool that can analyze your entire codebase and generate beautiful, professional documentation in minutes? Let me introduce you to &lt;strong&gt;Syntax Scribe&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Documentation Struggle is Real
&lt;/h2&gt;

&lt;p&gt;Before we dive in, let's be honest about documentation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ We know it's important&lt;/li&gt;
&lt;li&gt;✅ We know our users (and future selves) need it
&lt;/li&gt;
&lt;li&gt;❌ We rarely have time to write it properly&lt;/li&gt;
&lt;li&gt;❌ Keeping it updated is a nightmare&lt;/li&gt;
&lt;li&gt;❌ Writing good docs is genuinely hard&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I used to spend entire weekends writing documentation for client projects. Not anymore.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Syntax Scribe?
&lt;/h2&gt;

&lt;p&gt;Syntax Scribe is a CLI tool that analyzes your TypeScript, JavaScript, Vue, and TSX files and automatically generates comprehensive documentation. But here's the kicker: &lt;strong&gt;it doesn't rely on comments in your code&lt;/strong&gt;. It analyzes the actual structure and generates clean, readable docs.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Features That Won Me Over
&lt;/h3&gt;

&lt;p&gt;🔍 &lt;strong&gt;Deep Code Analysis&lt;/strong&gt; - Parses functions, interfaces, types, and their relationships&lt;br&gt;&lt;br&gt;
📚 &lt;strong&gt;MkDocs Integration&lt;/strong&gt; - Creates professional documentation sites with Material theme&lt;br&gt;&lt;br&gt;
🔒 &lt;strong&gt;Privacy First&lt;/strong&gt; - Everything happens locally on your machine&lt;br&gt;&lt;br&gt;
⚡ &lt;strong&gt;Zero Setup&lt;/strong&gt; - Works out of the box with any TypeScript/JavaScript project&lt;br&gt;&lt;br&gt;
🎨 &lt;strong&gt;Beautiful Output&lt;/strong&gt; - Clean, organized Markdown ready for GitHub or internal wikis&lt;/p&gt;
&lt;h2&gt;
  
  
  See It In Action
&lt;/h2&gt;

&lt;p&gt;Here's what Syntax Scribe generated from a simple database utility file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gh"&gt;# 📄 `db.ts`&lt;/span&gt;

&lt;span class="gu"&gt;## 🧾 Summary&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="gs"&gt;**Functions**&lt;/span&gt;: 1
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="gs"&gt;**Classes**&lt;/span&gt;: 0  
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="gs"&gt;**Imports**&lt;/span&gt;: 4
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="gs"&gt;**Interfaces**&lt;/span&gt;: 0
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="gs"&gt;**Type Aliases**&lt;/span&gt;: 0

&lt;span class="gu"&gt;## 📦 Imports&lt;/span&gt;
| Name | Source |
|------|--------|
| &lt;span class="sb"&gt;`drizzle`&lt;/span&gt; | &lt;span class="sb"&gt;`drizzle-orm/neon-http`&lt;/span&gt; |
| &lt;span class="sb"&gt;`neon`&lt;/span&gt; | &lt;span class="sb"&gt;`@neondatabase/serverless`&lt;/span&gt; |
| &lt;span class="sb"&gt;`neonConfig`&lt;/span&gt; | &lt;span class="sb"&gt;`@neondatabase/serverless`&lt;/span&gt; |
| &lt;span class="sb"&gt;`H3Event`&lt;/span&gt; | &lt;span class="sb"&gt;`h3`&lt;/span&gt; |

&lt;span class="gu"&gt;## 🔧 Functions&lt;/span&gt;

&lt;span class="gu"&gt;### `getDb(event: H3Event): any`&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;details&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;Code&lt;span class="nt"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;br&gt;
ts&lt;br&gt;
export function getDb(event?: H3Event) {&lt;br&gt;
  if (!_db) {&lt;br&gt;
    // Get database URL from runtime config&lt;br&gt;
    const config = useRuntimeConfig();&lt;br&gt;
    if (!config.DATABASE_URL) {&lt;br&gt;
      throw new Error('DATABASE_URL is missing from environment variables');&lt;br&gt;
    }&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Create SQL connection
const sql = neon(config.DATABASE_URL);

// Create Drizzle instance
_db = drizzle(sql, { schema });
console.log('Database connection initialized');
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;return _db;&lt;br&gt;
}&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;/details&amp;gt;

- **Parameters**: `event: H3Event`
- **Return Type**: `any`
- **Calls**: `useRuntimeConfig`, `neon`, `drizzle`, `console.log`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is clean, organized, and tells you everything you need to know about the code. No comments required!&lt;/p&gt;

&lt;h2&gt;
  
  
  The 5-Minute Workflow
&lt;/h2&gt;

&lt;p&gt;Here's how I generate docs for any project:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Install Syntax Scribe
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; syntax-scribe
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Generate Documentation
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;syntax-scribe docs document &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-s&lt;/span&gt; &lt;span class="s2"&gt;"~/code/my-project"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s2"&gt;"~/code/my-docs/docs"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-l&lt;/span&gt; your-license-key
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. Create MkDocs Site
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;syntax-scribe docs init &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s2"&gt;"~/code/my-docs"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-n&lt;/span&gt; &lt;span class="s2"&gt;"My Project Documentation"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-l&lt;/span&gt; your-license-key
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  4. Generate Navigation
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;syntax-scribe docs nav &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s2"&gt;"~/code/my-docs"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-l&lt;/span&gt; your-license-key
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  5. Preview Locally
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;syntax-scribe docs serve &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s2"&gt;"~/code/my-docs"&lt;/span&gt; &lt;span class="nt"&gt;-l&lt;/span&gt; your-license-key
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Boom!&lt;/strong&gt; Professional documentation site running at &lt;code&gt;localhost:8000&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Real-World Impact
&lt;/h2&gt;

&lt;p&gt;Since using Syntax Scribe, I've:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Reduced documentation time by 90%&lt;/strong&gt; - From hours to minutes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Improved client handoffs&lt;/strong&gt; - Clients get professional docs with every project
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Increased team adoption&lt;/strong&gt; - Teammates actually maintain docs when it's this easy&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Better code quality&lt;/strong&gt; - The analysis helps me spot inconsistencies&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Perfect for Different Use Cases
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Freelancers &amp;amp; Agencies&lt;/strong&gt;: Impress clients with professional documentation&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Open Source&lt;/strong&gt;: Generate comprehensive READMEs and wikis&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Enterprise&lt;/strong&gt;: Document internal APIs and component libraries&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Personal Projects&lt;/strong&gt;: Keep future-you from hating present-you&lt;/p&gt;
&lt;h2&gt;
  
  
  The GitHub Pages Bonus
&lt;/h2&gt;

&lt;p&gt;Want to host your docs for free? Syntax Scribe integrates perfectly with GitHub Pages. The generated MkDocs sites deploy seamlessly with GitHub Actions.&lt;/p&gt;

&lt;p&gt;Here's a quick GitHub Actions workflow that auto-deploys your docs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Deploy MkDocs to GitHub Pages&lt;/span&gt;

&lt;span class="na"&gt;on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;push&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;branches&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt; &lt;span class="nv"&gt;main&lt;/span&gt; &lt;span class="pi"&gt;]&lt;/span&gt;

&lt;span class="na"&gt;jobs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;build&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;runs-on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ubuntu-latest&lt;/span&gt;
    &lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/checkout@v4&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/setup-python@v5&lt;/span&gt;
        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;python-version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;3.x'&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;|&lt;/span&gt;
          &lt;span class="s"&gt;pip install mkdocs mkdocs-material&lt;/span&gt;
          &lt;span class="s"&gt;mkdocs build --clean&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/deploy-pages@v4&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Push to main, and your docs are live at &lt;code&gt;username.github.io/repo-name&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why This Matters
&lt;/h2&gt;

&lt;p&gt;Good documentation isn't just about helping others—it's about:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Reducing support burden&lt;/strong&gt; - Better docs = fewer questions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Faster onboarding&lt;/strong&gt; - New team members get up to speed quickly
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Professional credibility&lt;/strong&gt; - Quality docs signal quality code&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Future-proofing&lt;/strong&gt; - Your future self will thank you&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try It Yourself
&lt;/h2&gt;

&lt;p&gt;Syntax Scribe offers a 14-day free trial, and the basic documentation generation works on any TypeScript/JavaScript project.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Get started&lt;/strong&gt;: Visit &lt;a href="https://syntaxscribe.com" rel="noopener noreferrer"&gt;syntaxscribe.com&lt;/a&gt; or install directly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; syntax-scribe
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;I'll be honest—I was skeptical about automated documentation tools. But Syntax Scribe changed my mind. It doesn't try to be magical; it just does one thing really well: analyzing your code and presenting it clearly.&lt;/p&gt;

&lt;p&gt;The time savings alone are worth it, but the quality of the output genuinely impresses me. Plus, knowing that everything runs locally gives me peace of mind for client projects.&lt;/p&gt;

&lt;p&gt;If you're drowning in documentation debt or want to impress clients with professional deliverables, give Syntax Scribe a try. Your future self (and your users) will thank you.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Have you tried automated documentation tools? What's your biggest documentation challenge? Let me know in the comments!&lt;/em&gt;&lt;/p&gt;




</description>
      <category>javascript</category>
      <category>node</category>
      <category>typescript</category>
      <category>programming</category>
    </item>
    <item>
      <title>Generate a REST API Using Java and Spring Boot for your Postgres database</title>
      <dc:creator>Patrick Wright</dc:creator>
      <pubDate>Wed, 08 Jan 2025 16:23:30 +0000</pubDate>
      <link>https://dev.to/mrpatrickwright/generate-a-rest-api-using-java-and-spring-boot-for-your-postgres-database-570g</link>
      <guid>https://dev.to/mrpatrickwright/generate-a-rest-api-using-java-and-spring-boot-for-your-postgres-database-570g</guid>
      <description>&lt;p&gt;This tutorial will show you how you can generate a Java API for your Postgres database using &lt;a href="https://monstarillo.com" rel="noopener noreferrer"&gt;monstarillo&lt;/a&gt;. The API will use Spring Boot and Springdoc to document it. The API will perform CRUD operations on the tables you run it against. Unit tests will also be generated for the API.&lt;br&gt;
To follow along with this tutorial you will need:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://monstarillo.com" rel="noopener noreferrer"&gt;monstarillo&lt;/a&gt; installed.&lt;br&gt;
A Postgres database – I will be using the chinhook database. &lt;a href="https://patrickwright.io/set-up-the-chinhook-sample-postgres-database-in-docker/" rel="noopener noreferrer"&gt;Set up the Chinhook Sample Postgres Database in Docker&lt;/a&gt;&lt;br&gt;
Java installed&lt;br&gt;
A Java IDE – I will be using InteliJ&lt;br&gt;
Git&lt;/p&gt;

&lt;p&gt;The first step will be to get the templates that we will be using to generate our API. To do so clone the repo &lt;a href="https://github.com/mrpatrickwright/shared-templates" rel="noopener noreferrer"&gt;shared-templates&lt;/a&gt;. The templates we will be using are in the java-api folder.&lt;br&gt;
Tell Monstarillo where to put the Generated code&lt;br&gt;
Next you will need to decide where you want the generated code to be placed. I will be running Monstarillo through Docker. I will be exposing the directory ~/shared-volume to the docker image running Monstarillo. The shared-templates folder created by cloning the repo is in the ~/shared-volume folder. I will be generating code in ~/shared-volume/code-gen-output. Monstarillo will create the code-gen-output folder when it generates the code.&lt;/p&gt;

&lt;p&gt;Modify the templates.json file&lt;br&gt;
Monstarillo uses a json file to tell it which templates to run, how to run them, and what to name the files it generates and where to put them. We will be modifying the file java-api/postgres/templates.json. The templates array in the templates.json file tells Monstarillo which templates to run, what to name the files it creates and where to put them. The tags array in the templates.json file defines some “tags” that are used in templates and/or the templates.json. For example the PackagePath is used numerous time in the templates.json file. The PackagePath is used in a number of templates, the tag allows us to define it once. To run the templates you will need to modify TemplateRoot and OutputPath tags in the tags array.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;TemplateRoot *&lt;/em&gt;– Template root needs to point to the java-api folder in the repository that you cloned.&lt;br&gt;
*&lt;em&gt;OutputPath *&lt;/em&gt;– Output path need to point to the folder that you want Monstarillo to put the files it generates in. Monstarillo will create the folder if it does not already exist.&lt;br&gt;
*&lt;em&gt;PackageBase *&lt;/em&gt;– Used to set the package in classes&lt;br&gt;
*&lt;em&gt;ArtifactId *&lt;/em&gt;– Used in the generated POM.xml&lt;br&gt;
*&lt;em&gt;GroupId *&lt;/em&gt;– Used in the generated POM.xml&lt;br&gt;
*&lt;em&gt;ApplicationClassName *&lt;/em&gt;– Used as the name of the main class of the generated application&lt;br&gt;
*&lt;em&gt;ModelPropertySurrondString *&lt;/em&gt;– Used in the template that generates the models for the application. This is useful if your column names are camel cased.&lt;/p&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%2Fecwbptmrscxekphv4qn1.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%2Fecwbptmrscxekphv4qn1.png" alt="Image of a model class" width="580" height="636"&gt;&lt;/a&gt;&lt;br&gt;
I am running Monstarillo in docker so I will set the tags to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
   "tagName": "TemplateRoot",
   "value": "/usr/local/monstarillo/shared-templates/java-api"
},
{
   "tagName": "OutputPath",
   "value": "/usr/local/monstarillo/code-gen-output/java-01"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If I was running Monstarillo locally I would set the tags to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
   "tagName": "TemplateRoot",
   "value": "/home/patrick/code/patrick-templates/java-api"
},
{
   "tagName": "OutputPath",
   "value": "/home/patrick/code-gen-output/java-01"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run Monstarillo to Generate The Code&lt;br&gt;
Next we will build the command to run Monstarillo to generate the code for us. We will need to tell Monstarillo that we are using a Postgres database and provide the connection information. We will also need to tell Monstarillo which templates to run by passing the location of the templates.json file we set up earlier.&lt;/p&gt;

&lt;p&gt;To run Monstarillo in docker our command will look similar to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker run --volume=/mnt/c/code:/usr/local/monstarillo \
--network=host \
monstarillo/monstarillo:latest postgres \
--t /usr/local/monstarillo/shared-templates/java-api/postgres/templates.json  \
--u postgres \
--p &amp;lt;Your Database Password&amp;gt; \
--db "chinhook-db" \
--host "localhost" \
--schema "public"
In this command I am mounting /mnt/c/code to the docker image as /usr/local/monstarillo that is running monstarillo. My shared-templates folder is at /mnt/c/code/shared-templates and will be generating code to /mnt/c/code/code-gen-output/java-01
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If I were running Monstarillo locally my command would be:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;monstarillo postgres \
--t /home/patrick/code/patricks-monstarillo-templates/java-api/templates.json  \
--u postgres \
--p &amp;lt;Your Database Password&amp;gt;\
--db "chinhook-db" \
--host "localhost" \
--schema "public"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When you run the command your output will be similar to:&lt;/p&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%2F606jmdcaqh6tji8rk0q2.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%2F606jmdcaqh6tji8rk0q2.png" alt="Monstarillo running" width="800" height="336"&gt;&lt;/a&gt;&lt;br&gt;
Notice that Monstarillo prints out each table name and that it runs against. You may be able to use this information to troubleshoot errors in your command.&lt;/p&gt;

&lt;p&gt;View Your Generated Code&lt;br&gt;
Next you can view your code by opening the output directory you chose in your IDE of choice.&lt;/p&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%2Fjqemeo94xaogfobfzdju.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%2Fjqemeo94xaogfobfzdju.png" alt="Generated code in IntelliJ" width="720" height="388"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next you will need to modify the application.properties file in your generated code to update your database connection information. The file can be found at src/main/resources/application.properties&lt;/p&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%2Fzzf1vk3ql2ug47eudepw.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%2Fzzf1vk3ql2ug47eudepw.png" alt="Application Properties file" width="720" height="326"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In IntelliJ I will open the PersistApi class in the IDE and run it.&lt;/p&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%2Ft7ftvgmbqp7j707q31zn.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%2Ft7ftvgmbqp7j707q31zn.png" alt="Monstarillo running in IntelliJ" width="720" height="388"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;My new API is running and I can test it. I will use Postman. I can access the album controller at &lt;a href="http://localhost:8080/album" rel="noopener noreferrer"&gt;http://localhost:8080/album&lt;/a&gt;&lt;/p&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%2F8o8ur1sgagqi0oudzgog.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%2F8o8ur1sgagqi0oudzgog.png" alt="Album endpoint running in Postman" width="720" height="542"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can also surf to &lt;a href="http://localhost:8080/swagger-ui/index.html" rel="noopener noreferrer"&gt;http://localhost:8080/swagger-ui/index.html&lt;/a&gt; to see the generated OpenAPI definition for the generated code.&lt;/p&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%2Fmdpuivych91g5h2y6iq3.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%2Fmdpuivych91g5h2y6iq3.png" alt="Open API definition of generated code" width="800" height="532"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Notice the unit tests that have been generated in src/java/com.monstarillo.persist_api&lt;/p&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%2Finqm1bqim0sigsw6hfhu.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%2Finqm1bqim0sigsw6hfhu.png" alt="Code coverage of generated code." width="666" height="414"&gt;&lt;/a&gt;&lt;/p&gt;

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

</description>
      <category>java</category>
      <category>springboot</category>
      <category>api</category>
      <category>backend</category>
    </item>
    <item>
      <title>Generate a REST API Using Java and Spring Boot for your Postgres database</title>
      <dc:creator>Patrick Wright</dc:creator>
      <pubDate>Mon, 06 Jan 2025 13:50:10 +0000</pubDate>
      <link>https://dev.to/mrpatrickwright/generate-a-rest-api-using-java-and-spring-boot-for-your-postgres-database-35j</link>
      <guid>https://dev.to/mrpatrickwright/generate-a-rest-api-using-java-and-spring-boot-for-your-postgres-database-35j</guid>
      <description>&lt;p&gt;This tutorial will show you how you can generate a Java API for your Postgres database using &lt;a href="https://monstarillo.com" rel="noopener noreferrer"&gt;monstarillo&lt;/a&gt;. The API will use Spring Boot and Springdoc to document it. The API will perform CRUD operations on the tables you run it against. Unit tests will also be generated for the API.&lt;br&gt;
To follow along with this tutorial you will need:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://monstarillo.com" rel="noopener noreferrer"&gt;monstarillo&lt;/a&gt; installed.&lt;br&gt;
A Postgres database – I will be using the chinhook database. &lt;a href="https://patrickwright.io/set-up-the-chinhook-sample-postgres-database-in-docker/" rel="noopener noreferrer"&gt;Set up the Chinhook Sample Postgres Database in Docker&lt;/a&gt;&lt;br&gt;
Java installed&lt;br&gt;
A Java IDE – I will be using InteliJ&lt;br&gt;
Git&lt;/p&gt;

&lt;p&gt;The first step will be to get the templates that we will be using to generate our API. To do so clone the repo &lt;a href="https://github.com/mrpatrickwright/shared-templates" rel="noopener noreferrer"&gt;shared-templates&lt;/a&gt;. The templates we will be using are in the java-api folder.&lt;br&gt;
Tell Monstarillo where to put the Generated code&lt;br&gt;
Next you will need to decide where you want the generated code to be placed. I will be running Monstarillo through Docker. I will be exposing the directory ~/shared-volume to the docker image running Monstarillo. The shared-templates folder created by cloning the repo is in the ~/shared-volume folder. I will be generating code in ~/shared-volume/code-gen-output. Monstarillo will create the code-gen-output folder when it generates the code.&lt;/p&gt;

&lt;p&gt;Modify the templates.json file&lt;br&gt;
Monstarillo uses a json file to tell it which templates to run, how to run them, and what to name the files it generates and where to put them. We will be modifying the file java-api/postgres/templates.json. The templates array in the templates.json file tells Monstarillo which templates to run, what to name the files it creates and where to put them. The tags array in the templates.json file defines some “tags” that are used in templates and/or the templates.json. For example the PackagePath is used numerous time in the templates.json file. The PackagePath is used in a number of templates, the tag allows us to define it once. To run the templates you will need to modify TemplateRoot and OutputPath tags in the tags array.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;TemplateRoot&lt;/strong&gt;– Template root needs to point to the java-api folder in the repository that you cloned.&lt;br&gt;
&lt;strong&gt;OutputPath&lt;/strong&gt;– Output path need to point to the folder that you want Monstarillo to put the files it generates in. Monstarillo will create the folder if it does not already exist.&lt;br&gt;
&lt;strong&gt;PackageBase&lt;/strong&gt;– Used to set the package in classes&lt;br&gt;
&lt;strong&gt;ArtifactId&lt;/strong&gt;– Used in the generated POM.xml&lt;br&gt;
&lt;strong&gt;GroupId&lt;/strong&gt;– Used in the generated POM.xml&lt;br&gt;
&lt;strong&gt;ApplicationClassName&lt;/strong&gt;– Used as the name of the main class of the generated application&lt;br&gt;
&lt;strong&gt;ModelPropertySurrondString&lt;/strong&gt;– Used in the template that generates the models for the application. This is useful if your column names are camel cased.&lt;/p&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%2Fecwbptmrscxekphv4qn1.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%2Fecwbptmrscxekphv4qn1.png" alt="Image of a model class" width="580" height="636"&gt;&lt;/a&gt;&lt;br&gt;
I am running Monstarillo in docker so I will set the tags to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
   "tagName": "TemplateRoot",
   "value": "/usr/local/monstarillo/shared-templates/java-api"
},
{
   "tagName": "OutputPath",
   "value": "/usr/local/monstarillo/code-gen-output/java-01"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If I was running Monstarillo locally I would set the tags to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
   "tagName": "TemplateRoot",
   "value": "/home/patrick/code/patrick-templates/java-api"
},
{
   "tagName": "OutputPath",
   "value": "/home/patrick/code-gen-output/java-01"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run Monstarillo to Generate The Code&lt;br&gt;
Next we will build the command to run Monstarillo to generate the code for us. We will need to tell Monstarillo that we are using a Postgres database and provide the connection information. We will also need to tell Monstarillo which templates to run by passing the location of the templates.json file we set up earlier.&lt;/p&gt;

&lt;p&gt;To run Monstarillo in docker our command will look similar to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker run --volume=/mnt/c/code:/usr/local/monstarillo \
--network=host \
monstarillo/monstarillo:latest postgres \
--t /usr/local/monstarillo/shared-templates/java-api/postgres/templates.json  \
--u postgres \
--p &amp;lt;Your Database Password&amp;gt; \
--db "chinhook-db" \
--host "localhost" \
--schema "public"
In this command I am mounting /mnt/c/code to the docker image as /usr/local/monstarillo that is running monstarillo. My shared-templates folder is at /mnt/c/code/shared-templates and will be generating code to /mnt/c/code/code-gen-output/java-01
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If I were running Monstarillo locally my command would be:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;monstarillo postgres \
--t /home/patrick/code/patricks-monstarillo-templates/java-api/templates.json  \
--u postgres \
--p &amp;lt;Your Database Password&amp;gt;\
--db "chinhook-db" \
--host "localhost" \
--schema "public"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When you run the command your output will be similar to:&lt;/p&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%2F606jmdcaqh6tji8rk0q2.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%2F606jmdcaqh6tji8rk0q2.png" alt="Monstarillo running" width="800" height="336"&gt;&lt;/a&gt;&lt;br&gt;
Notice that Monstarillo prints out each table name and that it runs against. You may be able to use this information to troubleshoot errors in your command.&lt;/p&gt;

&lt;p&gt;View Your Generated Code&lt;br&gt;
Next you can view your code by opening the output directory you chose in your IDE of choice.&lt;/p&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%2Fjqemeo94xaogfobfzdju.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%2Fjqemeo94xaogfobfzdju.png" alt="Generated code in IntelliJ" width="720" height="388"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next you will need to modify the application.properties file in your generated code to update your database connection information. The file can be found at src/main/resources/application.properties&lt;/p&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%2Fzzf1vk3ql2ug47eudepw.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%2Fzzf1vk3ql2ug47eudepw.png" alt="Application Properties file" width="720" height="326"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In IntelliJ I will open the PersistApi class in the IDE and run it.&lt;/p&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%2Ft7ftvgmbqp7j707q31zn.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%2Ft7ftvgmbqp7j707q31zn.png" alt="Monstarillo running in IntelliJ" width="720" height="388"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;My new API is running and I can test it. I will use Postman. I can access the album controller at &lt;a href="http://localhost:8080/album" rel="noopener noreferrer"&gt;http://localhost:8080/album&lt;/a&gt;&lt;/p&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%2F8o8ur1sgagqi0oudzgog.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%2F8o8ur1sgagqi0oudzgog.png" alt="Album endpoint running in Postman" width="720" height="542"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can also surf to &lt;a href="http://localhost:8080/swagger-ui/index.html" rel="noopener noreferrer"&gt;http://localhost:8080/swagger-ui/index.html&lt;/a&gt; to see the generated OpenAPI definition for the generated code.&lt;/p&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%2Fmdpuivych91g5h2y6iq3.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%2Fmdpuivych91g5h2y6iq3.png" alt="Open API definition of generated code" width="800" height="532"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Notice the unit tests that have been generated in src/java/com.monstarillo.persist_api&lt;/p&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%2Finqm1bqim0sigsw6hfhu.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%2Finqm1bqim0sigsw6hfhu.png" alt="Code coverage of generated code." width="666" height="414"&gt;&lt;/a&gt;&lt;/p&gt;

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

</description>
      <category>java</category>
      <category>springboot</category>
      <category>api</category>
      <category>backend</category>
    </item>
  </channel>
</rss>
