<?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: Nguyen Hoang Long</title>
    <description>The latest articles on DEV Community by Nguyen Hoang Long (@nguyen_hoanglong_3492e35).</description>
    <link>https://dev.to/nguyen_hoanglong_3492e35</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3965749%2Fdf091ddc-4177-40fe-a75f-d1f73b6ebfe3.jpg</url>
      <title>DEV Community: Nguyen Hoang Long</title>
      <link>https://dev.to/nguyen_hoanglong_3492e35</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nguyen_hoanglong_3492e35"/>
    <language>en</language>
    <item>
      <title>I built a Laravel SaaS Starter Kit so you don't have to (Auth + Roles + Stripe + Docker)</title>
      <dc:creator>Nguyen Hoang Long</dc:creator>
      <pubDate>Wed, 10 Jun 2026 09:01:33 +0000</pubDate>
      <link>https://dev.to/nguyen_hoanglong_3492e35/i-built-a-laravel-saas-starter-kit-so-you-dont-have-to-auth-roles-stripe-docker-fm3</link>
      <guid>https://dev.to/nguyen_hoanglong_3492e35/i-built-a-laravel-saas-starter-kit-so-you-dont-have-to-auth-roles-stripe-docker-fm3</guid>
      <description>&lt;p&gt;Every time I start a new Laravel project, I spend the first 2-3 days&lt;br&gt;
doing the exact same thing.&lt;/p&gt;

&lt;p&gt;Set up authentication. Build a role system. Wire up Stripe.&lt;br&gt;
Configure Docker. Write the same middleware I wrote last time.&lt;/p&gt;

&lt;p&gt;Sound familiar?&lt;/p&gt;

&lt;p&gt;So I stopped copy-pasting and built a proper starter kit.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's inside
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Authentication via Laravel Sanctum&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Register, login, logout&lt;/li&gt;
&lt;li&gt;Token-based API auth&lt;/li&gt;
&lt;li&gt;Get current user endpoint&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Roles &amp;amp; Permissions&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Admin / Manager / User out of the box&lt;/li&gt;
&lt;li&gt;Role middleware protecting routes&lt;/li&gt;
&lt;li&gt;Assign and revoke roles via API&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;REST API — versioned and clean&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;All routes under &lt;code&gt;/api/v1/&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Consistent JSON response format&lt;/li&gt;
&lt;/ul&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
json
{
  "success": true,
  "message": "Registration successful",
  "data": {
    "user": { ... },
    "token": "1|abc123..."
  },
  "errors": null
}

Stripe Integration
- Create customers and payment intents
- Webhook handler for payment_succeeded / payment_failed

Docker &amp;amp; DevOps
- Multi-stage Dockerfile (PHP 8.3 + Nginx)
- docker-compose with MySQL + Redis
- GitHub Actions CI/CD pipeline

Tests — all passing
✅ test_user_can_register
✅ test_user_can_login
✅ test_login_fails_with_wrong_credentials
✅ test_authenticated_user_can_fetch_profile
✅ test_user_can_logout

Quick start

composer install
cp .env.example .env
php artisan key:generate
php artisan migrate --seed --seeder=RoleSeeder
php artisan serve

That's it. Your API is running with auth, roles, and a seeded admin account.

Preview the structure

Full folder structure and API docs on GitHub:
👉 github.com/long260398/laravel-saas-starter

Get the full source code

If this saves you even half a day of setup, it's worth it.

👉 longnguyen77.gumroad.com/l/nhxta — $29

Built with Laravel 11 · PHP 8.3 · 2026
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>laravel</category>
      <category>php</category>
      <category>webdev</category>
      <category>opensource</category>
    </item>
    <item>
      <title>I built two CLI tools that save me time on every project</title>
      <dc:creator>Nguyen Hoang Long</dc:creator>
      <pubDate>Wed, 03 Jun 2026 05:25:03 +0000</pubDate>
      <link>https://dev.to/nguyen_hoanglong_3492e35/i-built-two-cli-tools-that-save-me-time-on-every-project-12lp</link>
      <guid>https://dev.to/nguyen_hoanglong_3492e35/i-built-two-cli-tools-that-save-me-time-on-every-project-12lp</guid>
      <description>&lt;p&gt;Every project I start hits the same two friction points:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;I stage my changes and stare at the terminal thinking "how do I word this commit?"&lt;/li&gt;
