<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Coder Legion - Recent posts tagged gettingstarted</title>
<link>https://coderlegion.com/tag/gettingstarted</link>
<description>Powered by Question2Answer</description>
<item>
<title>BeingOptimist Social Media Bio Generator</title>
<link>https://coderlegion.com/16020/beingoptimist-social-media-bio-generator</link>
<description>&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://www.beingoptimist.com/tools/social-media-bio-generator/&quot;&gt;BeingOptimist Social Media Bio Generator&lt;/a&gt; is an AI-powered tool that helps creators, professionals, and brands generate engaging, platform-ready bios in seconds. Just add a few details about your niche, tone, and audience to get clear, personalized bio ideas for Instagram, LinkedIn, X, Facebook, and more.&lt;/p&gt;
</description>
<category>Launches</category>
<guid isPermaLink="true">https://coderlegion.com/16020/beingoptimist-social-media-bio-generator</guid>
<pubDate>Mon, 27 Apr 2026 21:33:35 +0000</pubDate>
</item>
<item>
<title>Workshopping my &quot;Anatomy of a Kestra Flow&quot; idea</title>
<link>https://coderlegion.com/12544/workshopping-my-anatomy-of-a-kestra-flow-idea</link>
<description>&lt;p&gt;I pulled together a quick video where I step through 4 different workflows and kind of talk through some ideas I had for more of a polished video. Let me know what you'd like me to focus on or where I should go into more details!&lt;/p&gt;
&lt;p&gt;Like these &quot;working out loud videos&quot;? Let me know that too! I'm happy to share more rough drafts in my quest to &lt;em&gt;learn in public&lt;/em&gt;. &lt;/p&gt;
&lt;p&gt;This was originally posted on dev.to via &lt;a rel=&quot;nofollow&quot; href=&quot;https://dev.to/missamarakay/workshopping-my-anatomy-of-a-kestra-flow-video-idea-d8h&quot;&gt;https://dev.to/missamarakay/workshopping-my-anatomy-of-a-kestra-flow-video-idea-d8h&lt;/a&gt;. &lt;/p&gt;
</description>
<category>Videos</category>
<guid isPermaLink="true">https://coderlegion.com/12544/workshopping-my-anatomy-of-a-kestra-flow-idea</guid>
<pubDate>Tue, 10 Mar 2026 20:53:44 +0000</pubDate>
</item>
<item>
<title>Social Media Bio Generator</title>
<link>https://coderlegion.com/12357/social-media-bio-generator</link>
<description>&lt;p&gt;Generate professional, creative, and platform-specific social media bios in seconds. Use this free &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.beingoptimist.com/tools/social-media-bio-generator/&quot;&gt;Social Media bio generator&lt;/a&gt; for Instagram, TikTok, LinkedIn, X, and YouTube.&lt;/p&gt;
</description>
<category>Launches</category>
<guid isPermaLink="true">https://coderlegion.com/12357/social-media-bio-generator</guid>
<pubDate>Wed, 04 Mar 2026 13:47:09 +0000</pubDate>
</item>
<item>
<title>Free Social Media Content Planner Tool</title>
<link>https://coderlegion.com/12121/free-social-media-content-planner-tool</link>
<description>&lt;p&gt;Create, organize, and schedule 30 days of social media content in just a few minutes with this &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.beingoptimist.com/tools/social-media-content-planner-tool/&quot;&gt;free social media content planner tool&lt;/a&gt;, designed to help creators, freelancers, and small businesses stay consistent without burning hours every week on ideas and planning.&lt;/p&gt;
</description>
<category>Launches</category>
<guid isPermaLink="true">https://coderlegion.com/12121/free-social-media-content-planner-tool</guid>
<pubDate>Tue, 24 Feb 2026 08:04:12 +0000</pubDate>
</item>
<item>
<title>Hello World — For My First Contribution Here, I’d Like to Share a Small Gift: A Free Python Beginner</title>
<link>https://coderlegion.com/11985/hello-world-for-my-first-contribution-here-id-like-to-share-small-gift-free-python-beginner</link>
<description>&lt;p&gt;Hello everyone &lt;/p&gt;
&lt;p&gt;As my first contribution to this community, I would like to share a small gift — a free section of my book &lt;em&gt;Python Programming for Beginners&lt;/em&gt;. This guide was created specifically for individuals starting from absolute zero, with no prior programming experience at all.&lt;/p&gt;
&lt;p&gt;The goal of this book is to provide a clear, structured introduction to Python without unnecessary complexity or overwhelming technical jargon. It focuses on building real understanding through simple explanations and practical examples.&lt;/p&gt;
&lt;p&gt;In this sample, you find:&lt;br&gt;
✅ Beginner-friendly explanations of core concepts&lt;br&gt;
✅ Step-by-step, hands-on examples&lt;br&gt;
✅ Exercises designed to reinforce learning&lt;br&gt;
✅ A structured path to help you build real skills&lt;/p&gt;
&lt;p&gt; Download the free gift: &lt;a rel=&quot;nofollow&quot; href=&quot;https://ahmad-khatib.com/en/books/downloads/python-programming-for-beginners-free.epub&quot;&gt;https://ahmad-khatib.com/en/books/downloads/python-programming-for-beginners-free.epub&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Thank you, and I hope you find it valuable. Happy coding! &lt;/p&gt;
&lt;p&gt;Guide content in detail:&lt;br&gt;
&lt;strong&gt;Introduction&lt;/strong&gt;&lt;br&gt;
Downloading and Installing the Book’s Requirements&lt;br&gt;
1 – Downloading and Installing Python&lt;br&gt;
2 – Downloading and Installing PyCharm&lt;br&gt;
2.1 – An Exploratory Tour of PyCharm&lt;br&gt;
2.1.i – What is PyCharm?&lt;br&gt;
2.1.ii – The PyCharm Interface&lt;br&gt;
What is the Virtual Environment?&lt;br&gt;
2.2 – Downloading and Installing the Required Packages/Libraries&lt;br&gt;
&lt;strong&gt;Chapter 1: An Exploratory Tour in Python&lt;/strong&gt;&lt;br&gt;
1 – The print() Function&lt;br&gt;
2 – Variables and Values&lt;br&gt;
3 – The Methods: .title(), .lower(), and .upper()&lt;br&gt;
Chapter One Exercise&lt;br&gt;
&lt;strong&gt;Chapter 2: Numbers and Strings and Some Basic Operations&lt;/strong&gt;&lt;br&gt;
1 – Numbers&lt;br&gt;
2 – Use Cases of the Addition Operator (+) with Numbers VS. with Strings&lt;br&gt;
3 – The int() and str() Functions&lt;br&gt;
4 – Number Types in Python And Some Basic Arithmetic Operations&lt;br&gt;
5 – Commands Related to Working with Strings&lt;br&gt;
5.1 – Using Comma (,) Inside the print() Function to Combine Strings and Separate them with a Space&lt;br&gt;
5.2 – The Tab Space (\t), and Moving to a New Line (\n)&lt;br&gt;
5.3 – Defining Strings Using Triple Quotes (&quot;&quot;&quot; &quot;&quot;&quot;)&lt;br&gt;
5.4 – Removing Spaces from String Edges: .strip(), .rstrip(), .lstrip()&lt;br&gt;
5.5 – Removing Text from String Boundaries: .removeprefix(), .removesuffix()&lt;br&gt;
5.6 – Using the Backslash () to Escape Special Characters or Split Long Code Lines&lt;br&gt;
6 – Adding Comments to Code (#)&lt;br&gt;
Chapter Two Exercise&lt;br&gt;
Solution&lt;br&gt;
&lt;strong&gt;Chapter 3: Lists and Loops&lt;/strong&gt;&lt;br&gt;
Do you know about Minecraft?&lt;br&gt;
1 – Introduction to Lists&lt;br&gt;
1.1 – List Elements Ordering, and Element Code&lt;br&gt;
1.2 – Manipulating Lists&lt;br&gt;
1.2.i – Adding Elements to List&lt;br&gt;
1.2.i.a – Appending a New Element at the End of the List Using the .append() Method&lt;br&gt;
1.2.i.b – Adding a New Element at a Specific Order in a List Using the .insert() Method&lt;br&gt;
1.2.ii – Removing Elements from a List&lt;br&gt;
1.2.ii.a – Removing a Specific Element by its Value Using the .remove() Method&lt;br&gt;
1.2.ii.b – Removing a Specific Element by Its Index Using the keyword del&lt;br&gt;
1.2.ii.c – Removing a Specific Element from the List and Returning It Using the .pop() Method&lt;br&gt;
1.3 – Modifying a Specific List Element by Its Index&lt;br&gt;
1.4 – Rearranging List Elements&lt;br&gt;
1.4.i – Rearranging List Elements in Ascending or Descending Order Using the .sort() Method&lt;br&gt;
1.4.ii – Creating a Copy of a List Sorted in Ascending or Descending Order Using the sorted() Function&lt;br&gt;
1.4.iii – Reversing the Order of List Elements Using the .reverse() Method&lt;br&gt;
1.4.iv – Ordering Criteria&lt;br&gt;
2 – The for Loop&lt;br&gt;
3 – The range() and list() Functions&lt;br&gt;
4 – List Dynamics in Python&lt;br&gt;
5 – Statistical Functions: len(), min(), max(), and sum()&lt;br&gt;
Do you know about WhatsApp?&lt;br&gt;
6 – Splitting a List into Parts (Slices)&lt;br&gt;
6.1 – Slicing Syntax&lt;br&gt;
6.2 – Copying Lists Using Slice Syntax, or the .copy() Method&lt;br&gt;
7 – Defining Lists Using Comprehension Syntax&lt;br&gt;
Chapter Three Exercise&lt;br&gt;
Solution&lt;br&gt;
&lt;strong&gt;BONUS Jupyter-Ready Interactive Book File&lt;/strong&gt;&lt;br&gt;
Installing and Running Jupyter&lt;br&gt;
Downloading and Opening the Interactive Book File in Jupyter”&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/11985/hello-world-for-my-first-contribution-here-id-like-to-share-small-gift-free-python-beginner</guid>
<pubDate>Fri, 20 Feb 2026 20:06:19 +0000</pubDate>
</item>
<item>
<title>Best Time to Post on Social Media Tool</title>
<link>https://coderlegion.com/11857/best-time-to-post-on-social-media-tool</link>
<description>&lt;p&gt;This free tool converts your audience’s peak activity hours into your own time zone, so you can see the &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.beingoptimist.com/tools/best-time-to-post-on-social-media/&quot;&gt;best local times to post on each social platform&lt;/a&gt; and maximize engagement without any manual time‑zone math.&lt;/p&gt;
</description>
<category>Launches</category>
<guid isPermaLink="true">https://coderlegion.com/11857/best-time-to-post-on-social-media-tool</guid>
<pubDate>Tue, 17 Feb 2026 18:49:15 +0000</pubDate>
</item>
<item>
<title>My First Flow with Kestra.io</title>
<link>https://coderlegion.com/11144/my-first-flow-with-kestra-io</link>
<description>&lt;p&gt;As I'm learning more about &lt;a rel=&quot;nofollow&quot; href=&quot;https://go.kestra.io/k91sTC&quot;&gt;Kestra.io&lt;/a&gt;, the community, and the possible use cases, I wanted to build a small PoC (proof of concept) that resonated with me and leveraged a fair amount of the platform aspects so I could get some hands on learning beyond the existing tutorials and examples (which are great! Give them a try!).&lt;/p&gt;
&lt;p&gt;After talking with a coworker, I loved his daily reminder to log off scheduled on his calendar. This kind of daily ritual is really great for wrapping up your day and leaving work at work. Or at least trying to. &lt;/p&gt;
&lt;p&gt;I told him I was going to 100% steal his idea.&lt;/p&gt;
&lt;p&gt;Let me walk you through what I'm doing and learning as I go. This won't be a tutorial, but you can see how I learn and explore a new platform, following along with links back to the docs if you want to learn even more.&lt;/p&gt;
&lt;h3 id=&quot;requirements-of-the-poc&quot;&gt;Requirements of the PoC&lt;/h3&gt;
&lt;p&gt;I wanted to make sure this PoC covered multiple aspects of the platform, even if it might be a little trivial at times. I wanted to see the dashboards populate with some data, use a few &lt;a rel=&quot;nofollow&quot; href=&quot;https://go.kestra.io/3LbDFD&quot;&gt;plugins&lt;/a&gt;, and start to see the difference between the OSS Edition you can access for free and the paid experience with the Kestra &lt;a rel=&quot;nofollow&quot; href=&quot;https://go.kestra.io/efPFOh&quot;&gt;Enterprise Edition&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;I needed to interact with the following during my daily or weekly shutdown:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Scheduler/chron - what? You think I would remember to do this daily?&lt;/li&gt;
&lt;li&gt;Slack - our main communication tool and where my weekly recap ultimately needed to land, but also where I'll get the reminder&lt;/li&gt;
&lt;li&gt;GitHub - no surprise here, where the bugs, feature requests, issues, and PRs live for the source code and docs&lt;/li&gt;
&lt;li&gt;Notion - Throw this recap into my &quot;Weekly recaps&quot; so it doesn't get lost on Slack&lt;/li&gt;
&lt;li&gt;Google Calendar - Read my calendar and remind me who I talked to today or this week&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;All of these looked like plugins that should reasonably work well for my PoC. Excellent!&lt;/p&gt;
&lt;p&gt;For my first iteration, I won't make this too terribly smart and it will prompt and grab the same info everyday, just for that day. Maybe v2 will do something more comprehensive on Friday when I actually write my weekly recap.&lt;/p&gt;
&lt;p&gt;After a quick search through the &lt;a rel=&quot;nofollow&quot; href=&quot;https://go.kestra.io/fW0AX8&quot;&gt;Blueprints&lt;/a&gt;, I didn't find anything specific that I wanted to build off of, so I ended up starting from scratch. I usually recommend building from or extending tutorials and existing examples.&lt;/p&gt;
&lt;p&gt;I should also mention I'm building this flow with the flow code editor, directly editing the YAML. &lt;/p&gt;
&lt;h3 id=&quot;what-s-a-plugin-&quot;&gt;What's a plugin?&lt;/h3&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://go.kestra.io/3LbDFD&quot;&gt;Plugins&lt;/a&gt; are the essential building blocks for tasks and triggers in your workflow in Kestra. This might be a subtle shift from some platforms where the plugins are extensions or integrations, which they are in Kestra too, but they also include core functionality. You'll probably end up using several plugins in your flow, and many more if you are doing something non-trivial.&lt;/p&gt;
&lt;p&gt;See if you can spot the plugins I use in the YAML snippets below. You'll see a mix of 3rd party integrations and core functionality.&lt;/p&gt;
&lt;h3 id=&quot;kestra-ui&quot;&gt;Kestra UI&lt;/h3&gt;
&lt;p&gt;Learning new tools always requires spending a little time mapping your existing knowledge to the UI and terms. &lt;/p&gt;
&lt;p&gt;One of the things that I really struggled with early on was the purple, primary action button in the top right corner of the UI changes depending on what screen I'm on. So it could be used to create a flow, execute a flow, create a user (in Kestra &lt;a rel=&quot;nofollow&quot; href=&quot;https://go.kestra.io/efPFOh&quot;&gt;Enterprise Edition&lt;/a&gt;), etc. &lt;/p&gt;
&lt;p&gt;Leave me a comment and let me know how you feel about this UI design choice. Is it intuitive for you? Do you want a more descriptive button name?&lt;/p&gt;
&lt;h3 id=&quot;triggers&quot;&gt;Triggers&lt;/h3&gt;
&lt;p&gt;You probably want to do something when something happens, whether that's a moment in time or based on an event like a form being submitted or new data arriving. You need a &lt;a rel=&quot;nofollow&quot; href=&quot;https://go.kestra.io/XWhPvc&quot;&gt;trigger&lt;/a&gt; for that. For my PoC, I want this to run every weekday around 4pm, when I'm thinking about wrapping up for the day. &lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;triggers:
  - id: daily_shutdown
    type: io.kestra.plugin.core.trigger.Schedule
    #UTC Austin @ 4pm (could add timezone), except weekends
    cron: 0 22 * * 1-5
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I like these at the top of the YAML because they show me exactly when this flow happens.&lt;/p&gt;
&lt;h3 id=&quot;tasks&quot;&gt;Tasks&lt;/h3&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://go.kestra.io/epVpkj&quot;&gt;Flows&lt;/a&gt; require at least one &lt;a rel=&quot;nofollow&quot; href=&quot;https://go.kestra.io/hE2je5&quot;&gt;task&lt;/a&gt;. You simply cannot save a flow without a task. This makes sense because why would you have a flow that does nothing. &lt;/p&gt;
&lt;p&gt;I'll have several tasks in my flow, but I want to make sure I see a reminder or prompt in Slack. That will look something like this with the &lt;a rel=&quot;nofollow&quot; href=&quot;https://go.kestra.io/yUdbHp&quot;&gt;Slack plugin&lt;/a&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;id: send_reminder_message_to_slack
    type: io.kestra.plugin.notifications.slack.SlackIncomingWebhook
    url: &quot;{{ secret('SLACK_WEBHOOK') }}&quot;
    payload: |
      {
        &quot;text&quot;: &quot;Time to shutdown&quot;
      }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I'll need to revisit this to add something more interesting to the payload (like info from other tasks), but sending a Slack message is as easy as getting the tokens and secrets configured.&lt;/p&gt;
&lt;p&gt;Eventually, it will look like this:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;id: send_meetings_to_slack
      type: io.kestra.plugin.notifications.slack.SlackIncomingWebhook
      url: &quot;{{ secret('SLACK_WEBHOOK') }}&quot;
      payload: |
        {
          &quot;text&quot;: &quot;Here are the meetings you went to today: {{ outputs.get_calendar_events.events }} &quot;
        }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;But we'll talk more about outputs a bit later.&lt;/p&gt;
&lt;h4 id=&quot;logging&quot;&gt;Logging&lt;/h4&gt;
&lt;p&gt;I ended up doing a lot of logging tasks between the tasks that used plugins, mostly to verify what was coming back in the response and if I wanted to do anything else. &lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;- id: get_cal_list_log
    type: io.kestra.plugin.core.log.Log
    message: &quot;{{ outputs.get_calendar_events }}&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I'm still having some trouble getting the Google Calendar plugin to send more than an empty array back, so for now I'm logging the whole object I get back to see if I get any clues. &lt;/p&gt;
&lt;h4 id=&quot;flowable-tasks&quot;&gt;Flowable tasks&lt;/h4&gt;
&lt;p&gt;I threw in a &lt;a rel=&quot;nofollow&quot; href=&quot;https://go.kestra.io/czIlIi&quot;&gt;flowable task&lt;/a&gt; because depending on how you classify a meeting, I don't have meetings everyday. I do have a blocker for lunch everyday, which is technically a meeting...&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;- id: if
    type: io.kestra.plugin.core.flow.If
    condition: &quot; {{ outputs.get_calendar_events.events  == [] }} &quot;
    then:
    - id: send_no_meetings_to_slack
      type: io.kestra.plugin.notifications.slack.SlackIncomingWebhook
      url: &quot;{{ secret('SLACK_WEBHOOK') }}&quot;
      payload: |
        {
          &quot;text&quot;: &quot;Hooray! No meetings today.&quot;
        }
    else:
    - id: send_meetings_to_slack
      type: io.kestra.plugin.notifications.slack.SlackIncomingWebhook
      url: &quot;{{ secret('SLACK_WEBHOOK') }}&quot;
      payload: |
        {
          &quot;text&quot;: &quot;Here are the meetings you went to today: {{ outputs.get_calendar_events.events }} &quot;
        }

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I really like the human readable way this, well, reads. If, then, else shows me what the condition is and what's going to happen for the two branches.&lt;/p&gt;
&lt;p&gt;I know some platforms allow you to define a default path for flows, but I didn't see that here, which I actually really like. Introducing a default path feels confusing when you should rely on the evaluation of the condition.&lt;/p&gt;
&lt;p&gt;As I mentioned above this is currently always getting  &lt;code&gt;[]&lt;/code&gt; back from the Google Calendar plugin, so apparently I never have meetings, but when it works I'll have that taken care of with this flowable task. &lt;/p&gt;
&lt;h3 id=&quot;outputs&quot;&gt;Outputs&lt;/h3&gt;
&lt;p&gt;I added an &lt;a rel=&quot;nofollow&quot; href=&quot;https://go.kestra.io/L78byv&quot;&gt;output&lt;/a&gt; that was trivial because I was most likely going to send the summary of the work I did to Slack in the message payload and wasn't sure if there would be any difference if I did or didn't have an output. &lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;outputs:
  - id: sent_bool
    type: BOOLEAN
    value: &quot;true&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In the execution outputs, I wanted to see something I added and where it would show up in the UI. Again, trivial, because in this iteration I don't anticipate this flow making data available for a subsequent flow.&lt;/p&gt;
&lt;p&gt;I did use outputs across the various tasks too, so I could use the data from one task in the following task. &lt;/p&gt;
&lt;h3 id=&quot;revisions&quot;&gt;Revisions&lt;/h3&gt;
&lt;p&gt;Don't do what I did as a lazy developer and put my secrets right into my flow. They stay in your &lt;a rel=&quot;nofollow&quot; href=&quot;https://go.kestra.io/QxmWNf&quot;&gt;revision&lt;/a&gt; history. Plain text. Oops.&lt;/p&gt;
&lt;p&gt;Secret handling in the Enterprise Edition is too easy to not use, so don't put your secrets plain text in your flow. Keep your secrets secret. Then use an expression like below:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;{{ secret('SLACK_WEBHOOK') }}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Revisions become really powerful as you are making changes to your flow, particularly while you are building and testing because sometimes a change doesn't work like you want, and through revisions you can see exactly what changes were made.&lt;/p&gt;
&lt;h3 id=&quot;where-i-m-at&quot;&gt;Where I'm at&lt;/h3&gt;
&lt;p&gt;I love that I can export an image of my topology directly in Kestra.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cd5z8jmar0p7kon88agg.png&quot; alt=&quot;Image description&quot;&gt;&lt;/p&gt;
&lt;p&gt;So for now I don't have a &quot;working&quot; increment that I'm happy with. While it is firing every day, I still need to dig into why Google Calendar thinks I have no meetings... when I definitely have meetings. I'm currently playing around with public/private event visibility to see if that changes anything. More on that next week I'm sure when I also add the Notion and GitHub plugins.&lt;/p&gt;
&lt;p&gt;Have you built something with Kestra? Link me to your repo in a comment below. &lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/11144/my-first-flow-with-kestra-io</guid>
<pubDate>Fri, 06 Feb 2026 13:00:00 +0000</pubDate>
</item>
<item>
<title>Getting Started with esbuild in Angular</title>
<link>https://coderlegion.com/9475/getting-started-with-esbuild-in-angular</link>
<description>&lt;h4 id=&quot;creating-a-new-angular-project-with-the-new-build-system&quot;&gt;Creating a New Angular Project with the New Build System&lt;/h4&gt;
&lt;p&gt;Angular’s developer experience took a &lt;strong&gt;huge leap forward&lt;/strong&gt; when it adopted &lt;strong&gt;esbuild&lt;/strong&gt; as the default build engine.&lt;/p&gt;
&lt;p&gt;If you remember:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Slow rebuilds&lt;/li&gt;
&lt;li&gt;Long &lt;code&gt;ng serve&lt;/code&gt; startup times&lt;/li&gt;
&lt;li&gt;Heavy Webpack configs&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That era is &lt;strong&gt;officially over&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;This guide shows:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What esbuild means for Angular&lt;/li&gt;
&lt;li&gt;How to create a new Angular project using it&lt;/li&gt;
&lt;li&gt;What changes for developers&lt;/li&gt;
&lt;li&gt;How to customize it safely&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id=&quot;what-is-esbuild-and-why-angular-switched-&quot;&gt;What Is esbuild (and Why Angular Switched)?&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;esbuild&lt;/strong&gt; is an extremely fast JavaScript bundler written in Go.&lt;/p&gt;
&lt;p&gt;Angular adopted esbuild to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Drastically reduce build times&lt;/li&gt;
&lt;li&gt;Improve Hot Module Replacement (HMR)&lt;/li&gt;
&lt;li&gt;Simplify the build pipeline&lt;/li&gt;
&lt;li&gt;Improve DX for large apps&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt; You &lt;strong&gt;do not install esbuild manually&lt;/strong&gt;&lt;br&gt;
 Angular CLI handles it for you&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;angular-esbuild-the-big-shift&quot;&gt;Angular + esbuild: The Big Shift&lt;/h3&gt;
&lt;p&gt;Modern Angular (v17+) uses:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;esbuild&lt;/strong&gt; for development&lt;/li&gt;
&lt;li&gt;Optimized pipelines for production&lt;/li&gt;
&lt;li&gt;Webpack only for legacy or advanced edge cases&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For most apps:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;esbuild is already the default&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h3 id=&quot;step-1-create-a-new-angular-project-esbuild-by-default-&quot;&gt;Step 1️⃣ Create a New Angular Project (esbuild by Default)&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;npm install -g @angular/cli
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;ng new my-esbuild-app
cd my-esbuild-app
ng serve
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;✅ That’s it.&lt;br&gt;
You are already using &lt;strong&gt;esbuild&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;No flags.&lt;br&gt;
No config.&lt;br&gt;
No setup.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;step-2-verify-esbuild-is-being-used&quot;&gt;Step 2️⃣ Verify esbuild Is Being Used&lt;/h3&gt;
&lt;p&gt;Run:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;ng build
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You’ll notice:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Much faster builds&lt;/li&gt;
&lt;li&gt;Smaller output&lt;/li&gt;
&lt;li&gt;Cleaner logs&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In &lt;code&gt;angular.json&lt;/code&gt;, you’ll see:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-json&quot;&gt;&quot;builder&quot;: &quot;@angular-devkit/build-angular:application&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;⬆️ This builder internally uses &lt;strong&gt;esbuild&lt;/strong&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;step-3-enable-faster-dev-experience-hmr-&quot;&gt;Step 3️⃣ Enable Faster Dev Experience (HMR)&lt;/h3&gt;
&lt;p&gt;Angular + esbuild supports &lt;strong&gt;fast HMR&lt;/strong&gt; out of the box.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;ng serve --hmr
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;dx-improvement&quot;&gt;DX Improvement&lt;/h4&gt;
&lt;p&gt;✔ State preserved&lt;br&gt;
✔ Instant updates&lt;br&gt;
✔ No full page reload&lt;/p&gt;
&lt;p&gt;Perfect for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Forms&lt;/li&gt;
&lt;li&gt;Dashboards&lt;/li&gt;
&lt;li&gt;Signal-based apps&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id=&quot;step-4-esbuild-standalone-angular-recommended-&quot;&gt;Step 4️⃣ esbuild + Standalone Angular (Recommended)&lt;/h3&gt;
&lt;p&gt;Modern Angular works best with:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Standalone components&lt;/li&gt;
&lt;li&gt;esbuild&lt;/li&gt;
&lt;li&gt;Signals&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-ts&quot;&gt;bootstrapApplication(AppComponent, {
  providers: [
    provideHttpClient()
  ]
});
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;No modules.&lt;br&gt;
No ceremony.&lt;br&gt;
Faster builds.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;step-5-using-assets-styles-amp-environment-files&quot;&gt;Step 5️⃣ Using Assets, Styles &amp;amp; Environment Files&lt;/h3&gt;
&lt;p&gt;esbuild handles:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;CSS&lt;/li&gt;
&lt;li&gt;SCSS&lt;/li&gt;
&lt;li&gt;Assets&lt;/li&gt;
&lt;li&gt;Environment replacements&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;angular.json&lt;/code&gt; (no custom config needed):&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-json&quot;&gt;&quot;assets&quot;: [&quot;src/assets&quot;],
&quot;styles&quot;: [&quot;src/styles.scss&quot;]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Environment switching still works:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-ts&quot;&gt;import { environment } from '../environments/environment';
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;h3 id=&quot;step-6-typescript-path-aliases-amp-esbuild&quot;&gt;Step 6️⃣ TypeScript, Path Aliases &amp;amp; esbuild&lt;/h3&gt;
&lt;p&gt;esbuild respects &lt;code&gt;tsconfig.json&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-json&quot;&gt;{
  &quot;compilerOptions&quot;: {
    &quot;paths&quot;: {
      &quot;@core/*&quot;: [&quot;src/app/core/*&quot;]
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;✔ Works out of the box&lt;br&gt;
✔ No webpack aliases required&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;step-7-esbuild-signals-dx-sweet-spot&quot;&gt;Step 7️⃣ esbuild + Signals = DX Sweet Spot&lt;/h3&gt;
&lt;p&gt;esbuild pairs extremely well with:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Angular Signals&lt;/li&gt;
&lt;li&gt;Zoneless change detection&lt;/li&gt;
&lt;li&gt;RxJS interop&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Why?&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Faster rebuilds&lt;/li&gt;
&lt;li&gt;Instant feedback loops&lt;/li&gt;
&lt;li&gt;Less mental overhead&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is where &lt;strong&gt;modern Angular truly shines&lt;/strong&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;what-you-cannot-do-yet-with-esbuild&quot;&gt;What You &lt;em&gt;Cannot&lt;/em&gt; Do (Yet) with esbuild&lt;/h3&gt;
&lt;p&gt;Be aware of limitations:&lt;/p&gt;
&lt;p&gt;❌ Custom Webpack loaders&lt;br&gt;
❌ Complex build-time plugins&lt;br&gt;
❌ Non-standard bundling hacks&lt;/p&gt;
&lt;p&gt;If you need these:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You may still opt into Webpack&lt;/li&gt;
&lt;li&gt;But &lt;strong&gt;most apps don’t need it anymore&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id=&quot;migrating-an-existing-angular-app-to-esbuild&quot;&gt;Migrating an Existing Angular App to esbuild&lt;/h3&gt;
&lt;p&gt;If your app is Angular 16+:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;ng update @angular/core @angular/cli
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then update &lt;code&gt;angular.json&lt;/code&gt; to use:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-json&quot;&gt;&quot;builder&quot;: &quot;@angular-devkit/build-angular:application&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That’s usually enough.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;performance-comparison-real-impact-&quot;&gt;Performance Comparison (Real Impact)&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;&lt;th&gt;Task             &lt;/th&gt;&lt;th&gt;Old (Webpack) &lt;/th&gt;&lt;th&gt;New (esbuild)&lt;/th&gt;&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;ng serve&lt;/code&gt; start &lt;/td&gt;&lt;td&gt;Slow          &lt;/td&gt;&lt;td&gt;⚡ Fast&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Rebuild          &lt;/td&gt;&lt;td&gt;Medium        &lt;/td&gt;&lt;td&gt;⚡⚡ Instant&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;HMR              &lt;/td&gt;&lt;td&gt;Unstable      &lt;/td&gt;&lt;td&gt;Smooth&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Config           &lt;/td&gt;&lt;td&gt;Heavy         &lt;/td&gt;&lt;td&gt;Minimal&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;hr&gt;
&lt;h3 id=&quot;why-this-matters-for-developer-experience&quot;&gt;Why This Matters for Developer Experience&lt;/h3&gt;
&lt;p&gt;esbuild enables:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Faster feedback loops&lt;/li&gt;
&lt;li&gt;Better debugging&lt;/li&gt;
&lt;li&gt;Happier developers&lt;/li&gt;
&lt;li&gt;Scalable teams&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is not a “nice-to-have” change —&lt;br&gt;
it’s a &lt;strong&gt;productivity multiplier&lt;/strong&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;final-thoughts&quot;&gt;Final Thoughts&lt;/h3&gt;
&lt;p&gt;Angular didn’t just adopt a faster bundler.&lt;br&gt;
It &lt;strong&gt;rethought the entire developer workflow&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;With:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;esbuild&lt;/li&gt;
&lt;li&gt;Standalone APIs&lt;/li&gt;
&lt;li&gt;Signals&lt;/li&gt;
&lt;li&gt;Better DevTools&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Angular is now &lt;strong&gt;one of the fastest frameworks to develop with&lt;/strong&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;h4 id=&quot;tl-dr&quot;&gt;TL;DR&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;New Angular projects use esbuild by default&lt;/li&gt;
&lt;li&gt;No manual setup required&lt;/li&gt;
&lt;li&gt;Builds are dramatically faster&lt;/li&gt;
&lt;li&gt;HMR is smooth and reliable&lt;/li&gt;
&lt;li&gt;Best paired with standalone + signals&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;p&gt; new application builder – using modern tools esbuild and Vite &lt;br&gt;
 ng update @angular/cli --name use-application-builder&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/9475/getting-started-with-esbuild-in-angular</guid>
<pubDate>Fri, 09 Jan 2026 18:35:47 +0000</pubDate>
</item>
<item>
<title>10. FSM_API for Non-Coders: A Big Picture Overview (From our Documentation)</title>
<link>https://coderlegion.com/7412/10-fsmapi-for-non-coders-a-big-picture-overview-from-our-documentation</link>
<description>&lt;p&gt;We believe the most reliable software logic is logic everyone can understand.&lt;/p&gt;
&lt;p&gt;The complex systems that drive modern applications—from character AI in games to business workflows and industrial robotics—are often best articulated not by a developer, but by the subject matter experts. These experts instinctively express domain behavior as an organized set of phases and rules, often visualized as hierarchical Finite State Machines.&lt;/p&gt;
&lt;p&gt;This natural structure is the foundation of the Finite State Machine (FSM), and it is why we created this overview. FSMs are not merely a developer’s tool; they are a universal language. This guide is designed to bridge the gap, enabling your domain expertise to translate seamlessly and reliably into the design of robust, predictable, and maintainable software systems.&lt;/p&gt;
&lt;p&gt;Without any further ado:&lt;/p&gt;
&lt;h2 id=&quot;10-fsm-api-for-non-coders-a-big-picture-overview&quot;&gt;10. FSM_API for Non-Coders: A Big Picture Overview&lt;/h2&gt;
&lt;p&gt; Have you ever tried to describe a complex process to someone, like making coffee ☕ or building a LEGO castle , and found yourself saying, &quot;First you do this, &lt;em&gt;then&lt;/em&gt; if that happens, you do this other thing, &lt;em&gt;otherwise&lt;/em&gt; you do something else entirely&quot;? If so, you've already grasped the core idea behind &lt;strong&gt;Finite State Machines (FSMs)&lt;/strong&gt;!&lt;/p&gt;
&lt;p&gt;At its heart, FSM_API is a powerful tool designed to make complex software behaviors predictable, organized, and easier to manage, even if you don't write code yourself. It helps turn messy, &quot;if-this-then-that&quot; logic into clear, step-by-step instructions.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;what-is-a-finite-state-machine-fsm-the-simple-version-&quot;&gt;What is a Finite State Machine (FSM)? (The Simple Version)&lt;/h3&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;Visuals/TrafficLightFSM.png&quot; target=&quot;_blank&quot;&gt;&lt;br&gt;
    &lt;img src=&quot;Visuals/TrafficLightFSM.png&quot; alt=&quot;A state machine diagram of a traffic light.&quot; height=&quot;200&quot; style=&quot;display: block;&quot;&gt;&lt;br&gt;
&lt;/a&gt;&lt;br&gt;
&lt;em&gt;A simple, real-world example of an FSM: a traffic light.&lt;/em&gt;&lt;br&gt;
&lt;br&gt;&lt;br&gt;
Imagine anything that changes its behavior based on its current situation.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A &lt;strong&gt;traffic light&lt;/strong&gt; is either Red, Yellow, or Green. It can't be Red and Green at the same time. It changes from Green to Yellow only, not directly to Red.&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;door&lt;/strong&gt; is either Closed, Opening, Open, or Closing.&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;game character&lt;/strong&gt; might be Idle, Walking, Running, Jumping, or Attacking.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;An FSM is just a way to formally describe these behaviors:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;States:&lt;/strong&gt; These are the specific &quot;situations&quot; or &quot;modes&quot; an entity can be in at any given moment (like &quot;Green&quot; for a traffic light, or &quot;Walking&quot; for a character). An FSM is always in &lt;strong&gt;exactly one state&lt;/strong&gt; at a time.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Transitions:&lt;/strong&gt; These are the &lt;strong&gt;rules&lt;/strong&gt; that dictate how an entity moves from one state to another (e.g., from &quot;Green&quot; to &quot;Yellow&quot; when a timer runs out, or from &quot;Walking&quot; to &quot;Jumping&quot; when the player presses the jump button).&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;FSM_API helps developers build and manage these FSMs in a clear and organized way, making sure all the rules are followed and behaviors are predictable.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;how-fsm-api-helps-you-even-if-you-don-t-code-&quot;&gt;How FSM_API Helps You (Even if You Don't Code)&lt;/h3&gt;
&lt;p&gt;While FSM_API is a coding tool, its benefits directly impact anyone involved in designing or understanding the behavior of a system, like game designers, project managers, or QA testers.&lt;/p&gt;
&lt;h4 id=&quot;1-clearer-communication&quot;&gt;1. &lt;strong&gt;Clearer Communication&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;Visuals/Character_AI_FSM.png&quot; target=&quot;_blank&quot;&gt;&lt;br&gt;
    &lt;img src=&quot;Visuals/Character_AI_FSM.png&quot; alt=&quot;A flowchart of an enemy AI, showing states like Patrolling and Chasing.&quot; height=&quot;200&quot; style=&quot;display: block;&quot;&gt;&lt;br&gt;
&lt;/a&gt;&lt;br&gt;
&lt;em&gt;An FSM diagram like this gives the whole team a clear map of how the AI should behave.&lt;/em&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;
&lt;p&gt;Instead of ambiguous descriptions, an FSM provides a visual and logical map of how something behaves. Everyone on the team can look at an FSM diagram and immediately understand the flow.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Example:&lt;/strong&gt; &quot;The enemy moves from 'Patrolling' to 'Chasing' when it 'sees' the player.&quot; This becomes a clear transition rule.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;2-fewer-bugs-amp-more-reliable-behavior&quot;&gt;2. &lt;strong&gt;Fewer Bugs &amp;amp; More Reliable Behavior&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;When behaviors are explicitly defined, it's much harder for unexpected &quot;edge cases&quot; or illogical situations to occur (like a character trying to jump while they are already dead). This leads to more stable and reliable software.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Benefit:&lt;/strong&gt; Less time spent fixing frustrating, unpredictable issues.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;3-easier-to-change-and-expand&quot;&gt;3. &lt;strong&gt;Easier to Change and Expand&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;Because the behavior is modular (broken into states and transitions), adding new features or changing existing ones becomes much simpler. You don't have to overhaul the entire system.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Example:&lt;/strong&gt; Want to add a &quot;Stealth&quot; state to your enemy? You simply add the new state and define how to get into and out of it, without breaking the existing &quot;Patrol&quot; or &quot;Chase&quot; logic.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;4-better-performance&quot;&gt;4. &lt;strong&gt;Better Performance&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;FSM_API is built to be fast. This means your games or applications will run smoother, even when managing many complex characters or systems at once.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Benefit:&lt;/strong&gt; A more responsive and enjoyable experience for the end-user.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;5-empowers-non-coders-the-context-connection-&quot;&gt;5. &lt;strong&gt;Empowers Non-Coders (The &quot;Context&quot; Connection)&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;Visuals/FSM_Context_Relationship.png&quot; target=&quot;_blank&quot;&gt;&lt;br&gt;
    &lt;img src=&quot;Visuals/FSM_Context_Relationship.png&quot; alt=&quot;A diagram showing the FSM as a brain controlling the game object as a body.&quot; height=&quot;200&quot; style=&quot;display: block;&quot;&gt;&lt;br&gt;
&lt;/a&gt;&lt;br&gt;
&lt;em&gt;The FSM (the brain) contains the logic, while the Context (the body) is the actual object that performs the actions.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;When a developer uses FSM_API, they link the FSM to an actual &quot;thing&quot; in your game or application (this &quot;thing&quot; is called the &lt;strong&gt;Context&lt;/strong&gt;).&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Example:&lt;/strong&gt; A game designer might say, &quot;When the character is in the 'Jumping' state, I want them to play the 'Jump_Anim' and add an upward force.&quot; The developer then connects the FSM's &quot;Jumping&quot; state to the &lt;strong&gt;character's script&lt;/strong&gt; (their Context) which knows how to play animations and apply force.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Benefit:&lt;/strong&gt; This clear connection means designers can specify behavior in terms of game actions, and developers can implement it precisely, using the FSM as the bridge.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id=&quot;who-is-this-for-&quot;&gt;Who is This For?&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Game Designers:&lt;/strong&gt; Visualize and plan complex character AI, game mechanics, and UI flows with clarity.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Project Managers:&lt;/strong&gt; Understand the scope and complexity of features related to dynamic behaviors.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;QA Testers:&lt;/strong&gt; Clearly define and test expected behaviors in various scenarios.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Technical Writers:&lt;/strong&gt; Document system behaviors accurately and concisely.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;FSM_API provides a common language and structure that helps bridge the gap between design and implementation, leading to more robust, understandable, and maintainable applications. We are actively working on integrating this into &lt;strong&gt;AnyApp&lt;/strong&gt;, and also preparing it for submission to the &lt;strong&gt;Unity Asset Store&lt;/strong&gt; so developers everywhere can benefit!&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;want-to-learn-more-about-development-&quot;&gt;Want to Learn More About Development?&lt;/h3&gt;
&lt;p&gt;If you're interested in learning about the coding side of things from a clear, practical perspective, we highly recommend checking out &lt;strong&gt;Tim Corey&lt;/strong&gt;. He's widely recognized as a fantastic resource for software development, and you can find his insightful content, courses, and community on his platform, &lt;strong&gt;DevForge&lt;/strong&gt;, at &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.iamtimcorey.com/&quot;&gt;iamtimcorey.com&lt;/a&gt;. &lt;/p&gt;
&lt;h3 id=&quot;resources-amp-code-&quot;&gt;Resources &amp;amp; Code:&lt;/h3&gt;
&lt;p&gt;The FSM Package (Unity Asset Store):&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://assetstore.unity.com/packages/slug/332450&quot;&gt;https://assetstore.unity.com/packages/slug/332450&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;NuGet Package (Non-Unity Core):&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://www.nuget.org/packages/TheSingularityWorkshop.FSM_API&quot;&gt;https://www.nuget.org/packages/TheSingularityWorkshop.FSM_API&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;GitHub Repository:&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/TrentBest/FSM_API&quot;&gt;https://github.com/TrentBest/FSM_API&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Support Our Work:&lt;/p&gt;
&lt;p&gt;Patreon Page:&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://www.patreon.com/c/TheSingularityWorkshop&quot;&gt;https://www.patreon.com/c/TheSingularityWorkshop&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; Support Us (PayPal Donation):&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://www.paypal.com/donate/?hosted_button_id=3Z7263LCQMV9J&quot;&gt;https://www.paypal.com/donate/?hosted_button_id=3Z7263LCQMV9J&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=17272823008937591128&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
</description>
<category>C#</category>
<guid isPermaLink="true">https://coderlegion.com/7412/10-fsmapi-for-non-coders-a-big-picture-overview-from-our-documentation</guid>
<pubDate>Sat, 15 Nov 2025 22:14:52 +0000</pubDate>
</item>
<item>
<title>03. Getting Started with FSM_API in Pure C# (From our Documentation)</title>
<link>https://coderlegion.com/7375/03-getting-started-with-fsmapi-in-pure-c-from-our-documentation</link>
<description>&lt;p&gt;Previously we published a deep dive included with our documentation in our FSM_API nuget package for our truly unique feature, runtime recomposition/definition of our FSMs.  In this article we are sharing our document on Getting started in pure c#.  We showed you the power, now let us show you how easy it is to start using our 45kb API.  Embrace the pure digital power!&lt;/p&gt;
&lt;p&gt;Without further rambling:&lt;/p&gt;
&lt;p&gt; &lt;strong&gt;03. Getting Started with FSM_API in Pure C#&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt; Use FSM_API with pure C# classes — completely decoupled from Unity — for backend logic, simulations, AI, networking, or any state-based system.&lt;/p&gt;
&lt;p&gt;This guide shows how to use FSM_API in non-Unity environments (console, services, backends, robotics, etc.) with clean, minimal dependencies.&lt;/p&gt;
&lt;h3 id=&quot;install-fsm-api-into-your-c-project-using-nuget-package&quot;&gt;Install FSM_API into your c# project using Nuget Package&lt;/h3&gt;
&lt;p&gt;Within your preferred IDE find FSM_API within the NuGet Package Manager and click install.&lt;/p&gt;
&lt;h3 id=&quot;install-fsm-api-into-your-project-using-net-cli-&quot;&gt;Install FSM_API into your project using .NET CLI:&lt;/h3&gt;
&lt;p&gt;dotnet add package TheSingularityWorkshop.FSM_API&lt;/p&gt;
&lt;h3 id=&quot;integrate-the-api-into-your-project&quot;&gt;Integrate the API into your project&lt;/h3&gt;
&lt;p&gt;Integrating the API with any c# application is foremost establishing the heartbeat or cadence of when your FSMs operate.  &lt;/p&gt;
&lt;p&gt;Example c#:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-csharp&quot;&gt;FSM_API.Interaction.Update(&quot;YourProcessingGroupName&quot;);//Updates all FSMs registered to this processing group.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;consider the simplest integration possible, a console application as shown below:&lt;/p&gt;
&lt;p&gt;Example c#:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-csharp&quot;&gt;using TheSingularityWorkshop.FSM_API;

//Define the application context
SimpleDemoContext appContext = new SimpleDemoContext();

//now we enter a loop which will run indefinitely until the handle becomes invalid.
do
{
    //We make this update call which will then update the app fsm.  The app's
    FSM_API.Interaction.Update(&quot;Main&quot;);
} while (appContext.IsValid);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To help with this understanding we will describe an example below along with additional samples which are available on our samples repo.&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/TrentBest/SimpleDemos&quot;&gt;Samples Repo&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;what-this-example-will-demonstrate&quot;&gt;What This Example Will Demonstrate&lt;/h3&gt;
&lt;p&gt;We’ll simulate a basic character health lifecycle using FSM_API — all in &lt;strong&gt;pure C#&lt;/strong&gt;. This example is useful for understanding how FSM_API integrates into any standard C# application, offering the same benefits as in Unity.&lt;/p&gt;
&lt;p&gt;This example illustrates:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;How to define and link FSMs to standard C# classes as their context.&lt;/li&gt;
&lt;li&gt;How a game character transitions through health-related states (&lt;code&gt;Healthy&lt;/code&gt;, &lt;code&gt;Damaged&lt;/code&gt;, &lt;code&gt;Critically Injured&lt;/code&gt;, &lt;code&gt;Dead&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;How FSM_API makes these transitions declarative, clean, and maintainable.&lt;/li&gt;
&lt;li&gt;How to manually control the &quot;ticking&quot; of FSMs without relying on a game engine's built-in loop.&lt;/li&gt;
&lt;li&gt;How FSMs can be revived and continue operating even after simulated &quot;death.&quot;&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;simulation-flow&quot;&gt;Simulation Flow&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;The player starts in the &lt;strong&gt;Healthy&lt;/strong&gt; state.&lt;/li&gt;
&lt;li&gt;Over several ticks, they take damage, triggering transitions to:&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Damaged&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Critically Injured&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Dead&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;After death, a revive command is issued.&lt;/li&gt;
&lt;li&gt;Health is restored.&lt;/li&gt;
&lt;li&gt;The FSM automatically transitions back to &lt;strong&gt;Healthy&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;All output is printed to the console to simulate animation, audio, and event feedback — ideal for unit tests or backend game systems.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;-step-1-define-your-pure-c-context&quot;&gt;✅ Step 1: Define Your Pure C# Context&lt;/h3&gt;
&lt;p&gt;Create a standard C# class to represent the &quot;thing&quot; your FSM will manage — like a character, connection, pipeline, or subsystem. This class will hold the data and methods that your FSM's states will interact with.&lt;/p&gt;
&lt;p&gt;It must implement the &lt;code&gt;IStateContext&lt;/code&gt; interface. Recall from the &lt;strong&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;01_Core_Concepts.md&quot;&gt;01. Core Concepts: Your Guide to FSM_API&lt;/a&gt;&lt;/strong&gt; that &lt;code&gt;IStateContext&lt;/code&gt; requires &lt;code&gt;Name&lt;/code&gt; and &lt;code&gt;IsValid&lt;/code&gt; properties.&lt;/p&gt;
&lt;h4 id=&quot;example-gamecharactercontext-cs&quot;&gt;Example: &lt;code&gt;GameCharacterContext.cs&lt;/code&gt;&lt;/h4&gt;
&lt;p&gt;Example c#:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-csharp&quot;&gt;using System;
using TheSingularityWorkshop.FSM_API;

public class GameCharacterContext : IStateContext
{
    private float _currentHealth = 100f;
    private int _currentAmmo = 10;
    private float _moveSpeed = 5f;
    private bool _isActive = true;
    private bool _isReviveCommandIssued = false;

    public float CurrentHealth =&amp;gt; _currentHealth;
    public int CurrentAmmo =&amp;gt; _currentAmmo;
    public float MoveSpeed =&amp;gt; _moveSpeed;

    // IStateContext Properties
    public string Name { get; set; }
    public bool IsValid =&amp;gt; _isActive; // FSM_API uses this to know if the context is still relevant

    public GameCharacterContext(string name)
    {
        Name = name;
        Console.WriteLine($&quot;{Name} context created.&quot;);
    }

    // Methods that FSM states will call to interact with this context
    public void TakeDamage(float amount)
    {
        _currentHealth -= amount;
        Console.WriteLine($&quot;{Name} took {amount} damage. Health: {CurrentHealth}&quot;);
    }

    public void SetActive(bool active)
    {
        _isActive = active;
        Console.WriteLine($&quot;{Name} active status set to {_isActive}.&quot;);
    }

    public void RestoreHealth(float amount)
    {
        _currentHealth += amount;
        if (_currentHealth &amp;gt; 100f) _currentHealth = 100f;
        Console.WriteLine($&quot;{Name} health restored to {CurrentHealth}.&quot;);
    }

    public void SimulateMovement()
    {
        Console.WriteLine($&quot;{Name} is moving at speed {MoveSpeed}.&quot;);
    }

    public void PlaySound(string soundName)
    {
        Console.WriteLine($&quot;{Name} playing sound: {soundName}&quot;);
    }

    // Methods for transition conditions
    public void IssueReviveCommand() =&amp;gt; _isReviveCommandIssued = true;
    public void ClearReviveCommand() =&amp;gt; _isReviveCommandIssued = false;
    public bool IsReviveCommandPending =&amp;gt; _isReviveCommandIssued;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;h3 id=&quot;-step-2-define-and-create-the-fsm&quot;&gt;✅ Step 2: Define and Create the FSM&lt;/h3&gt;
&lt;p&gt;With your context ready, you can now define your FSM using &lt;code&gt;FSM_API.CreateFiniteStateMachine()&lt;/code&gt; and its fluent builder pattern. Then, create an instance of that FSM, linking it to your &lt;code&gt;GameCharacterContext&lt;/code&gt;.&lt;/p&gt;
&lt;h4 id=&quot;example-purecsharpgameloop-cs&quot;&gt;Example: &lt;code&gt;PureCSharpGameLoop.cs&lt;/code&gt;&lt;/h4&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;Visuals/Character_Health_FSM.png&quot; target=&quot;_blank&quot;&gt;&lt;br&gt;
&lt;/a&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;img src=&quot;Visuals/Character_Health_FSM.png&quot; alt=&quot;A flowchart of the Character Health FSM showing states and transitions.&quot; height=&quot;200&quot; style=&quot;display: block;&quot;&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;br&gt;
&lt;em&gt;A flowchart of the Character Health FSM showing states and transitions.&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;
&lt;p&gt;This class will set up our FSM definition and manage the FSM instance within a simulated game loop.&lt;/p&gt;
&lt;p&gt;Example c#:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-csharp&quot;&gt;using System;
using TheSingularityWorkshop.FSM_API;

public class PureCSharpGameLoop
{
    private FSMHandle characterHealthFSM;
    private GameCharacterContext playerCharacter;

    public void SetupGame()
    {
        playerCharacter = new GameCharacterContext(&quot;Hero&quot;);

        // Define the FSM blueprint if it doesn't already exist.
        // The FSM definition is reusable across multiple instances.
        if (!FSM_API.Exists(&quot;CharacterHealthFSM&quot;))
        {
            FSM_API.CreateFiniteStateMachine(&quot;CharacterHealthFSM&quot;, processRate: 1, processingGroup: &quot;GameLogic&quot;)
                .State(&quot;Healthy&quot;,
                    onEnter: ctx =&amp;gt; ((GameCharacterContext)ctx).PlaySound(&quot;HappyTune&quot;),
                    onUpdate: ctx =&amp;gt; 
                        Console.WriteLine($&quot;{ctx.Name} is Healthy. Health: {((GameCharacterContext)ctx).CurrentHealth}&quot;),
                    onExit: ctx =&amp;gt; ((GameCharacterContext)ctx).PlaySound(&quot;SadTune&quot;))
                .State(&quot;Damaged&quot;,
                    onEnter: ctx =&amp;gt; ((GameCharacterContext)ctx).PlaySound(&quot;OuchSound&quot;),
                    onUpdate: ctx =&amp;gt; 
                        Console.WriteLine($&quot;{ctx.Name} is Damaged. Health: {((GameCharacterContext)ctx).CurrentHealth}&quot;))
                .State(&quot;CriticallyInjured&quot;,
                    onEnter: ctx =&amp;gt; ((GameCharacterContext)ctx).PlaySound(&quot;WarningAlarm&quot;),
                    onUpdate: ctx =&amp;gt; Console.WriteLine($&quot;{ctx.Name} is Critically Injured!&quot;))
                .State(&quot;Dead&quot;,
                    onEnter: ctx =&amp;gt; ((GameCharacterContext)ctx).PlaySound(&quot;DeathRattle&quot;),
                    onUpdate: ctx =&amp;gt; Console.WriteLine($&quot;{ctx.Name} is Dead.&quot;),
                    onExit: ctx =&amp;gt; ((GameCharacterContext)ctx).ClearReviveCommand())
                .WithInitialState(&quot;Healthy&quot;)
                .Transition(&quot;Healthy&quot;, &quot;Damaged&quot;, ctx =&amp;gt; 
                    ((GameCharacterContext)ctx).CurrentHealth &amp;lt;= 75 &amp;amp;&amp;amp; ((GameCharacterContext)ctx).CurrentHealth &amp;gt; 25)
                .Transition(&quot;Damaged&quot;, &quot;Healthy&quot;, ctx =&amp;gt; 
                    ((GameCharacterContext)ctx).CurrentHealth &amp;gt; 75)
                .Transition(&quot;Damaged&quot;, &quot;CriticallyInjured&quot;, ctx =&amp;gt; 
                    ((GameCharacterContext)ctx).CurrentHealth &amp;lt;= 25 &amp;amp;&amp;amp; ((GameCharacterContext)ctx).CurrentHealth &amp;gt; 0)
                .Transition(&quot;CriticallyInjured&quot;, &quot;Damaged&quot;, ctx =&amp;gt; 
                    ((GameCharacterContext)ctx).CurrentHealth &amp;gt; 25 &amp;amp;&amp;amp; ((GameCharacterContext)ctx).CurrentHealth &amp;lt;= 75)
                .Transition(&quot;CriticallyInjured&quot;, &quot;Dead&quot;, ctx =&amp;gt; 
                    ((GameCharacterContext)ctx).CurrentHealth &amp;lt;= 0)
                .Transition(&quot;Dead&quot;, &quot;Healthy&quot;, ctx =&amp;gt; 
                    ((GameCharacterContext)ctx).IsReviveCommandPending &amp;amp;&amp;amp; ((GameCharacterContext)ctx).CurrentHealth &amp;gt; 0)
                .BuildDefinition();
        }

        // Create a live FSM instance, associating it with our playerCharacter context.
        characterHealthFSM = FSM_API.CreateInstance(&quot;CharacterHealthFSM&quot;, playerCharacter);
        Console.WriteLine($&quot;FSM for {playerCharacter.Name} initialized to state: {characterHealthFSM.CurrentState}&quot;);
    }

    // Call this method from your main application loop to update the FSMs
    public void UpdateGameLogic() =&amp;gt; FSM_API.Update(&quot;GameLogic&quot;);

    // Helper methods for accessing character and FSM state
    public GameCharacterContext GetPlayerCharacter() =&amp;gt; playerCharacter;
    public string GetCharacterFSMState() =&amp;gt; characterHealthFSM.CurrentState;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;h3 id=&quot;-step-3-manual-update-loop&quot;&gt;✅ Step 3: Manual Update Loop&lt;/h3&gt;
&lt;p&gt;Since you don’t have an engine's &lt;code&gt;Update()&lt;/code&gt; or &lt;code&gt;FixedUpdate()&lt;/code&gt; loop, you'll explicitly &quot;tick&quot; the FSMs yourself from your main application loop or a dedicated manager. You'll call &lt;code&gt;FSM_API.Update()&lt;/code&gt; for the processing group you defined.&lt;/p&gt;
&lt;h4 id=&quot;example-program-cs-main-application-entry-point-&quot;&gt;Example: &lt;code&gt;Program.cs&lt;/code&gt; (Main Application Entry Point)&lt;/h4&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;Visuals/Simulation_Timeline.png&quot; target=&quot;_blank&quot;&gt;&lt;br&gt;
&lt;/a&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;img src=&quot;Visuals/Simulation_Timeline.png&quot; alt=&quot;A timeline of the 20-tick simulation showing key events and state changes.&quot; height=&quot;200&quot; style=&quot;display: block;&quot;&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;br&gt;
&lt;em&gt;A timeline of the 20-tick simulation showing key events and state changes.&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;
&lt;p&gt;Example c#:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-csharp&quot;&gt;using System;
using System.Threading; // For Thread.Sleep

public class Program
{
    public static void Main(string[] args)
    {
        Console.WriteLine(&quot;--- Starting Pure C# FSM Demo ---&quot;);

        var game = new PureCSharpGameLoop();
        game.SetupGame();
        var player = game.GetPlayerCharacter();

        for (int i = 0; i &amp;lt; 20; i++) // Simulate 20 game ticks
        {
            Console.WriteLine($&quot;\n--- Tick {i + 1} ---&quot;);

            // Simulate events that affect the character's health
            if (i == 2) player.TakeDamage(30);   // Health: 100 -&amp;gt; 70 (Healthy -&amp;gt; Damaged)
            if (i == 5) player.TakeDamage(20);   // Health: 70 -&amp;gt; 50 (Still Damaged)
            if (i == 8) player.TakeDamage(30);   // Health: 50 -&amp;gt; 20 (Damaged -&amp;gt; Critically Injured)
            if (i == 10) player.TakeDamage(20);  // Health: 20 -&amp;gt; 0 (Critically Injured -&amp;gt; Dead)
            if (i == 12) player.IssueReviveCommand(); // Issue revive command
            if (i == 13) player.RestoreHealth(100);    // Restore health, FSM should transition Dead -&amp;gt; Healthy

            // Advance the FSMs in the &quot;GameLogic&quot; processing group
            game.UpdateGameLogic();

            Console.WriteLine($&quot;Current FSM State: {game.GetCharacterFSMState()}&quot;);
            Thread.Sleep(500); // Optional: pause for half a second to observe output
        }

        Console.WriteLine(&quot;\n--- FSM Demo Finished ---&quot;);
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;h3 id=&quot;running-the-example&quot;&gt;Running the Example&lt;/h3&gt;
&lt;p&gt;To run this pure C# FSM example:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Create a Console App Project&lt;/strong&gt; in your preferred IDE (e.g., Visual Studio, VS Code with C# extension).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Add FSM_API Reference:&lt;/strong&gt;&lt;ul&gt;
&lt;li&gt;If FSM_API is available on NuGet, add it via the NuGet Package Manager.&lt;/li&gt;
&lt;li&gt;Otherwise, manually add a reference to the &lt;code&gt;TheSingularityWorkshop.FSM_API.dll&lt;/code&gt; file.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Add Code Files:&lt;/strong&gt;&lt;ul&gt;
&lt;li&gt;Create &lt;code&gt;GameCharacterContext.cs&lt;/code&gt; and paste the code from Step 1.&lt;/li&gt;
&lt;li&gt;Create &lt;code&gt;PureCSharpGameLoop.cs&lt;/code&gt; and paste the code from Step 2.&lt;/li&gt;
&lt;li&gt;Replace the content of &lt;code&gt;Program.cs&lt;/code&gt; with the code from Step 3.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Run the App&lt;/strong&gt; and observe the FSM transitions and console output, which will show your character moving through different health states.&lt;/li&gt;
&lt;/ol&gt;
&lt;hr&gt;
&lt;h3 id=&quot;-summary&quot;&gt;✅ Summary&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;FSM_API works seamlessly outside of Unity and other game engines, providing a powerful FSM solution for any pure C# application.&lt;/li&gt;
&lt;li&gt;You define your application's data models or entities as classes that implement the &lt;strong&gt;&lt;code&gt;IStateContext&lt;/code&gt;&lt;/strong&gt; interface.&lt;/li&gt;
&lt;li&gt;FSM definition and instantiation logic remain consistent with Unity usage, using &lt;code&gt;FSM_API.CreateFiniteStateMachine()&lt;/code&gt; and &lt;code&gt;FSM_API.CreateInstance()&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;You gain explicit control over when FSMs process their logic by calling &lt;code&gt;FSM_API.Update(&quot;YourGroupName&quot;)&lt;/code&gt; from your application's main loop or scheduler.&lt;/li&gt;
&lt;li&gt;This makes FSM_API an ideal choice for server-side logic, complex simulations, AI systems, backend services, or custom game engines where you need robust and decoupled state management.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;hr&gt;
&lt;h4 id=&quot;support-us&quot;&gt;Support Us&lt;/h4&gt;
&lt;p&gt;If you find this project useful, you can support its development through PayPal.&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://www.paypal.com/donate/?hosted_button_id=3Z7263LCQMV9J&quot;&gt;&lt;strong&gt;Donate via PayPal&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h4 id=&quot;useful-links&quot;&gt;Useful Links&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;NuGet Package:&lt;/strong&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.nuget.org/packages/TheSingularityWorkshop.FSM_API&quot;&gt;TheSingularityWorkshop.FSM_API&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;GitHub Repository:&lt;/strong&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/TrentBest/FSM_API&quot;&gt;TrentBest/FSM_API&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;License:&lt;/strong&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;https://opensource.org/licenses/MIT&quot;&gt;MIT License&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://assetstore.unity.com/packages/tools/behavior-ai/the-singularity-workshop-fsm-api-advanced-332450&quot;&gt;Advanced Integration On Unity Asset Store!&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Basic Integration is pending updates on Marketing content.&lt;hr&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;brought-to-you-by&quot;&gt;Brought to you by&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;The Singularity Workshop&lt;/strong&gt; – Tools for the curious, the bold, and the systemically inclined.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gl6tdvgg73ixyj0m0kuf.png&quot; alt=&quot;The image depicts a futuristic, sci-fi landscape dominated by glowing circuitry. A large, stylized Patreon logo hovers in the dark, starry sky above a radiant, eye-like sphere. This sphere pulses with vibrant, multicolored light, casting a brilliant glow onto the digital terrain below. The ground is a vast circuit board, with rivers of glowing orange and blue energy flowing along intricate pathways. Small, button-like structures on the surface emit soft light. The overall scene feels alive and dynamic, suggesting a powerful, almost magical, connection between technology and consciousness, with the Patreon logo at the center of it all.&quot;&gt;&lt;br&gt;
Because state shouldn’t be a mess.&lt;/p&gt;
&lt;hr&gt;
</description>
<category>C#</category>
<guid isPermaLink="true">https://coderlegion.com/7375/03-getting-started-with-fsmapi-in-pure-c-from-our-documentation</guid>
<pubDate>Fri, 14 Nov 2025 22:19:58 +0000</pubDate>
</item>
</channel>
</rss>