<?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: Nikita Rykov</title>
    <description>The latest articles on DEV Community by Nikita Rykov (@angermouse).</description>
    <link>https://dev.to/angermouse</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%2F373124%2Fe51a40c2-f6ba-4d35-872e-69dcde41c5b2.png</url>
      <title>DEV Community: Nikita Rykov</title>
      <link>https://dev.to/angermouse</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/angermouse"/>
    <language>en</language>
    <item>
      <title>Nstack: A full-stack app system for the AI web</title>
      <dc:creator>Nikita Rykov</dc:creator>
      <pubDate>Tue, 07 Jul 2026 03:14:24 +0000</pubDate>
      <link>https://dev.to/angermouse/nstack-a-full-stack-app-system-for-the-ai-web-4b98</link>
      <guid>https://dev.to/angermouse/nstack-a-full-stack-app-system-for-the-ai-web-4b98</guid>
      <description>&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhwbf0afxj0n08fsj9g11.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhwbf0afxj0n08fsj9g11.png" alt="Nstack" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I do not want every full-stack app to invent its own shape.&lt;/p&gt;

&lt;p&gt;That sounds obvious until the project has a backend, a frontend, generated API clients, Dockerfiles, secrets, environments, databases, caches, object storage, cron jobs, deploy targets, logs, backups, rollbacks, and AI agents editing the repo.&lt;/p&gt;

&lt;p&gt;At that point, the framework choice is only one part of the system. The product is the workflow that keeps all of those pieces understandable.&lt;/p&gt;

&lt;p&gt;That is what I built with &lt;code&gt;nstack&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;nstack&lt;/code&gt; is an opinionated full-stack app system for:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Encore.ts backend
Nuxt frontend
Dokploy deployment
pnpm workspace
AI-ready repo guidance
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It creates the app, runs it locally, keeps the typed frontend client in sync, maps backend resources to deployable infrastructure, manages targets and secrets, deploys to Dokploy, and gives coding agents clear project rules.&lt;/p&gt;

&lt;p&gt;The first run is short:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; https://nstack.tech/install.sh | bash
nstack init my-app
&lt;span class="nb"&gt;cd &lt;/span&gt;my-app
nstack setup
nstack dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The short command surface is possible because the stack has one known shape.&lt;/p&gt;

&lt;h2&gt;
  
  
  The stack is opinionated on purpose
&lt;/h2&gt;

&lt;p&gt;Encore and Nuxt were chosen because they already make strong decisions.&lt;/p&gt;

&lt;p&gt;Encore keeps APIs and backend resources close to the code. Nuxt gives the frontend a clear app structure, SSR support, routing, and a practical production server. Dokploy gives the deployment a concrete target: services, domains, logs, resources, schedules, and Compose apps on a server you control.&lt;/p&gt;

&lt;p&gt;Those opinions help human developers because fewer decisions have to be remade in every repo. They also help AI agents because the project has stable places for APIs, frontend pages, generated clients, deploy output, local state, and instructions.&lt;/p&gt;

&lt;p&gt;The point is not to support every possible stack. The point is to make one full-stack path deep enough that the tooling can be useful.&lt;/p&gt;

&lt;h2&gt;
  
  
  What nstack creates
&lt;/h2&gt;

&lt;p&gt;A generated app looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;my-app/
  backend/
    api/
      status.ts
      db.ts
      gateway.ts
    encore.app
  frontend/
    app/
      pages/index.vue
      utils/api.ts
    nuxt.config.ts
  deploy/nstack/
  nstack.config.mjs
  pnpm-workspace.yaml
  AGENTS.md
  NSTACK_GUIDELINES.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The backend is Encore.ts. The frontend is Nuxt. The root config describes the nstack app and deployment shape. &lt;code&gt;deploy/nstack/&lt;/code&gt; contains generated deployment output. &lt;code&gt;AGENTS.md&lt;/code&gt; and &lt;code&gt;NSTACK_GUIDELINES.md&lt;/code&gt; explain the project to coding agents and humans working in the repo.&lt;/p&gt;

&lt;p&gt;The generated app is meant to be edited as a normal app. The system exists so the surrounding workflow is consistent.&lt;/p&gt;

&lt;h2&gt;
  
  
  Local DX is owned by the system
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;nstack setup&lt;/code&gt; prepares a fresh clone. It installs dependencies, bootstraps pnpm through Corepack when needed, installs the Encore CLI when it is missing, and checks Docker only when the declared Encore resources need it.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;nstack dev&lt;/code&gt; starts the Encore backend, the Nuxt frontend, and generated client sync.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nstack dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When the backend API surface changes, nstack regenerates the Encore TypeScript client used by the Nuxt app. Frontend code imports through &lt;code&gt;frontend/app/utils/api.ts&lt;/code&gt;, so browser, SSR, and deployed URLs are handled in one place.&lt;/p&gt;

&lt;p&gt;The normal project scripts use the same path:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pnpm dev
pnpm check
pnpm build
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On a fresh clone, those commands reuse nstack setup and client sync instead of assuming the machine already has the right tools.&lt;/p&gt;

&lt;h2&gt;
  
  
  Infrastructure comes from backend code
&lt;/h2&gt;

&lt;p&gt;Encore lets the backend declare durable resources in source. nstack uses that metadata to prepare Dokploy deployment state.&lt;/p&gt;

