Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion create-agentic-app/scripts/sync-templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ const excludePatterns = [
'yarn.lock',
'tsconfig.tsbuildinfo',
'.env',
'create-agentic-app'
'create-agentic-app',
'test-results',
'playwright-report'
];

// Check if a path should be excluded
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ This creates a minimal `standalone` folder with only production dependencies:
└── static/ # Must be copied separately
```

## Docker Deployment
## Docker (or Podman) Deployment

> Podman is a drop-in alternative to Docker here. The same `Dockerfile` and Compose file below build and run unchanged — substitute `podman build` for `docker build` and `podman compose up` for `docker compose up`.

### Dockerfile

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ This creates a minimal `standalone` folder with only production dependencies:
└── static/ # Must be copied separately
```

## Docker Deployment
## Docker (or Podman) Deployment

> Podman is a drop-in alternative to Docker here. The same `Dockerfile` and Compose file below build and run unchanged — substitute `podman build` for `docker build` and `podman compose up` for `docker compose up`.

### Dockerfile

Expand Down
23 changes: 23 additions & 0 deletions create-agentic-app/template/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
node_modules
.next
.git
.github
.vscode
.claude
.agents
npm-debug.log*
pnpm-debug.log*
.env
.env.*
!.env.example
public/uploads
.mermaid-cache
e2e
playwright-report
test-results
specs
docs
*.md
Dockerfile
.dockerignore
docker-compose.yml
17 changes: 17 additions & 0 deletions create-agentic-app/template/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,25 @@

- Use any testing tools, libraries available to the project for testing your changes
- Never assume your changes simply work, always test!
- This project uses **Playwright** for end-to-end tests in `e2e/`. They run against your local database (`POSTGRES_URL` from `.env`) — start it with `podman compose up -d` and run `pnpm db:migrate` first, then `pnpm test:e2e`. Add a test for new user-facing flows.
- If the project does not have any testing tools, scripts, MCP tools, skills, etc. available for testing, ask the user whether testing should be skipped.

## STACK

- **Framework:** Next.js (App Router) + React 19 + TypeScript
- **Auth:** Better Auth (email/password; Drizzle adapter)
- **DB/ORM:** PostgreSQL + Drizzle ORM (postgres-js driver)
- **Email:** Resend + React Email via `src/lib/mail` (console fallback without `RESEND_API_KEY`)
- **Storage:** S3-compatible via `src/lib/storage.ts` (local filesystem fallback)
- **Forms:** React Hook Form + Zod with the shadcn `form` component
- **AI (optional):** Vercel AI SDK + OpenRouter
- Keep these provider integrations generic — do not hard-code project-specific business logic into the storage, mail, or auth libraries.

## DEPLOYMENT

- The app builds to a standalone server (`output: "standalone"`) with a `Dockerfile`; it targets any Docker- or Podman-compatible host (Coolify, Hetzner, VPS). The same `Dockerfile` and `compose.yml` work unchanged with `podman build` / `podman compose`.
- Do **not** run database migrations during the build. `pnpm build` is `next build` only. Run `pnpm db:migrate` as a separate release/pre-deploy step.

## UI DESIGN

- Always follow the UI design system when creating or reviewing components or pages.
Expand Down
1 change: 1 addition & 0 deletions create-agentic-app/template/DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ This document defines the visual design system for the project. All new componen
- **Framework:** Next.js (App Router) + React + TypeScript
- **Styling:** Tailwind CSS v4 (CSS-first config via `@theme inline` in `globals.css` — no `tailwind.config.ts`)
- **Components:** shadcn/ui (new-york style, neutral base)
- **Forms:** React Hook Form + Zod via the shadcn `form` component (`@/components/ui/form`)
- **Icons:** Lucide React
- **Fonts:** Geist (sans) + Geist Mono (mono) via `next/font/google`
- **Dark mode:** next-themes (class-based, system default)
Expand Down
47 changes: 47 additions & 0 deletions create-agentic-app/template/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# syntax=docker/dockerfile:1

# Multi-stage build producing a slim, standalone Next.js image.
# Works on any Docker host (Coolify, Hetzner, Fly, a plain VPS, …).
#
# Database migrations are NOT run during the build (the build has no DB access).
# Run them as a separate release/pre-deploy step, e.g. `pnpm db:migrate`
# (see README "Deployment").

FROM node:20-alpine AS base
RUN npm install -g pnpm@9

# --- Dependencies ---
FROM base AS deps
WORKDIR /app
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile

# --- Build ---
FROM base AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
# Placeholder build-time env. Override NEXT_PUBLIC_* via build args for real
# deployments — they are inlined into the client bundle at build time.
ARG NEXT_PUBLIC_APP_URL="http://localhost:3000"
ENV NEXT_PUBLIC_APP_URL=${NEXT_PUBLIC_APP_URL} \
POSTGRES_URL="postgresql://user:pass@localhost:5432/db" \
BETTER_AUTH_SECRET="build-only-placeholder-secret-32chars"
RUN pnpm build:ci

# --- Runtime ---
FROM base AS runner
WORKDIR /app
ENV NODE_ENV=production \
PORT=3000 \
HOSTNAME=0.0.0.0

RUN addgroup -g 1001 -S nodejs && adduser -S nextjs -u 1001

COPY --from=builder /app/public ./public
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static

USER nextjs
EXPOSE 3000
CMD ["node", "server.js"]
Loading
Loading