Explore the guides +
Learn/Lesson 4 of 6
A PRACTICAL GUIDE / 04

Build the foundation in a sensible order.

Go from an empty backend to a connected, authenticated app without mixing all the decisions together.

It’s tempting to ask an agent to create the backend, database, authentication, and first five features at once. I’d make the foundational choices explicit and check each layer before relying on it. These skills can chain together, but the decisions still deserve your attention.

01

Install the workflows you’ll use.

This guide uses the four foundational and implementation skills. Run the install command in the project directory, choose your agent, and start a fresh session if needed.

TERMINAL
$ npx skills add akdevsaha-dev/factory-skills --skill init-backend init-database init-auth implement-feature
02

Get a backend running first.

Choose one of the supported stacks. This example uses Node.js and TypeScript; Python with FastAPI and Go with the standard library are also supported.

The default destination is backend/. Check the startup instructions and the health endpoint before proceeding. A file tree alone doesn’t establish that the server runs.

SEND TO YOUR AGENT
› /init-backend use Node.js, TypeScript, and Express in backend/. Follow any existing repository conventions.

The default health endpoint is GET /health on port 8080, with an environment override. Expect a 200 response with {"status":"ok"}.

03

Connect the database, then design the data.

Choose Prisma, Drizzle, or Supabase based on the stack and how you want to access Postgres. For this Node.js example, Drizzle is one valid choice. The skill should validate config and reuse one client.

Put the real connection string in the local .env, and keep it out of chat and committed files. init-database doesn’t create tables or migrations. Ask for your schema separately once you’ve decided what it should store.

SEND TO YOUR AGENT
› /init-database with Drizzle. Use the existing backend config module. I’ll configure DATABASE_URL in the local .env.
Check supported database options
04

Define access before adding sign-in.

“Add auth” leaves out the most important question: who can access which data? Decide whether you need resource ownership, roles, organizations, or something more specific. Then let the agent recommend a provider that fits the app.

Providers and deployment shapes differ. Review the recommendation and confirm the choices rather than copying a provider just because this guide names one.

SEND TO YOUR AGENT
› /init-auth inspect the app and recommend a provider for email OTP. Each user should only read and change their own projects. Explain the trade-off before implementation.
05

Build the first product feature on that foundation.

Now ask for something small that uses the established layers. Make the ownership behavior explicit so the checks can exercise both allowed and forbidden requests.

If a prerequisite is missing, resolve it rather than asking the agent to work around it. A configured environment file with placeholders is not a verified database connection.

SEND TO YOUR AGENT
› /implement-feature add project creation and a list of the current user’s projects. Reuse the existing database client, auth checks, validation, and error format. Test that another user cannot access those projects.
Examples are requests to adapt, not recorded outcomes.Project source