&lt;p&gt;When backend code declares SQL databases, caches, Pub/Sub topics, object buckets, cron jobs, and secrets, &lt;code&gt;nstack deploy&lt;/code&gt; reads that shape and maps it to deployable infrastructure.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Encore SQL database -&amp;gt; Dokploy Postgres
Encore cache -&amp;gt; Dragonfly
Encore Pub/Sub -&amp;gt; NSQ
Encore object bucket -&amp;gt; RustFS
Encore cron metadata -&amp;gt; Dokploy schedules
Encore secrets -&amp;gt; target-specific environment values
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The deploy artifacts are rendered into &lt;code&gt;deploy/nstack/&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;deploy/nstack/encore.infra.json
deploy/nstack/compose.dokploy.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You change the app or &lt;code&gt;nstack.config.mjs&lt;/code&gt;, then run the CLI. The generated files reflect the app shape.&lt;/p&gt;

&lt;h2&gt;
  
  
  Deploy is part of the app workflow
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;nstack deploy&lt;/code&gt; does the full Dokploy handoff.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nstack deploy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It discovers Encore resources, renders Encore infra config, renders Dokploy Compose, provisions resources, configures domains and Traefik routes, syncs schedules, deploys the app, verifies the public URL, and prints the result.&lt;/p&gt;

&lt;p&gt;The default build mode lets Dokploy build the backend and frontend from source using production Dockerfiles and Compose &lt;code&gt;build:&lt;/code&gt; sections. You can deploy without setting up GHCR, Docker Hub, or another image registry.&lt;/p&gt;

&lt;p&gt;For source-backed apps, nstack can configure Dokploy source deployments for GitHub, GitLab, Bitbucket, and Gitea or Forgejo when that provider is connected in Dokploy. Provider-backed deploys can use native push webhooks for deploy-on-push.&lt;/p&gt;

&lt;h2&gt;
  
  
  Targets and operations are first-class
&lt;/h2&gt;

&lt;p&gt;Apps often need production, staging, and other environments. nstack calls those targets.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nstack target create staging &lt;span class="nt"&gt;--domain&lt;/span&gt; staging.example.com
nstack deploy &lt;span class="nt"&gt;--env&lt;/span&gt; staging
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each target can have its own domain, secrets, resources, and local state. Runtime secrets move through nstack commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nstack &lt;span class="nb"&gt;env set &lt;/span&gt;API_SECRET
nstack &lt;span class="nb"&gt;env &lt;/span&gt;push
nstack &lt;span class="nb"&gt;env &lt;/span&gt;pull &lt;span class="nt"&gt;--all&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The operational commands live beside the app too:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nstack status
nstack logs &lt;span class="nt"&gt;--follow&lt;/span&gt;
nstack backup
nstack rollback
nstack pull
nstack doctor
nstack undeploy &lt;span class="nt"&gt;--yes&lt;/span&gt;
nstack cleanup
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Backups include Dokploy and app metadata, remote Compose environment values, and data artifacts for stateful resources such as Postgres, cache volumes, RustFS object storage, and NSQ Pub/Sub data. Destructive deletion paths create a critical backup first unless that guard is explicitly disabled.&lt;/p&gt;

&lt;h2&gt;
  
  
  AI guidance is generated with the app
&lt;/h2&gt;

&lt;p&gt;AI agents work better when the repo tells them what matters.&lt;/p&gt;

&lt;p&gt;nstack generated apps include &lt;code&gt;AGENTS.md&lt;/code&gt; and &lt;code&gt;NSTACK_GUIDELINES.md&lt;/code&gt;. Those files describe the project map, generated files, commands, frontend API client, deploy model, resource rules, secret handling, target behavior, and recovery commands.&lt;/p&gt;

&lt;p&gt;They also point agents at the correct dev workflow.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nstack devexec &lt;span class="s1"&gt;'await apiJson("/status")'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;devexec&lt;/code&gt; starts a temporary dev stack, runs one script, and exits. That gives agents a reliable way to test backend and frontend behavior without leaving a long-running server behind.&lt;/p&gt;

&lt;p&gt;For frontend checks, it can capture screenshots:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nstack devexec &lt;span class="s1"&gt;'return await screenshot("/", { width: 390, height: 844 })'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Under AI coding harnesses, &lt;code&gt;nstack dev&lt;/code&gt; refuses to start a long-running dev server by default. Agents use &lt;code&gt;devexec&lt;/code&gt; for repeatable checks, and humans can still run the normal dev server.&lt;/p&gt;

&lt;h2&gt;
  
  
  The product is the shared shape
&lt;/h2&gt;

&lt;p&gt;Calling nstack a deployment wrapper misses the point.&lt;/p&gt;

&lt;p&gt;The value is the full project shape: the backend model, frontend client flow, local commands, generated deploy output, Dokploy resource mapping, target state, operational commands, and AI guidance all fit together.&lt;/p&gt;

&lt;p&gt;That is why the stack is narrow. nstack can be useful because it knows what kind of app it is managing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; https://nstack.tech/install.sh | bash
nstack init my-app
&lt;span class="nb"&gt;cd &lt;/span&gt;my-app
nstack setup
nstack dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Docs are at &lt;a href="https://nstack.tech" rel="noopener noreferrer"&gt;nstack.tech&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
