Implement Next.js templates with Auth.js and PostgreSQL support - #3
Merged
Merged
Conversation
… structure and files
…nd README guidance
…t, add prisma.config.ts, and enhance README guidance
- Completed Phase 5 Step 7 by creating the Auth.js credentials scaffold. - Added `auth.ts` for configuring Auth.js with a credentials provider. - Created route handler in `app/api/auth/[...nextauth]/route.ts` to re-export Auth.js handlers. - Included README guidance for the Auth.js credentials scaffold. - Updated progress tracker to reflect completion of Step 7. - Verified compatibility with PostgreSQL and Prisma configurations.
…le and README guidance
…ss tracker, and enhance project generation tests
…cker PostgreSQL templates, update progress tracker, and enhance verification tests
There was a problem hiding this comment.
Pull request overview
Implements LaunchKit’s Phase 5 template layers for generating Next.js App Router projects with optional Tailwind, shadcn/ui, PostgreSQL, Prisma, Auth.js credentials, and Docker PostgreSQL, and wires these template assets into the generator via the existing TemplateLoader interface.
Changes:
- Adds
@launchkit/templatesbase Next.js template plus feature templates (Tailwind, shadcn/ui, PostgreSQL, Prisma, Auth.js credentials, Docker PostgreSQL). - Extends generator feature definitions to contribute the correct package.json/env/template-file metadata and improves template loading + file merging.
- Adds/updates generator/schema/templates tests and Phase 5 completion verification prompts/tracking docs.
Reviewed changes
Copilot reviewed 47 out of 47 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/templates/src/index.ts | Exposes template identifier constants used by tests/consumers. |
| packages/templates/src/tests/index.test.ts | Verifies template exports and validates template file contents/structure. |
| packages/templates/base/next/app/layout.tsx | Base Next.js App Router layout template. |
| packages/templates/base/next/app/page.tsx | Base Next.js landing page template with placeholders. |
| packages/templates/base/next/app/globals.css | Base global styles (non-Tailwind). |
| packages/templates/base/next/components/.gitkeep | Ensures components directory exists in generated output. |
| packages/templates/base/next/lib/.gitkeep | Ensures lib directory exists in generated output. |
| packages/templates/base/next/package.json | Base template package metadata (Next/React/TS deps + scripts). |
| packages/templates/base/next/tsconfig.json | Base template TypeScript config and @/* path alias. |
| packages/templates/base/next/next.config.ts | Base Next.js config template. |
| packages/templates/base/next/postcss.config.mjs | Base PostCSS config placeholder. |
| packages/templates/base/next/.gitignore | Base Next.js gitignore template. |
| packages/templates/base/next/README.md | Base project README with placeholders. |
| packages/templates/features/tailwind/app/globals.css | Tailwind v4 CSS entrypoint and default styling baseline. |
| packages/templates/features/tailwind/postcss.config.mjs | Tailwind v4 PostCSS plugin configuration. |
| packages/templates/features/shadcn/components.json | shadcn/ui configuration for no-src App Router structure. |
| packages/templates/features/shadcn/lib/utils.ts | cn() helper for shadcn/ui components. |
| packages/templates/features/shadcn/components/ui/button.tsx | Minimal shadcn/ui Button component template. |
| packages/templates/features/shadcn/app/globals.css | shadcn/ui token CSS for Tailwind v4. |
| packages/templates/features/postgres/.env.example | PostgreSQL DATABASE_URL example using placeholders. |
| packages/templates/features/postgres/README.md | PostgreSQL feature guidance. |
| packages/templates/features/prisma/prisma/schema.prisma | Prisma schema template for PostgreSQL + generated client output. |
| packages/templates/features/prisma/lib/db.ts | Prisma client helper using @prisma/adapter-pg. |
| packages/templates/features/prisma/prisma.config.ts | Prisma config file intended to load env/config for CLI usage. |
| packages/templates/features/prisma/README.md | Prisma feature guidance and scripts. |
| packages/templates/features/authjs-credentials/auth.ts | Auth.js credentials scaffold template (placeholder authorize). |
| packages/templates/features/authjs-credentials/app/api/auth/[...nextauth]/route.ts | Next.js App Router handler re-export for Auth.js. |
| packages/templates/features/authjs-credentials/README.md | Auth.js credentials scaffold guidance/warnings. |
| packages/templates/features/docker-postgres/docker-compose.yml | Docker Compose PostgreSQL service for local development. |
| packages/templates/features/docker-postgres/README.md | Docker PostgreSQL guidance and DATABASE_URL alignment. |
| packages/generator/src/features/definitions.ts | Adds MVP feature package/env/template-file contributions and notes. |
| packages/generator/src/generate-project.ts | Applies env placeholders, loads base template by default, merges duplicate paths. |
| packages/generator/src/tests/generate-project.test.ts | Expands generation pipeline assertions for new templates/features. |
| packages/generator/src/tests/feature-registry.test.ts | Verifies feature registry metadata reflects new contributions. |
| packages/generator/src/tests/phase-4-coverage.test.ts | Updates coverage expectations for package/env/script contributions. |
| packages/generator/src/tests/phase-5-completion.test.ts | Adds real-template composition test via TemplateLoader. |
| packages/schema/src/tests/compatibility.test.ts | Adds compatibility coverage for Auth.js + PostgreSQL + no Prisma case. |
| context/progress-tracker.md | Records Phase 5 completion and Phase 6 readiness. |
| memory.md | Updates internal phase handoff notes and verification log. |
| .agents/prompts/phase-05/step-2.md | Adds Phase 5 Step 2 prompt content (base Next.js template). |
| .agents/prompts/phase-05/step-3.md | Adds Phase 5 Step 3 prompt content (Tailwind template). |
| .agents/prompts/phase-05/step-4.md | Adds Phase 5 Step 4 prompt content (shadcn/ui template). |
| .agents/prompts/phase-05/step-5.md | Adds Phase 5 Step 5 prompt content (PostgreSQL template). |
| .agents/prompts/phase-05/step-6.md | Adds Phase 5 Step 6 prompt content (Prisma template). |
| .agents/prompts/phase-05/step-7.md | Adds Phase 5 Step 7 prompt content (Auth.js credentials template). |
| .agents/prompts/phase-05/step-8.md | Adds Phase 5 Step 8 prompt content (Docker PostgreSQL template). |
| .agents/prompts/phase-05/step-9.md | Adds Phase 5 Step 9 prompt content (completion verification). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+1
to
+3
| datasource db { | ||
| provider = "postgresql" | ||
| } |
Comment on lines
+34
to
+47
| function Button({ | ||
| className, | ||
| variant, | ||
| size, | ||
| ...props | ||
| }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants>) { | ||
| return ( | ||
| <button | ||
| data-slot="button" | ||
| className={cn(buttonVariants({ variant, size, className }))} | ||
| {...props} | ||
| /> | ||
| ); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.