&lt;li&gt;I clone a repo, copy &lt;code&gt;.env.example&lt;/code&gt; to &lt;code&gt;.env&lt;/code&gt;, run the app, and get a cryptic error because three keys are missing from &lt;code&gt;.env.example&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;So I spent a weekend building two small tools to fix them permanently.&lt;/p&gt;

&lt;h2&gt;
  
  
  gitmage — Stop writing commit messages
&lt;/h2&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%2Fgithub.com%2Flong260398%2Fgitmage%2Fraw%2Fmain%2Fdemo.gif" 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%2Fgithub.com%2Flong260398%2Fgitmage%2Fraw%2Fmain%2Fdemo.gif" alt="gitmage demo" width="800" height="400"&gt;&lt;/a&gt;&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; gitmage
git add &lt;span class="nb"&gt;.&lt;/span&gt;
gitmage
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It reads your staged diff, sends it to AI (Groq for free, Claude Haiku for ~$0.0001),&lt;br&gt;
and presents 3 commit options you navigate with arrow keys.&lt;/p&gt;

&lt;p&gt;Hit enter to commit. Hit R to regenerate. That's it.&lt;/p&gt;

&lt;p&gt;Flags worth knowing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;--push — commit and push in one command&lt;/li&gt;
&lt;li&gt;--lang=ja — commit message in Japanese (or vi, zh, ko, es...)&lt;/li&gt;
&lt;li&gt;--dry-run — preview suggestions without committing&lt;/li&gt;
&lt;li&gt;--provider=claude — force Claude even if Groq key is set&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;→ &lt;a href="https://github.com/long260398/gitmage" rel="noopener noreferrer"&gt;https://github.com/long260398/gitmage&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  envpatch — Never deploy with a broken .env again
&lt;/h2&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%2Fgithub.com%2Flong260398%2Fenvpatch%2Fraw%2Fmain%2Fdemo.gif" 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%2Fgithub.com%2Flong260398%2Fenvpatch%2Fraw%2Fmain%2Fdemo.gif" alt="envpatch demo" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
The workflow I used to do:&lt;/p&gt;

&lt;p&gt;cp .env.example .env&lt;/p&gt;

&lt;h1&gt;
  
  
  manually compare files
&lt;/h1&gt;

&lt;h1&gt;
  
  
  hope I didn't miss anything
&lt;/h1&gt;

&lt;h1&gt;
  
  
  deploy
&lt;/h1&gt;

&lt;h1&gt;
  
  
  production error: "DATABASE_URL is not defined"
&lt;/h1&gt;

&lt;p&gt;The workflow now:&lt;/p&gt;

&lt;p&gt;envpatch init     # creates .env from .env.example&lt;/p&gt;

&lt;h1&gt;
  
  
  fill in your values
&lt;/h1&gt;

&lt;p&gt;envpatch check    # confirms nothing is missing&lt;/p&gt;

&lt;p&gt;And when a teammate adds a new key to .env.example:&lt;/p&gt;

&lt;p&gt;envpatch sync     # adds the missing keys to your .env automatically&lt;/p&gt;

&lt;p&gt;Also works great in CI:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;run: npx envpatch check  # fail the build if .env is incomplete&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;→ &lt;a href="https://github.com/long260398/envpatch" rel="noopener noreferrer"&gt;https://github.com/long260398/envpatch&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Both tools are TypeScript, published on npm, MIT licensed.&lt;br&gt;
Would love feedback if you try them.&lt;/p&gt;

</description>
      <category>node</category>
      <category>typescript</category>
      <category>opensource</category>
      <category>cli</category>
    </item>
  </channel>
</rss>
