·94 min

How to Vibe Code a Next.js Boilerplate Repository - Complete Guide 2025

Master vibe coding to create production-ready Next.js boilerplates. Complete step-by-step guide from brainstorming to deployment using AI assistance and structured documentation.

DK

Daniel Kliewer

Author, Sovereign AI

Next.jsVibe CodingBoilerplateAI DevelopmentReactTypeScriptApp Router
Sovereign AI book cover

From the Book

This is from Sovereign AI: Building Local-First Intelligent Systems.

Get the Book — $88
How to Vibe Code a Next.js Boilerplate Repository - Complete Guide 2025

Image

How to Vibe Code a Next.js Boilerplate Repository: Complete Guide

Vibe coding revolutionizes software development by combining AI assistance with structured documentation to create production-ready applications efficiently. This comprehensive guide demonstrates how to build a complete Next.js boilerplate using vibe coding techniques, from initial brainstorming to final deployment.

What is Vibe Coding?

Vibe coding transforms traditional development by leveraging AI tools and systematic documentation to accelerate project creation. Instead of coding line-by-line, developers use AI assistance, structured prompts, and comprehensive documentation to build robust applications quickly and efficiently.

Assembling Essential Next.js Boilerplate Best Practices

Standard Operating Procedure


I am going to start with a brainstorming prompt with just the Google browser search bar, I don't want to use up any of my free allocation to other models. This still is vibe coding since Google supplies an AI generated answer for free! And some people complain about this free inference they are giving us.


what are the best practices for creating a boilerplate next.js repo that you would want to take into consideration when setting it up for the first time, I want all of the SOP and everything that you would want a senior software engineer to know and tell someone to take into consideration while they are drafting all of the stand operation procedure to be taken into account when drafting this repo

Google's AI Generated Response

When establishing a Next.js boilerplate repository, a senior software engineer would advise considering the following best practices and standard operating procedures (SOPs):

Project Structure and Organization:

• Clear Folder Structure: Establish a logical and consistent file and folder structure (e.g., src/pages, src/components, src/lib, src/styles, src/utils). This enhances navigability and maintainability.

• Modularity: Design components and utility functions to be modular and reusable, promoting code reusability and reducing redundancy. • Co-location: Group related files and components together where it makes sense, improving discoverability and understanding.

Development Tooling and Configuration:

• TypeScript: Integrate TypeScript for type safety, improved code quality, and better developer experience.

• ESLint and Prettier: Configure ESLint for code linting and Prettier for consistent code formatting, ensuring adherence to coding standards.

• Husky and Lint-Staged: Implement pre-commit hooks with Husky and Lint-Staged to automatically run linters and formatters on staged files, preventing inconsistent code from entering the repository.

• Environment Variables: Clearly define and manage environment variables (e.g., API keys, database URLs) for different environments (development, staging, production).

Performance Optimization:

• SSR, SSG, and ISR: Understand and strategically utilize Server-Side Rendering (SSR), Static Site Generation (SSG), and Incremental Static Regeneration (ISR) based on the content's dynamism and performance requirements.

• Image Optimization: Integrate Next.js's Image component and optimize image assets for faster loading times.

• Caching Strategies: Implement effective caching mechanisms (e.g., request memorization, data cache, router cache) to minimize server load and improve user experience.

Testing and Quality Assurance:

• Testing Framework: Integrate a robust testing framework (e.g., Jest, React Testing Library) and establish a clear testing strategy (unit, integration, end-to-end tests).

• Code Coverage: Set up code coverage reporting (e.g., Codecov) to monitor and ensure adequate test coverage.

Deployment and CI/CD:

• Version Control: Utilize Git and establish a clear branching strategy (e.g., Gitflow, GitHub Flow) for managing code versions and collaboration.

• CI/CD Pipeline: Configure a Continuous Integration/Continuous Deployment (CI/CD) pipeline (e.g., GitHub Actions, Vercel) for automated builds, tests, and deployments.

Documentation and SOPs:

• README.md: Provide a comprehensive README.md with clear instructions for setup, development, testing, and deployment.

• Contributing Guidelines: Establish clear contributing guidelines for new developers joining the project.

• Architecture Documentation: Document key architectural decisions and system design.

Security Considerations:

• Secure API Handling: Implement secure practices for handling API keys, tokens, and sensitive data.

• Authentication and Authorization: Integrate robust authentication and authorization mechanisms as needed.

By adhering to these principles and establishing clear SOPs, the Next.js boilerplate will serve as a solid foundation for building scalable, maintainable, and performant applications.

AI responses may include mistakes.


Dependencies

So from this I am going to start compiling together my initial brainstorming prompt. Bascially what I do is collect context from as many sources as I can and I am going to feed all of that to NotebookLM to help us condense some of that information into a more usable prompt.


I already have a working next.js frontend running right now and I like how it works so one thing I can do to speed this up is to include all the dependencies from the package.json file in my previous version. So that is another piece of context to include which is below.


text
1"dependencies": {
2 "@react-three/drei": "^10.7.6",
3 "@react-three/fiber": "^9.3.0",
4 "@tailwindcss/typography": "^0.5.19",
5 "@types/three": "^0.180.0",
6 "framer-motion": "^12.23.22",
7 "gray-matter": "^4.0.3",
8 "next": "15.5.4",
9 "next-mdx-remote": "^5.0.0",
10 "next-sitemap": "^4.2.3",
11 "octokit": "^5.0.3",
12 "prismjs": "^1.30.0",
13 "react": "19.1.0",
14 "react-dom": "19.1.0",
15 "react-markdown": "^10.1.0",
16 "rehype-prism-plus": "^2.0.1",
17 "rehype-raw": "^7.0.0",
18 "remark": "^15.0.1",
19 "swr": "^2.3.6",
20 "three": "^0.180.0"
21 },
22 "devDependencies": {
23 "@eslint/eslintrc": "^3",
24 "@tailwindcss/postcss": "^4",
25 "@testing-library/jest-dom": "^6.8.0",
26 "@testing-library/react": "^16.3.0",
27 "@types/jest": "^30.0.0",
28 "@types/node": "^20",
29 "@types/react": "^19",
30 "@types/react-dom": "^19",
31 "eslint": "^9",
32 "eslint-config-next": "15.5.4",
33 "jest": "^30.1.3",
34 "jest-environment-jsdom": "^30.1.2",
35 "prettier": "^3.6.2",
36 "tailwindcss": "^4",
37 "typescript": "^5"
38 }

Optimization


Another piece is the following prompt I have written in the past to improve the SEO for my site. This is something in the end I would like to have thought of from the beginning so that is why I am including it. Basically you can think of this as assembline all the pieces you would need in order to make this if you were actually coding it.

text
1Core Objectives
2Add and refine SEO metadata for every page and post.
3Improve semantic HTML and add structured data (JSON-LD).
4Optimize images, fonts, performance & Core Web Vitals.
5Generate and configure sitemap and robots.txt.
6Ensure clean URLs, canonical tags, no duplicate content.
7Verify improvements via logs, Lighthouse, and automated checks.
8Review /pages or /app directory structure.
9Detect if using Pages Router or App Router.
10Identify blog post generation (Markdown, MDX, CMS, etc.).
11Create a TODO.md or SEO_IMPROVEMENT_LOG.md to track progress.
12Metadata System Implementation
13For Pages Router:
14Add/import <Head> from next/head in all pages.
15For App Router (Next.js 13+):
16Use export const metadata = {} or generateMetadata() for dynamic pages.
17Each page must include:
18Title (≤ 60 characters, keyword-focused).
19Meta description (≤ 160 characters, compelling).
20Open Graph tags (og:title, og:description, og:image, og:url).
21Twitter Card tags.
22<link rel="canonical" href="https://example.com/...">.
23For dynamic routes ([slug].tsx), generate metadata from post content.
243. Semantic HTML + Structured Data (JSON-LD)
25Replace generic <div>s with semantic elements: <article>, <header>, <nav>, <main>, <footer>, <section>.
26Add JSON-LD using <script type="application/ld+json"> for:
27Blog posts → "@type": "Article"
28Homepage → "@type": "WebSite"
29About page → "@type": "Person" or "Organization"
30Validate structured data using https://search.google.com/test/rich-results.
314. Image & Media Optimization
32Replace all <img> with Next.js <Image />.
33Ensure:
34alt text is descriptive & keyword-relevant.
35Images are automatically responsive and lazy-loaded.
36Prefer modern formats like WebP.
375. Performance / Core Web Vitals Enhancements
38Use next/font instead of external CSS font imports.
39Audit third-party scripts; load via <Script strategy="lazyOnload" /> or afterInteractive.
40Remove render-blocking scripts/styles.
41Enable Static Site Generation wherever possible.
42Use dynamic(() => import(...), { ssr: false }) where interactive-only.
436. Sitemaps, robots.txt, and Crawl Control
44Install and configure next-sitemap.
45Generate sitemap.xml and robots.txt automatically.
46Add canonical base URL in config.
47Add noindex to pages like /admin, /dashboard, /drafts.
487. Clean URLs & Avoid Duplicate Content
49Ensure URL structure is lowercase, hyphen-separated (/blog/my-post-title).
50Add 301 redirect from http → https, and non-www → www or vice versa.
51Use canonical tags for paginated or duplicate content.
52If pagination exists, add rel="next" and rel="prev".
538. Monitoring & Validation
54Add commands to run Lighthouse and output reports to /seo-reports.
55Validate metadata output by crawling the site locally.
56Fix 404 errors, broken links, missing alt text, wrong status codes.
57Log all SEO changes in SEO_IMPROVEMENT_LOG.md.
58Be isolated to one logical SEO change.
59Final Requirement
60When SEO optimization is complete:
61Provide a summary of changes.
62Provide a checklist of unresolved items.
63Do NOT break any existing functionality or styling.
64Ensure site builds and deploys successfully.

Documentation


Assembling the proper documentation for a project is another essential aspect to this process. So I am going to use perplexity to seach for as many links as I can to include in our NoteBookLM prompt once we eventually get there.


text
1You are an expert internet researcher and software engineer with a lot of experience and you are going to look for all of the documentation that you would want an expert software engineer to have at their disposal while they are coding the absolute best boilerplate next.js repo to be used in the future. I want to use TailwindCSS, I want to use a Shadcn UI component library.
2
3The only returnable I want from you is a list of URLs of all of this documentation.

From the search I performed I was able to compile the following set of URLs.


text
1# Next.js Documentation
2
3https://nextjs.org/docs
4
5https://nextjs.org/docs/app/getting-started
6
7https://nextjs.org/docs/pages/api-reference/config/typescript
8
9https://www.geeksforgeeks.org/reactjs/next-js-routing/
10
11https://prismic.io/blog/nextjs-13-app-directory
12
13https://nextjs.org/docs/app/getting-started/project-structure
14
15https://nextjs.org/learn/dashboard-app
16
17https://nextjs.org/docs/pages/api-reference/functions/use-router
18
19# TailwindCSS Documentation
20
21https://tailwindcss.com/docs
22
23https://v2.tailwindcss.com/docs
24
25https://www.jetbrains.com/help/webstorm/tailwind-css.html
26
27# Shadcn UI Documentation
28
29https://ui.shadcn.com/docs
30
31https://codeparrot.ai/blogs/shadcn-ui-for-beginners-the-ultimate-guide-and-step-by-step-tutorial
32
33# In-Depth Guides and Tutorials
34
35https://www.contentful.com/blog/next-js-app-directory-guide-tutorial/
36
37https://bugfender.com/blog/nextjs-router/
38
39https://www.frontendeng.dev/blog/26-difference-between-app-and-pages-in-nextjs

Structured Documentation Creation

Using AI to Generate Project Documentation

NotebookLM serves as an intelligent documentation assistant, synthesizing research into actionable project documentation. The AI generates comprehensive prompts for creating essential project files that establish development standards and architectural guidelines.

Core Documentation Files

AI guidelines establish project standards, mandating Next.js App Router usage, React Server Components, TypeScript integration, and shadcn/ui component implementation.

Requirements documentation defines system prerequisites, core framework specifications, and mandatory features including comprehensive routing capabilities and robust error handling.

Architecture documentation outlines system design principles, emphasizing file-system based routing, nested layouts, and parallel rendering capabilities.

Implementation guidelines provide detailed setup instructions for type safety, styling strategies, and routing implementation.

Standards documentation establishes coding conventions, file organization principles, and naming conventions.

Security documentation outlines authentication strategies, data protection measures, and security best practices.

Testing documentation defines testing methodologies, including unit testing, integration testing, and end-to-end testing approaches.

Deployment documentation provides comprehensive deployment strategies, including CI/CD pipelines, hosting options, and environment-specific configuration.

Advanced Development Techniques

Context Engineering and AI Integration

Context engineering involves systematically organizing project information to maximize AI assistance effectiveness. By creating comprehensive documentation before coding, developers establish clear parameters that guide AI-generated implementations.

Multi-Stage Documentation Process

  1. Context Assembly: Gather comprehensive information from multiple sources
  2. AI Processing: Use NotebookLM to synthesize and organize information
  3. Documentation Generation: Create structured project documentation
  4. Context Enhancement: Polish and refine documentation for clarity
  5. Implementation Guidance: Generate detailed prompts for AI coding assistance

Key Takeaways and Best Practices

Vibe Coding Methodology

  1. Comprehensive Research: Gather extensive context before implementation
  2. Structured Documentation: Create detailed project specifications
  3. AI-Assisted Development: Leverage AI tools for code generation
  4. Systematic Implementation: Follow structured development phases
  5. Thorough Validation: Test and verify all functionality

Essential Success Factors

Context quality directly impacts AI assistance effectiveness. Structured documentation provides clear implementation guidelines. Systematic phase execution ensures comprehensive coverage of all requirements.


Image


Now we can use this as a reference to build the app. If you were a real coder and not just a filthy vibe coder like me then you could use a notebook like that in order to help you along the way and refer back to documention. It really is a helpful tool. Which is why I always try to build my own version of it. You can see my latest vibe coding attempt at it here.

Let's first draft a prompt to give the notebook to start building the context we need to create for our vibe coding session. Proper preperation of documents is half the battle.

One method I use to feed context to CLIne or whichever vibe coding platform you want to use is to draft a series of files to include in the root. So in this first prompt I am going to generate the prompts needed to start fleshing out these documents.

text
1You are the best software engineer who has ever lived and you are going to create the absolute best boilerplate next.js repo you possibly can. I have included all of the information you need to assemble this in this notebook. I want you to crawl through all of the information and help to draft a series of prompts which I can give you in order for you to draft the following documents:
2
3ai_guidelines.md
4This file serves as the central control document
5
6requirements.md
7Requirements Analysis
8
9architecture.md
10Architecture Design
11
12implementation.md
13Implementation Guidelines
14
15testing.md
16Testing Approach
17
18security.md
19Security Considerations
20
21sop.md (Standard Operating Procedures)
22Standard Operating Procedures

That gives us the following output:

This is an excellent starting point for building the ultimate Next.js boilerplate repository. As the expert software engineer, I will draw upon the extensive details provided regarding Next.js App Router conventions, development tooling, performance optimizations, and documentation requirements to draft highly detailed prompts for each required document.

Here are the structured prompts you can use to generate the foundational documentation for your best-in-class Next.js repository:


Prompts for Documentation Generation

1. ai_guidelines.md (Central Control Document)

Prompt: Draft the ai_guidelines.md file serving as the central control document for the Next.js boilerplate. Specify that the project must strictly use the Next.js App Router to leverage modern React features. Mandate the adoption of React Server Components (RSC) as the default component type. Integrate TypeScript for robust type safety and enforce the use of Statically Typed Links by enabling typedRoutes: true in next.config.ts. Mandate Tailwind CSS for styling and the use of shadcn/ui. Emphasize that all component integration must follow the shadcn/ui Open Code philosophy rather than importing pre-compiled packages. Finally, establish that all future development prompts must strictly adhere to the documented Project Structure and Organization best practices, including colocation and the use of private folders (_folderName) for utilities.

2. requirements.md (Requirements Analysis)

Prompt: Draft the requirements.md file. Detail the fundamental software requirements for this production-ready application, including the prerequisite for Node.js v18.18.0 or later. The core application must be built using the Next.js App Router to facilitate modern features such as nested layouts and the use of React Server Components. List mandatory features based on the App Router's design principles:

  1. Comprehensive Routing Capabilities covering Static Routes, Nested Routes, Dynamic Routes ([segment]), Catch-All/Optional Catch-All Routes ([...segment]/[[...segment]]), Parallel Routing (@folder), and Route Grouping ((folder)).
  2. Robust Error Handling using the dedicated error.js file for runtime errors, loading.js for suspense boundaries, and not-found.js or the notFound() function for 404 handling.
  3. Efficient Data Fetching using async React Server Components and server-side fetch with support for caching, revalidation, and request memoization.
  4. Integration of SEO and Metadata requirements using the Next.js metadata API.

3. architecture.md (Architecture Design)

Prompt: Draft the architecture.md file outlining the system design for the boilerplate. Detail the reliance on the file-system based routing system of the Next.js App Router, where directories define routes and special files like page.js define page content. Explain how the architecture maximizes code reusability through the use of Nested Layouts (layout.js) and the component architecture. Describe the structural advantages of Colocation and the ability to structure paths without affecting the URL using Route Groups ((folderName)). Detail the usage of Parallel Routing (@slot) to render independent pages/components simultaneously within the same layout. Explain the primary data fetching paradigm: utilizing async React Server Components (RSC) to fetch data directly, noting that this allows safe performance of sensitive data requests (like database calls) without needing an intermediary API route. Finally, define the backend architecture based on Next.js Route Handlers (route.js/.ts) for developing API services supporting methods like GET, POST, PUT, DELETE, etc..

4. implementation.md (Implementation Guidelines)

Prompt: Draft the implementation.md file. Provide detailed guidelines for setting up the codebase and ensuring consistency.

  1. Type Safety: Enforce the use of TypeScript and ensure the inclusion of generated Next.js types in tsconfig.json.
  2. Styling and Components: Define the strategy using the utility-first philosophy of Tailwind CSS and mention key styling methods supported (Tailwind CSS, CSS Modules, Global CSS). Detail component implementation using shadcn/ui and its approach of providing direct component code for customization.
  3. Routing Implementation: Instruct developers on navigating using the Link component for transitions and the useRouter hook for programmatic navigation. Note that components using hooks like useRouter must be declared as Client Components using the 'use client' directive.
  4. State Management: Outline implementation using the special files: loading.js (Suspense), error.js (must be a client component), and not-found.js (custom 404 page).
  5. SEO/Optimization: Require using the export const metadata = {} or generateMetadata() convention in the App Router for SEO metadata. Mandate strategic utilization of SSR, SSG, and ISR, along with Image and Font Optimization.

5. testing.md (Testing Approach)

Prompt: Draft the testing.md file defining the Quality Assurance strategy. Specify the integration of a robust testing framework such as Jest and React Testing Library as development dependencies. Detail the need for a clear testing strategy encompassing unit, integration, and end-to-end tests. Establish the mandatory requirement for Code Coverage reporting to ensure adequate test coverage is maintained. Ensure the plan requires testing critical Next.js features, including:

  1. Functionality of all major route types (Static, Dynamic, Nested, Parallel).
  2. Validation of programmatic navigation using the useRouter hook methods (push, replace, prefetch).
  3. Confirmation that the specialized files, error.js and not-found.js, correctly intercept and display expected errors and 404 states.

6. security.md (Security Considerations)

Prompt: Draft the security.md file addressing key concerns for a Next.js application. Outline secure practices for handling API keys, tokens, and sensitive data. Mandate the clear definition and management of Environment Variables for different stages (development, production) using .env files. Highlight the security benefit of using React Server Components (RSC) for data fetching, as this allows direct, safe execution of sensitive operations (like database queries) on the server, preventing credentials from leaking to the client. Require the integration of robust Authentication and Authorization mechanisms, noting that features like NextAuth.js and Middleware are common components for protecting dashboard pages.

7. sop.md (Standard Operating Procedures)

Prompt: Draft the sop.md (Standard Operating Procedures) file detailing the required operational workflow and code management standards for the project.

  1. Version Control: Specify the utilization of Git with a clear branching strategy (e.g., Gitflow or GitHub Flow).
  2. Code Quality Enforcement: Establish the use of Husky and Lint-Staged to run linters and formatters (ESLint, Prettier) on staged files automatically before committing.
  3. Development Structure: Enforce adherence to the Next.js Project Structure, including the recommendation to use the optional src/ directory to separate application code from configuration files.
  4. Deployment: Define the CI/CD Pipeline using services like GitHub Actions or Vercel for automated builds, testing, and deployment.
  5. Documentation Maintenance: Stipulate the required project documentation: a comprehensive README.md, clear Contributing Guidelines, and consistent maintenance of the Architecture Documentation.
  6. Next.js Utility Usage: Document the correct use of navigation elements, specifically reserving the native anchor tag (<a/>) for external links, and using the Next.js Link component for internal application navigation.

Now it is as simple as feeding each of these prompts in turn to NotebookLM loaded with our context to draft the accompanying files.


ai_guidelines.md


Draft the ai_guidelines.md file serving as the central control document for the Next.js boilerplate. Specify that the project must strictly use the Next.js App Router to leverage modern React features. Mandate the adoption of React Server Components (RSC) as the default component type. Integrate TypeScript for robust type safety and enforce the use of Statically Typed Links by enabling typedRoutes: true in next.config.ts. Mandate Tailwind CSS for styling and the use of shadcn/ui. Emphasize that all component integration must follow the shadcn/ui Open Code philosophy rather than importing pre-compiled packages. Finally, establish that all future development prompts must strictly adhere to the documented Project Structure and Organization best practices, including colocation and the use of private folders (_folderName) for utilities.

ai_guidelines.md

ai_guidelines.md

AI Development Guidelines for Next.js Boilerplate

This document serves as the central control mandate for all development work, ensuring consistency, maintainability, and optimal performance of the Next.js boilerplate. All future prompts and development implementations must strictly adhere to these principles.


1. Core Framework and Routing Mandates

The boilerplate must exclusively utilize the Next.js App Router and leverage modern React features.

1.1 App Router Requirement

The project must strictly use the Next.js App Router. This is the recommended approach for new projects and offers significant improvements over previous page routers. The App Router leverages the benefits and updates introduced in the latest version of React (React 18 and later), including the use of React canary releases built-in.

1.2 Default Component Type: React Server Components (RSC)

React Server Components (RSC) are mandated as the default component type. The App directory enforces server-side rendering by default and makes use of RSC.

  • RSC Benefits: Each page under a route in the App Router is a ReactJS server component. RSC reduces the amount of client-side code that needs to be loaded, improving application performance.
  • Data Fetching: For data fetching, developers should use fetch and async APIs directly within Server Components. Since RSCs perform requests on the server, sensitive data requests (like database calls) can be performed directly without needing an intermediary API route, as credentials or secrets are not leaked to the client.

2. Type Safety and Linking

TypeScript must be integrated for robust type safety and improved code quality.

2.1 Statically Typed Links

To enhance type safety when navigating between pages and prevent typos and errors when using next/link, Statically Typed Links must be enforced.

This feature requires enabling typedRoutes: true in the Next.js configuration.

Implementation in next.config.ts:

typescript
1import type { NextConfig } from 'next'
2
3const nextConfig: NextConfig = {
4 typedRoutes: true, // Mandates statically typed links
5}
6
7export default nextConfig

When enabled, Next.js validates literal href strings and types next/navigation methods like push, replace, and prefetch within the App Router.

3. Styling and UI Library

3.1 Styling with Tailwind CSS

Tailwind CSS is mandated for all styling needs. Tailwind CSS uses a utility-first approach, scanning components for class names and generating corresponding styles.

3.2 UI Component Strategy: shadcn/ui and Open Code

The UI components must be sourced using shadcn/ui.

  • Open Code Philosophy Mandate: Component integration must strictly follow the shadcn/ui Open Code philosophy. Shadcn/ui is explicitly not a traditional component library where pre-compiled packages are imported from NPM.
  • Integration Method: Developers must integrate components by obtaining the actual component code, allowing for full transparency and easy customization. This allows developers to directly edit the source code, avoiding the need for wrapping components or writing workarounds to override styles.
  • Composition: All components should share a common, composable interface, making them predictable.

4. Project Structure and Organization

All future development prompts and implementations must strictly adhere to the documented Project Structure and Organization best practices.

4.1 Colocation

Colocation is mandated for improved code structure, organization, and developer experience. Related files and components should be grouped together where it makes sense.

  • In the App Router, files can be safely colocated inside route segments in the app directory without accidentally being routable, as only the content returned by page.js or route.js is sent to the client.

4.2 Private Folders for Utilities

To separate implementation details from the routing logic and organize internal files consistently, the use of Private Folders is mandated for utilities, hooks, or shared components.

  • Naming Convention: Private folders must be created by prefixing a folder with an underscore: _folderName.
  • Routing Exclusion: Prefixing a folder with an underscore opts the folder and all its subfolders out of the routing system, signifying it as a private implementation detail.
  • Use Cases: These folders are a safe place for non-routable files such as UI utilities (_components) or data utilities (_lib).

requirements.md


text
1Draft the requirements.md file. Detail the fundamental software requirements for this production-ready application, including the prerequisite for Node.js v18.18.0 or later. The core application must be built using the Next.js App Router to facilitate modern features such as nested layouts and the use of React Server Components. List mandatory features based on the App Router's design principles:
2
3Comprehensive Routing Capabilities covering Static Routes, Nested Routes, Dynamic Routes ([segment]), Catch-All/Optional Catch-All Routes ([...segment]/[[...segment]]), Parallel Routing (@folder), and Route Grouping ((folder)).
4Robust Error Handling using the dedicated error.js file for runtime errors, loading.js for suspense boundaries, and not-found.js or the notFound() function for 404 handling.
5Efficient Data Fetching using async React Server Components and server-side fetch with support for caching, revalidation, and request memoization.
6Integration of SEO and Metadata requirements using the Next.js metadata API.

requirements.md

requirements.md

1. System Prerequisites

To ensure stable development and deployment of the application, the following environment prerequisites must be met:

| Requirement | Details | Source | | :--- | :--- | :--- | | Node.js | v18.18.0 or later must be installed. Next.js installation typically requires Node.js v18.x or above. | | | Next.js | The latest stable version of Next.js should be used, with the App Router enabled during project creation. | | | Development OS | Support for macOS, Windows (including WSL), or Linux operating systems. | |

2. Core Application Framework

The application must be built as a full-stack web application using the Next.js App Router, leveraging modern React features for optimal performance and structure.

| Requirement | Details | Source | | :--- | :--- | :--- | | Framework | The core application must exclusively utilize the Next.js App Router. The App Router is the recommended approach for new projects, replacing the older Pages Router. | | | Component Architecture | The application must leverage the capabilities of React Server Components (RSC), which the App Router supports. Each route page (page.js or .tsx) is, by default, a ReactJS server component. | | | Layout Management | The application structure must utilize the App Router's file-system based routing to implement nested layouts using the dedicated layout.js (or .tsx) file convention. Layouts defined at any level wrap their child segments. | |

3. Mandatory Features based on App Router Design Principles

3.1 Comprehensive Routing Capabilities

The application must demonstrate mastery of the file-system based routing principles of the App Router. Folders define URL segments, and a route becomes public when a page or route file exists within the directory.

| Feature | Convention/Usage | Source | | :--- | :--- | :--- | | Static Routes | Defined by directories with known route segment names (e.g., app/about/page.tsx results in /about). | | | Nested Routes | Created by nesting folders under the app/ directory (e.g., app/blog/authors/page.tsx results in /blog/authors). | | | Dynamic Routes | Parameterize segments using square brackets (e.g., [segment] or [slug]). Values are accessed via the params prop in the page component. | | | Catch-All Routes | Defined using [...segment]. This matches multiple subsequent route segments (e.g., /shop/clothing/shirts). | | | Optional Catch-All Routes | Defined using [[...segment]]. This allows matching a variable number of segments, including zero segments (e.g., /docs or /docs/pages). | | | Parallel Routing | Renders one or more pages in the same layout simultaneously. Named slots are defined using the @folder convention (e.g., @growth) and are received as props in the parent layout. | | | Route Grouping | Used for organizing routes logically without affecting the URL path. Group folders are wrapped in parentheses (e.g., (marketing)). | |

3.2 Robust Error Handling and Suspense Boundaries

The application must implement robust error management using dedicated special files and functions provided by the App Router.

| Feature | Convention/Usage | Source | | :--- | :--- | :--- | | Runtime Error Handling | Implemented using the dedicated error.js file within a route segment. The component exported from error.js must be a client component (using 'use client'). | | | Loading States / Suspense | Implemented using the loading.js file convention in a route segment to display loading UI (skeletons). This file automatically wraps the corresponding page in a <Suspense> boundary. | | | 404 Not Found UI | A customized 404 page must be implemented using not-found.js under the app/ directory to handle any unmatched routes throughout the application. | | | Programmatic 404 | The built-in notFound() function must be used within a route segment to throw the NEXT_NOT_FOUND error, which stops the current rendering process and displays the nearest not-found.js file. | |

3.3 Efficient Data Fetching

Data fetching must prioritize server-side operations using React Server Components to optimize performance and security.

| Feature | Convention/Usage | Source | | :--- | :--- | :--- | | Server Data Fetching | Data fetching must be performed directly using async React Server Components and the native server-side fetch function. This allows for direct, safe calls to sensitive resources (like databases) without needing an intermediary API route, as requests occur safely on the server. | | | Caching Support | Server-side fetch requests must utilize Next.js's built-in caching features, supporting strategies similar to getStaticProps (e.g., cache: 'force-cache'). | | | Revalidation Support | Fetch requests must support time-based revalidation to fetch data at specific intervals (similar to getStaticProps with revalidate option, e.g., next: { revalidate: 10 }). | | | Request Memoization | The application must leverage Next.js's automatic request memoization for all fetch requests within the component tree, ensuring that duplicate requests for the same data do not incur performance penalties. | |

3.4 Integration of SEO and Metadata Requirements

Search Engine Optimization (SEO) must be integrated using the Next.js metadata API conventions specific to the App Router.

| Requirement | Convention/Usage | Source | | :--- | :--- | :--- | | Metadata API | Metadata requirements must be defined in layouts or pages using the Next.js export const metadata = {} object or the generateMetadata() function. | | | Mandatory Tags | Every page must include essential SEO tags: title (keyword-focused, $\le$ 60 characters) and description (compelling, $\le$ 160 characters). | | | Social Sharing | Implementation must include Open Graph tags (og:title, og:description, og:image, og:url) and Twitter Card tags to optimize content for social sharing. | | | Generated Files | The application structure should account for file conventions for automatic SEO generation, such as sitemap.xml or sitemap.js (Generated Sitemap), and robots.txt or robots.js (Generated Robots file). | |


architecture.md


Draft the architecture.md file outlining the system design for the boilerplate. Detail the reliance on the file-system based routing system of the Next.js App Router, where directories define routes and special files like page.js define page content. Explain how the architecture maximizes code reusability through the use of Nested Layouts (layout.js) and the component architecture. Describe the structural advantages of Colocation and the ability to structure paths without affecting the URL using Route Groups ((folderName)). Detail the usage of Parallel Routing (@slot) to render independent pages/components simultaneously within the same layout. Explain the primary data fetching paradigm: utilizing async React Server Components (RSC) to fetch data directly, noting that this allows safe performance of sensitive data requests (like database calls) without needing an intermediary API route. Finally, define the backend architecture based on Next.js Route Handlers (route.js/.ts) for developing API services supporting methods like GET, POST, PUT, DELETE, etc..

architecture.md

architecture.md

System Design Overview: Next.js App Router Boilerplate

This boilerplate utilizes the Next.js App Router, which leverages advanced features of React Server Components (RSC) and a powerful file-system based routing system to build scalable, maintainable, and performant full-stack applications.


1. Routing Architecture

The core routing system is governed by a file-system based routing convention housed within the top-level app/ directory.

  • Route Definition: A directory (folder) within app/ indicates a route or a route segment, and nesting folders creates nested routes. The application's root route (/) is defined by the top-level app/ directory.
  • Page Content: The page content for a specific route is defined by the special file named page.js (or .ts/.tsx) located within the corresponding route directory. A route becomes publicly accessible only when a page.js or route.js file exists within the segment.
  • Dynamic Routing: Dynamic route segments are defined using square brackets in the folder name, such as [name] or [slug], allowing the creation of routes that match dynamic data.

2. Structural Organization and Reusability

The architecture maximizes code organization and reuse through colocation, nested layouts, and route grouping.

A. Colocation and Component Architecture

The Next.js App Router improves development experience through Colocation, which involves organizing and managing pages alongside other related files (like layouts and components) within the same app/ directory.

  • Safety: While folders define the route structure, a route is not publicly accessible until it contains a page.js or route.js file. This means that project files (such as UI utilities or internal logic) can be safely colocated inside route segments in the app directory without accidentally becoming routable paths.
  • Modularity: The architecture encourages building applications with a component architecture that follows a tree hierarchy, promoting modularity and reuse of components and utility functions.

B. Nested Layouts (layout.js)

The system employs Nested Layouts using the special layout.js file to maximize code reusability.

  • Shared UI: The layout.js file is used for defining shared UI (such as headers or navigation) across multiple child routes or segments.
  • Hierarchy: Layouts at any level wrap their child segments. Layout components are rendered recursively in nested routes, ensuring that the components of a child route segment are nested inside the components of its parent segment.
  • Optimization: During client-side navigation between pages that share a layout, the layout does not re-render and remains interactive.

C. Route Groups ((folderName))

Route Groups allow developers to organize routes logically within the app/ directory without impacting the resulting URL path.

  • Structural Advantage: Route groups are created by wrapping a folder name in parentheses, such as (marketing) or (shop). This indicates that the folder is for organizational purposes and should not be included in the route's URL path.
  • Layout Scope: They are particularly useful for enabling nested layouts, allowing the creation of multiple root layouts or applying a layout to a subset of routes in a common segment.

3. Parallel Rendering

The architecture uses Parallel Routing to enhance dashboard-like features where independent sections need to render simultaneously.

  • Simultaneous Rendering: Parallel Routing allows one or more pages/components to render simultaneously within the same layout.
  • Named Slots: Parallel routes are defined using named slots, established with the @slot (or @folder) convention (e.g., @growth or @revenue).
  • Integration: These named slots are automatically received by the parent layout component as props and are rendered within the layout's JSX structure.
  • Isolation: Each parallel route can define its own independent loading state (loading.js) and error state (error.js). Note that these slots are not actual route segments and cannot be accessed via a dedicated route path.

4. Data Fetching Paradigm

The primary data fetching paradigm relies heavily on React Server Components (RSC).

  • Server Component Direct Fetching: The App directory, enforcing server-side rendering by default, supports async React Server Components (RSC) which can use async/await to directly fetch data.
  • Sensitive Data Requests: A key benefit is the ability to safely perform sensitive data requests (like database calls) directly in the component. Since RSCs execute all data fetching on the server, there is no risk of leaking credentials or secrets, removing the need for an intermediary API route for securing data retrieval.
  • Recommendation: Next.js recommends fetching all data on the server, either via an RSC or a Route Handler.

5. Backend Architecture: Route Handlers

The backend services are developed using Next.js Route Handlers.

  • API Implementation: Route Handlers implement API services, replacing the older API routes used in the Pages Router.
  • File Convention: They are defined by creating a special file named route.js (or .ts) inside the relevant app folder (e.g., app/api/route.js).
  • Supported Methods: Route Handlers leverage the Request and Response APIs and support standard HTTP methods, including: GET, POST, PUT, DELETE, PATH, HEAD, and OPTIONS.

implementation.md


text
1Draft the implementation.md file. Provide detailed guidelines for setting up the codebase and ensuring consistency.
2
3Type Safety: Enforce the use of TypeScript and ensure the inclusion of generated Next.js types in tsconfig.json.
4Styling and Components: Define the strategy using the utility-first philosophy of Tailwind CSS and mention key styling methods supported (Tailwind CSS, CSS Modules, Global CSS). Detail component implementation using shadcn/ui and its approach of providing direct component code for customization.
5Routing Implementation: Instruct developers on navigating using the Link component for transitions and the useRouter hook for programmatic navigation. Note that components using hooks like useRouter must be declared as Client Components using the 'use client' directive.
6State Management: Outline implementation using the special files: loading.js (Suspense), error.js (must be a client component), and not-found.js (custom 404 page).
7SEO/Optimization: Require using the export const metadata = {} or generateMetadata() convention in the App Router for SEO metadata. Mandate strategic utilization of SSR, SSG, and ISR, along with Image and Font Optimization.
implementation.md

implementation.md

This document outlines the foundational guidelines and standard operating procedures (SOPs) for setting up and maintaining the Next.js application codebase using the App Router. Adhering to these guidelines ensures code consistency, type safety, performance optimization, and maintainability.


1. Codebase Setup and Consistency

The project will use the Next.js App Router for all new development. The App Router is designed to leverage modern React features, such as Server Components, and provides improved structure and performance.

Project Organization:

  • Structure: We utilize a logical and consistent file/folder structure. The primary application logic resides within the app/ directory. We may optionally use a src/ folder to separate application code from project configuration files.
  • Colocation: Favor colocation, grouping related components, logic, and tests within their respective route directories where it makes sense. Files placed within a route segment folder that are not special files (page.js, route.js, etc.) are safe to be colocated without accidentally becoming routable.
  • Utility Folders: Use private folders (prefixed with an underscore, e.g., _utils, _components) for storing utility functions and shared components, although colocation generally ensures non-routability.

2. Type Safety and Development Tooling

Mandate the use of TypeScript for improved code quality, type safety, and better developer experience.

2.1 TypeScript Configuration

Next.js provides built-in TypeScript support. When configuring or verifying the project setup:

  1. Enforce TypeScript: All application files must use .ts or .tsx extensions.

  2. Include Generated Next.js Types: To maintain type validation, especially for features like statically typed links, developers must ensure the generated Next.js types are included in the tsconfig.json file.

    • Verify that .next/types/**/*.ts is present in the include array of tsconfig.json:
    json
    1// tsconfig.json excerpt
    2{
    3 "include": [
    4 "next-env.d.ts",
    5 ".next/types/**/*.ts", // This is required for generated types
    6 "**/*.ts",
    7 "**/*.tsx"
    8 ],
    9 "exclude": ["node_modules"]
    10}

2.2 Tooling

Configure essential tooling such as ESLint for code linting and Prettier for consistent code formatting.


3. Styling and Component Implementation

3.1 Styling Strategy

The primary styling strategy is the utility-first philosophy of Tailwind CSS. Tailwind CSS works by scanning HTML files and components for class names and generating corresponding styles.

Supported styling methods within the application include:

  1. Tailwind CSS: Preferred method using utility classes.
  2. CSS Modules: Supported for scoped component styles.
  3. Global CSS: Used for defining base styles and configuration.

3.2 Component Implementation (shadcn/ui)

We will utilize shadcn/ui for high-quality, accessible components.

  • Open Code Philosophy: Unlike traditional component libraries installed via NPM, shadcn/ui operates on an Open Code philosophy. Developers are handed the actual component code (distributed via a CLI).
  • Customization: This approach provides full control to customize and extend components directly, making it unnecessary to wrap components or write workarounds to override styles.
  • Composition: All shadcn/ui components are designed to be composable and share a common, predictable interface, promoting system consistency.
  • Installation: Components are added using the command-line tool (npx shadcn@latest add <component>).

4. Routing Implementation

The Next.js App Router uses a file-system-based routing system where folders define URL segments and special files like page.js (or .tsx) define the page contents.

4.1 Navigation Between Routes

Developers should use the following methods for navigation:

  1. Link Component: For declarative navigation and smooth client-side transitions, use the Link component imported from next/link. The Link component uses the href property to specify the navigation route.
  2. useRouter Hook: Use the useRouter hook (from next/navigation) for programmatic navigation, such as navigating after a button click or form submission. Programmatic navigation is typically handled using methods like router.push(url) or router.replace(url).

4.2 Client Component Directive

Crucially, any component utilizing React Hooks, including useRouter from next/navigation, must be explicitly declared as a Client Component.

  • This declaration is achieved by adding the 'use client' directive at the top of the file, before any import statements.

5. State Management and Error Handling

The App Router provides dedicated special files for managing loading states, errors, and unhandled routes, utilizing React Suspense and Error Boundaries.

| Special File | Purpose | Requirement/Context | | :--- | :--- | :--- | | loading.js / .tsx | Shows a loading indicator or skeleton UI for a route segment. | Automatically wraps the component in a <Suspense> boundary. This UI triggers when an asynchronous request is detected. | | error.js / .tsx | Catches unexpected runtime errors within a route segment or its children. | The exported React component must be a Client Component and include the 'use client' directive at the top. | | not-found.js / .tsx | Defines a custom UI for unmatched routes, serving as a custom 404 page. | This special file must export a React component. It can also be invoked programmatically using notFound(). |


6. SEO and Performance Optimization

All pages must prioritize SEO and performance optimizations.

6.1 SEO Metadata

In the Next.js App Router, metadata handling utilizes specific conventions.

  • Requirement: For defining SEO metadata, developers must use the export const metadata = {} object or the generateMetadata() function.
  • Content: Each page must include essential metadata such as title, meta description, Open Graph tags (e.g., og:title, og:image), and Twitter Card tags.

6.2 Strategic Rendering and Data Fetching

Mandate the strategic utilization of server-side rendering (SSR), static site generation (SSG), and incremental static regeneration (ISR) based on content dynamism.

In the App Router, data fetching uses the standard fetch API and Async React Server Components. Next.js manages caching and rendering based on fetch options:

| Rendering Type | Next.js App Router Data Fetching equivalent | fetch Options | | :--- | :--- | :--- | | Static Site Generation (SSG) | Cached until manually invalidated (similar to getStaticProps). | cache: 'force-cache' (default) | | Incremental Static Regeneration (ISR) | Cached with a specific lifetime (similar to getStaticProps with revalidate). | next: { revalidate: N } | | Server-Side Rendering (SSR) | Refetched on every request (similar to getServerSideProps). | cache: 'no-store' |

6.3 Optimization Assets

  • Image Optimization: Developers must integrate the Next.js Image component and optimize image assets for faster loading times.
  • Font Optimization: Utilize Next.js Font Optimization to improve web performance.

testing.md


text
1Draft the testing.md file defining the Quality Assurance strategy. Specify the integration of a robust testing framework such as Jest and React Testing Library as development dependencies. Detail the need for a clear testing strategy encompassing unit, integration, and end-to-end tests. Establish the mandatory requirement for Code Coverage reporting to ensure adequate test coverage is maintained. Ensure the plan requires testing critical Next.js features, including:
2
3Functionality of all major route types (Static, Dynamic, Nested, Parallel).
4Validation of programmatic navigation using the useRouter hook methods (push, replace, prefetch).
5Confirmation that the specialized files, error.js and not-found.js, correctly intercept and display expected errors and 404 states.
testing.md

testing.md:

Quality Assurance Strategy

1. Quality Assurance Strategy Overview

The Quality Assurance strategy mandates the integration of robust testing practices throughout the development lifecycle to ensure the scalability, reliability, and maintainability of the Next.js application. This strategy requires a tiered approach to testing, encompassing unit, integration, and end-to-end (E2E) tests.

2. Testing Framework and Dependencies

A robust testing framework must be integrated to facilitate comprehensive quality assurance.

2.1 Development Dependencies

The following tools shall be included in the project's devDependencies to establish a standard testing environment:

| Tool | Purpose | Source Support | | :--- | :--- | :--- | | Jest | Primary JavaScript testing framework. | Found listed in devDependencies as jest and related configurations (@types/jest, jest-environment-jsdom). | | React Testing Library (RTL) | Utility for testing React components, focusing on user experience. | Found listed in devDependencies as @testing-library/react and @testing-library/jest-dom. |

2.2 Code Coverage Requirement

It is a mandatory requirement to set up and maintain code coverage reporting. Code coverage tracking must be implemented (e.g., using a service like Codecov) to monitor and ensure adequate test coverage is consistently maintained across the application.

3. Testing Strategy: Levels of Testing

A clear testing strategy must be established, partitioning testing efforts into three primary categories:

  1. Unit Tests: Focus on testing individual components and utility functions in isolation. For Next.js development, this includes ensuring modularity and reusability of components and logic.
  2. Integration Tests: Focus on verifying how different parts of the application interact, such as testing data flow between components or verifying component interactions with API mock layers.
  3. End-to-End (E2E) Tests: Focus on validating complete user flows from start to finish, simulating a user’s interaction with the entire application.

4. Critical Next.js Feature Testing Requirements

Given the reliance on the Next.js App Router, specific testing must be performed to confirm the correct functionality of core routing and error handling conventions.

4.1 Route Types Functionality Testing

Testing must confirm the correct behavior and accessibility of all major file-system routing patterns:

| Route Type | Next.js Convention | Testing Requirement | Source Support | | :--- | :--- | :--- | :--- | | Static Routes | Defined by directories containing a page.js or .tsx file (e.g., /app/page.js or /app/blog/page.js). | Validate that standard, non-dynamic paths resolve correctly and display the expected content. | | | Dynamic Routes | Defined using folders enclosed in square brackets (e.g., [slug]). | Verify that dynamic segments resolve correctly and that the page component receives the necessary parameters (params prop) to render content based on the route segment value. | | | Nested Routes | Created by nesting folders under the app/ directory (e.g., app/about/form/page.js). | Confirm that the nested URL structure is correctly mapped to the corresponding directory structure and that layouts are inherited or scoped correctly. | | | Parallel Routes | Defined using named slots (@folder convention) and rendered simultaneously within the parent layout.js file. | Verify that pages defined in parallel route slots (@growth, @revenue) render correctly when accessed via the parent route (e.g., /dashboard). Also, confirm that these slots are not directly accessible as URL segments (e.g., /dashboard/@growth should not be a route). | |

4.2 Programmatic Navigation Validation

Tests must validate the functionality of programmatic navigation using the useRouter hook, which allows changing routes without the Link component:

  1. router.push(url): Validate that this method handles client-side transitions and adds a new entry to the browser history stack, as intended for standard navigation.
  2. router.replace(url): Validate that this method performs navigation without adding a new entry to the history stack (similar to the replace prop on next/link), preventing the user from navigating back to the previous page using the browser back button.
  3. router.prefetch(url): Validate that this method successfully prefetches the necessary resources for the target URL to ensure faster client-side transitions, particularly useful for non-standard navigations.

4.3 Specialized File Functionality Confirmation

Tests must confirm that special Next.js files correctly handle application errors and missing routes, which are critical aspects of error handling:

  1. error.js (Runtime Errors): Confirm that the presence of an error.js file at a route segment correctly intercepts runtime errors occurring within that segment or its children. Verification must include ensuring the error.js component is correctly defined as a client component using the 'use client' directive.
  2. not-found.js (404/Missing Routes): Confirm that not-found.js correctly intercepts and displays the expected UI when an unmatched route is visited. Furthermore, tests should confirm that invoking the notFound() function programmatically stops rendering the current segment and triggers the nearest not-found.js file.

security.md


Draft the security.md file addressing key concerns for a Next.js application. Outline secure practices for handling API keys, tokens, and sensitive data. Mandate the clear definition and management of Environment Variables for different stages (development, production) using .env files. Highlight the security benefit of using React Server Components (RSC) for data fetching, as this allows direct, safe execution of sensitive operations (like database queries) on the server, preventing credentials from leaking to the client. Require the integration of robust Authentication and Authorization mechanisms, noting that features like NextAuth.js and Middleware are common components for protecting dashboard pages.
security.md

security.md

This document outlines the mandatory security practices and architecture considerations for securing this Next.js application, focusing on handling sensitive data, environment configuration, and authorization controls.


1. Handling Sensitive Information

It is mandatory to implement secure practices for handling API keys, tokens, and sensitive data. These credentials must never be exposed directly in client-side code, and their storage and access should adhere strictly to the guidelines for environment variables and server-side operations outlined below.

2. Environment Variable Management

All sensitive configuration data, such as API keys and database URLs, must be managed using Next.js Environment Variables.

Mandates for Environment Variables:

  1. Clear Definition and Management: Environment variables (e.g., API keys, database URLs) must be clearly defined and managed.
  2. Staging Differentiation: Variables must be segmented based on the application stage (development, staging, production).
  3. Use of .env Files: Next.js utilizes specific top-level files to define environment variables for different stages:
    • .env: General environment variables.
    • .env.local: Local environment variables.
    • .env.production: Production environment variables.
    • .env.development: Development environment variables.
  4. Type Safety (Recommended): If TypeScript is enabled, Next.js can generate types for loaded environment variables during development for improved IntelliSense. Note that types are generated based on variables loaded at development runtime, excluding variables from .env.production* files unless the development server is run with NODE_ENV=production.

3. Leveraging React Server Components (RSC) for Data Security

The Next.js App Router utilizes React Server Components (RSC). This architecture provides a crucial security benefit for data fetching:

  • Safe Server-Side Execution: Next.js recommends fetching all data on the server via RSCs or Route Handlers.
  • Preventing Credential Leakage: Because React Server Components (RSC) execute directly on the server, sensitive operations—such as direct database calls—can be safely performed. This prevents credentials or secrets from leaking to the client, thereby removing the necessity of using an intermediary API Route (Route Handler) to hide secrets when performing data fetching.
  • Direct Data Fetching: RSCs enable developers to use async/await and fetch directly within the component for data retrieval on the server.

4. Authentication and Authorization

The application must integrate robust Authentication and Authorization mechanisms to protect specific routes and resources.

Requirements:

  1. Protected Routes: Features like dashboard pages must be protected by authentication.
  2. Middleware Integration: Middleware (middleware.ts) is a required component for authorization logic. Middleware can inspect incoming requests and implement logic (such as checking for session tokens) before a request is completed.
  3. Authentication Framework: Features like NextAuth.js are common components used in conjunction with Middleware to enforce protected routes.
  4. Redirection: If a user is unauthenticated or unauthorized for a page, they must be programmatically redirected (e.g., using router.push('/login')).

sop.md


text
1Draft the sop.md (Standard Operating Procedures) file detailing the required operational workflow and code management standards for the project.
2
3Version Control: Specify the utilization of Git with a clear branching strategy (e.g., Gitflow or GitHub Flow).
4Code Quality Enforcement: Establish the use of Husky and Lint-Staged to run linters and formatters (ESLint, Prettier) on staged files automatically before committing.
5Development Structure: Enforce adherence to the Next.js Project Structure, including the recommendation to use the optional src/ directory to separate application code from configuration files.
6Deployment: Define the CI/CD Pipeline using services like GitHub Actions or Vercel for automated builds, testing, and deployment.
7Documentation Maintenance: Stipulate the required project documentation: a comprehensive README.md, clear Contributing Guidelines, and consistent maintenance of the Architecture Documentation.
8Next.js Utility Usage: Document the correct use of navigation elements, specifically reserving the native anchor tag (<a/>) for external links, and using the Next.js Link component for internal application navigation.
sop.md

sop.md:

Standard Operating Procedures and Code Management Standards

This document outlines the required operational workflow and code management standards for this project, ensuring consistency, maintainability, and quality across all development phases.


1. Version Control and Branching Strategy

All source code must be managed using Git.

1.1. Platform: The official project repository is hosted on GitHub. 1.2. Branching Strategy: The project must establish and adhere to a clear branching strategy. Developers must choose and follow either the Gitflow or GitHub Flow model for managing code versions and collaboration.

2. Code Quality Enforcement

To ensure adherence to consistent coding standards and enhance code quality, automated tooling must be configured and enforced.

2.1. Linters and Formatters:

  • ESLint must be configured for code linting.
  • Prettier must be configured for consistent code formatting.

2.2. Pre-commit Hooks:

  • Husky and Lint-Staged must be implemented to establish pre-commit hooks.
  • These hooks will automatically run configured linters and formatters (ESLint, Prettier) on staged files before a commit is finalized. This process prevents inconsistent or poorly formatted code from entering the repository.

2.3. Type Safety:

  • TypeScript must be integrated for improved code quality, type safety, and a better developer experience.

3. Development Structure

The project structure must adhere to Next.js conventions, prioritizing organization and code discoverability.

3.1. Next.js App Router Structure:

  • The project utilizes the Next.js App Router.
  • Routes are determined by directory names, and a route is made publicly accessible when a page.js (or .ts/.tsx) or route.js file is added to a route segment.

3.2. Source Directory (src/):

  • It is highly recommended that the optional src/ directory be used to house the application code (including the app/ directory).
  • Utilizing the src/ directory helps separate application code from project configuration files (which typically reside in the root directory).

3.3. Modularity and Co-location:

  • Components and utility functions must be designed to be modular and reusable to promote code reusability.
  • Practice co-location by grouping related files and components together, especially within route segments in the app directory, where non-routable files are safe from public access.

4. Deployment

A robust CI/CD pipeline must be configured to automate the process of building, testing, and deploying the application.

4.1. CI/CD Pipeline Services:

  • A Continuous Integration/Continuous Deployment (CI/CD) pipeline must be configured using services such as GitHub Actions or Vercel.
  • This pipeline will ensure automated builds, tests, and deployment.

4.2. Deployment Platform:

  • The application should be deployed on Vercel.

5. Documentation Maintenance

Comprehensive documentation is required for project maintenance and onboarding new developers.

5.1. README.md:

  • A comprehensive README.md must be maintained.
  • It must include clear instructions for project setup, development, testing, and deployment.

5.2. Contributing Guidelines:

  • Clear Contributing Guidelines must be established to streamline the process for new developers joining the project.

5.3. Architecture Documentation:

  • Key architectural decisions and system design must be consistently documented.

6. Next.js Utility Usage: Navigation Standards

All navigation within the application must follow Next.js best practices for performance and clarity.

6.1. Internal Navigation:

  • For navigation between internal routes or pages within the Next.js application, developers must use the Next.js Link component (imported from next/link).
  • The Link component is the best option for navigating routes, as it enables client-side navigation with built-in optimizations like prefetching.

6.2. External Navigation:

  • The native anchor tag (<a/>) must be reserved exclusively for linking and navigating to a page that is external to the application, or for invoking specific non-navigation functions.

6.3. Programmatic Navigation:

  • If programmatic route changes are necessary (e.g., triggering navigation upon a button click), the useRouter hook (from next/navigation in the App Router) should be utilized.
  • The useRouter hook allows access to methods like router.push() to navigate programmatically. Note that window.location is better suited for external URLs rather than router.push.

Polishing the Project Documents


Now I can simply run a command in your IDE of choice like and copy/paste the contents we have generated:


text
1mkdir docs
2touch docs/ai_guidelines.md
3touch docs/requirements.md
4touch docs/architecture.md
5touch docs/implementation.md
6touch docs/testing.md
7touch docs/security.md
8touch docs/sop.md

Now that I have all of these files in our directory and we are in the IDE we can start using CLIne or whichever AI-assistant you are using to help us build out the project.

Before we begin we can give each of these documents a polish by simply editing them all at the same time! That's right, we are going to vibe context engineer, I know context engineering is not just getting together documents to vibe code and that it involves a lot more, but for our purposes that is what I will call it.

First I am going to write a prompt in order to write out prompt for CLIne so that CLIne will go and edit all of our documents.


You are the best software eningeer in the world and your goal is to draft a CLIne prompt which will edit the following documents for the purpose of filling in context for CLIne to later code a project. So the prompt will instruct for a deliverable of another prompt except this one is for CLIne to edit the files which will then fill in the context for the project. Reference https://github.com/kliewerdaniel/workflow.git for the description of what each of the files is meant to be used for.

I used chatGPT for this and got the following prompt which I am feeding to chatGPT again to get our document editing prompt for CLIne.

text
1You are a documentation editor and context‐gathering assistant working as part of a structured AI-assisted development workflow.
2Your task is to edit, enhance, and fill in missing context across the following markdown files: ai_guidelines.md, requirements.md, architecture.md, implementation.md, testing.md, security.md, and sop.md.
3
4For each file:
5 1. Ensure the purpose of the file is clearly stated (based on the workflow repository’s description). 
6 2. Insert placeholders or tables for project-specific information (project name, domain, stakeholders, personas, technologies, constraints, business objectives, non-functional requirements, security/risk assumptions, deployment environments, KPIs, etc.).
7 3. Ask clarifying questions in the document (via “TODO” or “**?”” markers) where context is missing—so we can later fill them in.
8 4. Ensure each section aligns with standards defined in the standards.md (or if no explicit standards exist yet, create a “Standards” sub-section with prompts for what the standards should cover).
9 5. Cross-link between docs: e.g., link user-stories in requirements.md to components in architecture.md; link testing strategies in testing.md to features in implementation.md; reference deployment pipelines in deployment.md that assume architecture decisions from architecture.md, etc.
10 6. Maintain a consistent flavour and style across all docs: use markdown headings, bullet lists, tables where helpful, and mark items clearly as “Must / Should / Could / Won’t” where applicable.
11 7. Annotate any area that will later require code generation or AI prompt generation (for the later CLine coding phase) — e.g., in prompts.md, add a section “Prompt templates for CLine coding” with placeholders like [COMPONENT_NAME], [API_ENDPOINT], [TEST_SCENARIO], etc.
12
13Deliverable: A single merged prompt (for CLine) that instructs it to perform the editing/enrichment for all the files listed above, with clear ordering, scope, how to handle each file, what to fill in, where to ask questions, and how to prepare the project context so that the next phase (coding) is well-supported.
14
15Important: This prompt is not the coding phase — it’s purely the editing and context-filling phase. It should make clear to CLine the difference, and that once this is done, we will move to code generation.
16
17Be concise but thorough in your instruction: define the sequence in which files should be processed (typically: ai_guidelines → requirements → architecture → implementation → testing → security→ sop), how cross-linking is to be done, and what output format (markdown) is expected (overwriting or creating “filled-in” versions, while keeping original commentary sections for later review).
18
19Also instruct CLine to output a summary at the end listing which questions (context gaps) remain unanswered (so we can fill them manually).
20
21Deliver your prompt now.

This is the prompt we will give to CLIne to polish our documents:


text
1✅ CLine Prompt — Documentation Editing & Context Preparation Phase
2
3You are an AI documentation editor and context-gathering assistant working within a structured AI-assisted development workflow.
4
5Your task is to edit, enhance, and fill in context across the following markdown files in this repository:
6ai_guidelines.md, requirements.md, architecture.md, implementation.md, testing.md, security.md, and sop.md.
7
8This phase is NOT for coding or implementation. It is only for editing documentation and gathering project context so future prompts can generate code.
9
10
11
12📂 Processing Order
13
14Process the files in this order:
15 1. ai_guidelines.md
16 2. requirements.md
17 3. architecture.md
18 4. implementation.md
19 5. testing.md
20 6. security.md
21 7. sop.md
22
23
24
25📌 For Each File — Apply the Following Instructions
26
27For every file listed above:
28
29✅ 1. Declare Purpose
30 • At the top of each file, clearly state its purpose based on the workflow repository’s intent.
31
32✅ 2. Insert Context Placeholders & Tables
33
34Add missing context using markdown tables or placeholder sections for information such as:
35
36Field Description
37Project Name TODO:
38Domain / Industry TODO:
39Stakeholders TODO:
40Personas / Users TODO:
41Technologies / Frameworks TODO:
42Business Objectives TODO:
43Functional Requirements TODO:
44Non-functional Requirements TODO:
45Constraints TODO:
46Deployment Environments TODO:
47Metrics / KPIs TODO:
48Security / Risk Assumptions TODO:
49
50✅ 3. Ask Clarifying Questions
51
52Where context is missing, insert in-line prompts using:
53 • TODO:
54 • **?** next to the missing information or unclear sections.
55
56✅ 4. Align with Standards
57 • If standards.md exists, ensure language/structure matches it.
58 • If no standards apply, add a placeholder section:
59
60### Standards Alignment
61TODO: Define how this document should follow standards for formatting, naming, architecture, security, testing, and documentation.
62
63✅ 5. Cross-Link Relevant Documentation
64 • In requirements.md, link each user story to system components in architecture.md.
65 • In architecture.md, reference implementation strategy in implementation.md.
66 • In testing.md, link each test scenario to requirements and implemented features.
67 • In security.md, reference risks related to architecture decisions.
68 • In sop.md, reference implementation and deployment flows.
69
70Use relative markdown links, e.g.:
71See [Component A](architecture.md#component-a)
72
73✅ 6. Consistent Formatting & Style
74 • Use clear headings (##, ###, etc).
75 • Use bullet points and tables for clarity.
76 • Use MoSCoW format (Must / Should / Could / Won’t) for priority lists.
77
78✅ 7. Mark Sections Needed for Future Code Generation
79
80Add placeholders for future use during coding phase, e.g.:
81
82### Prompt Templates for CLine Coding (To be used later)
83- Implement [COMPONENT_NAME] that connects to [API_ENDPOINT]
84- Generate unit tests for [FEATURE]
85- Create service for [DATA_MODEL]
86
87
88
89
90📤 Output Requirements
91 • Overwrite each markdown file with the enhanced/document-ready version.
92 • Preserve original content where it is useful, but reorganize for clarity.
93 • Add new sections, tables, placeholders, and TODO questions where needed.
94 • At the end of the process, generate a summary file or console output listing:
95 • All unanswered questions (TODOs / ?)
96 • Files updated
97 • Sections requiring manual input
98
99
100
101⚠️ Reminder
102
103This prompt is only for documentation refinement and context collection. Do not write code or implementation logic yet.
104Once documentation is complete, a separate prompt will initiate the coding phase.
105
106
107
108Begin editing the documents now.
109Output summaries and unanswered context questions once complete.

I am using vanilla VSCode for this with the CLIne extension using their free access to grok for sesssion.


Image


The final edited files you can find in the repo under the documents directory. It even was nice enough to output a documentation-summary.md I have included below.


text
1# Documentation Enhancement Summary
2
3This summary provides an overview of the documentation editing and context preparation phase for the Next.js boilerplate project.
4
5## Files Updated
6
7All 7 markdown files in the `docs/` directory have been enhanced with standardized sections, context tables, cross-links, and placeholders for future AI coding prompts:
8
9- ai_guidelines.md
10- requirements.md
11- architecture.md
12- implementation.md
13- testing.md
14- security.md
15- sop.md
16
17## Key Enhancements Applied
18
19### 1. Purpose Declaration
20Each file now starts with a clear statement of its purpose in the project workflow.
21
22### 2. Project Context Table
23Standardized context tables added to all files with fields like:
24- Project Name
25- Domain / Industry
26- Stakeholders / Personas / Users
27- Technologies / Frameworks
28- Business Objectives
29- Functional / Non-functional Requirements
30- Constraints
31- Deployment Environments
32- Metrics / KPIs
33- Security / Risk Assumptions
34
35### 3. Clarifying Questions and Placeholders
36Embedded TODO: and ? markers where context needs specification or clarification.
37
38### 4. Standards Alignment Sections
39TODO sections added for future definition of how each document follows standards for formatting, naming, architecture, security, testing, and documentation.
40
41### 5. Cross-Linking Documentation
42- Requirements links to testing scenarios and implemented features.
43- Architecture links to implementation strategies.
44- Testing links to requirements and implementation.
45- Security links to architecture decisions and SEO practices.
46- SOP links to implementation and deployment flows.
47
48### 6. Consistent Formatting
49- MoSCoW prioritization in requirements.
50- Bullet points and tables for clarity.
51- Clear headings and subheadings.
52
53### 7. Future Code Generation Templates
54Added "Prompt Templates for CLine Coding" sections with specific prompts for implementing features later, such as:
55- Route structures and components
56- Authentication and security features
57- Testing configurations
58- Deployment setups
59
60## Unanswered Questions and TODO Items
61
62### ai_guidelines.md
63- Business Objectives: TODO
64- Functional Requirements: TODO (in context table)
65- Non-functional Requirements: TODO
66- Deployment Environments: TODO: Production servers, CI/CD pipelines
67- Metrics / KPIs: TODO (in context table)
68- Security / Risk Assumptions: TODO (in context table)
69- Standards Alignment: TODO: Define how this document should follow standards...
70
71### requirements.md
72- Functional Requirements: TODO: Define user stories and features (in context table)
73- Metrics / KPIs: TODO: Page load times, error rates (in context table)
74- Security / Risk Assumptions: TODO: Secure data handling, authentication needs (in context table)
75- Standards Alignment: TODO: Define how this document should follow standards...
76
77### architecture.md
78- Standards Alignment: TODO: Define how this document should follow standards...
79
80### implementation.md
81- Standards Alignment: TODO: Define how this document should follow standards...
82
83### testing.md
84- Standards Alignment: TODO: Define how this document should follow standards...
85
86### security.md
87- Standards Alignment: TODO: Define how this document should follow standards...
88
89### sop.md
90- Standards Alignment: TODO: Define how this document should follow standards...
91
92## Sections Requiring Manual Input
93
941. **Standards Definition**: All files have placeholders for defining adherence to external standards (formatting, naming, architecture, security, testing, documentation). If a `standards.md` file exists or will be created, reference it here.
95
962. **Detailed Functional Requirements**: The requirements.md file has a placeholder for defining specific user stories and features. Manual input needed to expand beyond the current high-level MoSCoW items.
97
983. **Metrics and KPIs**: Several tables have TODO items for specific measurable goals (e.g., page load times, test coverage percentages, deployment frequency).
99
1004. **Security Risk Assumptions**: TODO items for specific risks and assumptions in requirements, architecture, and other files.
101
1025. **Business Objectives**: Some files have TODO for specific business objectives beyond the generic descriptions.
103
1046. **Deployment Environments**: Specific environments (development, staging, production) need detailed specification.
105
106## Next Steps
107
108Once this documentation phase is complete, a separate coding phase can begin using the AI coding prompts and context established here. The enhanced documentation provides a solid foundation for consistent, standards-aligned development across all project domains: requirements, architecture, implementation, testing, security, and operations.
109
110All documents are now prepared as "document-ready" versions with embedded context and cross-references to ensure future AI-generated code adheres to the established guidelines.

Drafting the Final CLIne Prompt


We are getting close to being ready to start coding.

Now what we need to do is write a prompt which will generate our FINAL prompt to CLIne. With this prompt we are hoping to get this with just one prompt.

For this mega prompt I use Anthropic to draft it. I think they provide the most detail but I can usually only get one good prompt out before it cuts off free access. That is why I don't just use one service but several in order to never have to pay.

I use the app to use Claude and have install a bunch of MCP servers as well as hooked up my github. This allows you to easily reference files.


Image


Before I ask Claude I am going to formulate the prompt for it carefully and expand on the following prompt with chatGPT.


text
1I want you to write a prompt for an LLM which will generate a prompt for CLIne, take what you know. You are a senior software engineer and you are building a prompt for CLIne. What you are doing is using the context in the docs folder to guide CLIne as it goes along with the coding process. The first thing you should tell CLIne to do is to create a checklist.md file in the docs folder to act as a ledger for CLIne to keep track of its progress but also for observability.
2
3The overall goal for CLIne is to output the absolute very best boilerplate repo for next.js using all of the context in the docs folder. I want you to think of everything CLIne has to offer and to think of all of the intricacies to software development and I want you to know that you have all of the files in the docs folder to help you code this project. This is the CLIne prompt which will build the next.js boilerplate repo as outlined in the docs folder.

That gives us our prompt to give to Claude. I only expanded it because I usually only get one good generation a day for free wtih Claude and I insiste on not paying.


text
1You are a senior software engineer designing a prompt for CLine to build a Next.js boilerplate repo.
2
3Your goal: produce a single prompt that instructs CLine to:
4 1. Create a new docs/checklist.md inside the docs folder. This file will act as a progress ledger/observability guide for CLine: each major step, sub-task, status, and link back to the docs context must be tracked here.
5 2. Use all of the context found in the existing docs folder (ai_guidelines.md, requirements.md, architecture.md, implementation.md, testing.md, security.md, sop.md, etc) to inform the structure, architecture, tooling, conventions, and deliverables of the boilerplate.
6 3. Produce a Next.js repository incorporating best practices and boilerplate parameters (folder structure, TypeScript support, linting, formatting, CI/CD, testing, deployment, security hardening, observability, performance, etc). Use referenced best-practice sources as guidance.
7 4. Maintain traceability between docs context and code structure: e.g., link from requirements to implemented components, architecture decisions to folder/file naming, testing strategies to code coverage setup, deployment instructions to folder layout.
8 5. Use the checklist.md as a continuous ledger: for each step (init repo, set up TypeScript, set up lint/prettier, create folder structure, create sample component, wiring CI/CD, create tests, set up security config, set up observability/monitoring, create README, etc) mark status (“Not Started / In Progress / Done”), timestamp, docs references, and next actions.
9 6. Ensure the overall boilerplate is absolutely best-in-class: incorporate modern patterns (for example, TypeScript, Next.js App Router or Pages Router as appropriate, modular folder structure, environment management, performance optimization) as hinted by best-practice sources. 
10 7. At the end of the generated prompt, tell CLine explicitly how to output:
11
12 • Create the docs/checklist.md file and update it as it works.
13 • Commit code / files in the repository according to each checklist entry.
14 • Provide the created boilerplate repo in a zipped format (or push instructions) once checklist is complete.
15
16Important: The prompt you generate for CLine should itself be clear, step-by-step, numbered, and quote placeholders like [PROJECT_NAME], [TECH_STACK], [DEPLOYMENT_TARGET] etc so that the next phase is parameterized. It should define the sequence of tasks CLine must follow, and reference the docs context at each step.
17
18Deliverables:
19 • The prompt that you’ll feed to CLine.
20 • Ensure that prompt tells CLine to create the docs/checklist.md ledger first.
21 • Ensure that prompt defines how the docs folder context influences the code generation.
22
23Remember: This is the prompt-generation phase (you’re generating a prompt for CLine), not the code-generation phase itself.
24
25Output now the full prompt for CLine.

Now we have the one and final prompt hopefully for our project. As you can see this prompt does not even have a lot of the details we need to get started since we have supplied all of that in our docs folder.

Final CLIne Prompt

CLine Prompt: Next.js Boilerplate Repository Creation with Observability Ledger

You are an expert software engineer tasked with creating a production-ready Next.js boilerplate repository. This boilerplate must adhere strictly to all guidelines, requirements, architecture patterns, implementation standards, testing strategies, security practices, and operational procedures documented in the existing docs/ folder.

Project Parameters

  • PROJECT_NAME: [nextjs-boilerplate] (replace with actual project name)
  • TECH_STACK: Next.js (App Router), React 18+, TypeScript, Tailwind CSS, shadcn/ui
  • DEPLOYMENT_TARGET: [Vercel] (replace with target platform)
  • NODE_VERSION: v18.18.0 or later
  • REPOSITORY_HOST: [GitHub] (replace with Git hosting platform)

Phase 0: Initialize Observability Ledger (CRITICAL FIRST STEP)

Before any code generation begins, you must create docs/checklist.md as your progress tracking and observability ledger.

Step 0.1: Create Checklist Structure

Create docs/checklist.md with the following structure:

markdown
1# Next.js Boilerplate - Implementation Checklist & Progress Ledger
2
3## Purpose
4This document tracks the implementation progress of the Next.js boilerplate repository, ensuring full traceability between documentation context and actual code deliverables.
5
6## Legend
7- ⬜ Not Started
8- 🟡 In Progress
9- ✅ Done
10- ❌ Blocked/Issue
11
12## Progress Overview
13| Phase | Status | Progress | Last Updated |
14|-------|--------|----------|--------------|
15| Phase 0: Ledger Setup | 🟡 | 0% | [TIMESTAMP] |
16| Phase 1: Repository Initialization || 0% | - |
17| Phase 2: Core Framework Setup || 0% | - |
18| Phase 3: Type Safety & Tooling || 0% | - |
19| Phase 4: Styling & UI Components || 0% | - |
20| Phase 5: Project Structure || 0% | - |
21| Phase 6: Routing Implementation || 0% | - |
22| Phase 7: Data Fetching & State || 0% | - |
23| Phase 8: Testing Infrastructure || 0% | - |
24| Phase 9: Security Hardening || 0% | - |
25| Phase 10: CI/CD Pipeline || 0% | - |
26| Phase 11: Performance & SEO || 0% | - |
27| Phase 12: Documentation || 0% | - |
28| Phase 13: Final Validation || 0% | - |
29
30---
31
32## Detailed Task Tracking
33
34[Task sections will be populated as you progress through each phase]

Step 0.2: Update Ledger After Each Task

After completing each task in subsequent phases:

  1. Update the task status (⬜ → 🟡 → ✅)
  2. Add timestamp
  3. Link to relevant docs context
  4. Note any deviations or decisions made
  5. List next actions

Commit the checklist after every major milestone.


Phase 1: Repository Initialization

Docs Context References:

  • docs/sop.md (Section 1: Version Control)
  • docs/requirements.md (Section 1: System Prerequisites)

Task 1.1: Initialize Git Repository ⬜

Action Steps:

  1. Initialize a new Git repository
  2. Create .gitignore for Next.js (node_modules, .next, .env.local, etc.)
  3. Set up initial branch structure (main/develop based on chosen Git Flow strategy)

Docs Traceability:

  • Reference: docs/sop.md - Section 1.2 Branching Strategy
  • Requirement: Git-based version control with GitHub hosting

Checklist Update:

markdown
1### Task 1.1: Initialize Git Repository ✅
2- **Status**: Done
3- **Timestamp**: [YYYY-MM-DD HH:MM]
4- **Docs Reference**: docs/sop.md#version-control
5- **Deliverables**:
6 - ✅ .git folder initialized
7 - ✅ .gitignore created
8 - ✅ main branch established
9- **Commit**: `git commit -m "chore: initialize repository with .gitignore"`
10- **Next Action**: Task 1.2

Task 1.2: Initialize Next.js Project ⬜

Action Steps:

  1. Run npx create-next-app@latest [PROJECT_NAME] with following selections:
    • ✅ TypeScript
    • ✅ ESLint
    • ✅ Tailwind CSS
    • ✅ App Router (MANDATORY per docs/ai_guidelines.md Section 1.1)
    • ✅ src/ directory (recommended per docs/sop.md Section 3.2)
    • ❌ Turbopack (optional, evaluate based on stability)
  2. Verify Node.js version requirement (v18.18.0+)

Docs Traceability:

  • Reference: docs/ai_guidelines.md - Section 1: Core Framework
  • Reference: docs/requirements.md - Section 2: Core Application Framework
  • Requirement: Exclusive use of App Router

Checklist Update: Add completion details, timestamp, commit reference

Task 1.3: Configure Package.json ⬜

Action Steps:

  1. Update project metadata (name, version, description, author)
  2. Add custom scripts:
    json
    1{
    2 "scripts": {
    3 "dev": "next dev",
    4 "build": "next build",
    5 "start": "next start",
    6 "lint": "next lint",
    7 "lint:fix": "next lint --fix",
    8 "format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\"",
    9 "format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,json,md}\"",
    10 "test": "jest",
    11 "test:watch": "jest --watch",
    12 "test:coverage": "jest --coverage",
    13 "type-check": "tsc --noEmit",
    14 "prepare": "husky install"
    15 }
    16}

Docs Traceability:

  • Reference: docs/sop.md - Section 2: Code Quality Enforcement
  • Reference: docs/testing.md - Section 2: Testing Framework

Checklist Update: Track completion and commit


Phase 2: Core Framework Setup

Docs Context References:

  • docs/ai_guidelines.md (Section 1.2: RSC Requirement)
  • docs/architecture.md (Section 1: Routing Architecture)

Task 2.1: Configure Next.js Config ⬜

Action Steps:

  1. Create/update next.config.ts with mandatory settings:
    typescript
    1import type { NextConfig } from 'next'
    2
    3const nextConfig: NextConfig = {
    4 typedRoutes: true, // MANDATORY per docs/ai_guidelines.md Section 2.1
    5 reactStrictMode: true,
    6 // Add other configuration as needed
    7}
    8
    9export default nextConfig

Docs Traceability:

  • Reference: docs/ai_guidelines.md - Section 2.1: Statically Typed Links
  • Requirement: typedRoutes: true must be enabled

Checklist Update: Mark complete with config snippet reference

Task 2.2: Verify App Router Structure ⬜

Action Steps:

  1. Confirm app/ directory exists (or src/app/ if using src/)
  2. Verify default app/layout.tsx exists
  3. Verify default app/page.tsx exists
  4. Ensure Server Components are default (no 'use client' in base files)

Docs Traceability:

  • Reference: docs/ai_guidelines.md - Section 1.2: Default Component Type RSC
  • Reference: docs/architecture.md - Section 1: Routing Architecture
  • Requirement: React Server Components as default

Checklist Update: Document structure verification


Phase 3: Type Safety & Tooling

Docs Context References:

  • docs/implementation.md (Section 2: Type Safety)
  • docs/sop.md (Section 2: Code Quality)

Task 3.1: Configure TypeScript ⬜

Action Steps:

  1. Verify/update tsconfig.json includes generated Next.js types:
    json
    1{
    2 "compilerOptions": {
    3 "target": "ES2017",
    4 "lib": ["dom", "dom.iterable", "esnext"],
    5 "allowJs": true,
    6 "skipLibCheck": true,
    7 "strict": true,
    8 "noEmit": true,
    9 "esModuleInterop": true,
    10 "module": "esnext",
    11 "moduleResolution": "bundler",
    12 "resolveJsonModule": true,
    13 "isolatedModules": true,
    14 "jsx": "preserve",
    15 "incremental": true,
    16 "plugins": [{ "name": "next" }],
    17 "paths": {
    18 "@/*": ["./src/*"]
    19 }
    20 },
    21 "include": [
    22 "next-env.d.ts",
    23 ".next/types/**/*.ts",
    24 "**/*.ts",
    25 "**/*.tsx"
    26 ],
    27 "exclude": ["node_modules"]
    28}
  2. Verify .next/types/**/*.ts is in include array

Docs Traceability:

  • Reference: docs/implementation.md - Section 2.1: TypeScript Configuration
  • Requirement: Include generated Next.js types for statically typed links

Checklist Update: Track TypeScript configuration

Task 3.2: Configure ESLint ⬜

Action Steps:

  1. Verify .eslintrc.json exists with Next.js defaults
  2. Add custom rules if needed:
    json
    1{
    2 "extends": ["next/core-web-vitals", "next/typescript"],
    3 "rules": {
    4 "@typescript-eslint/no-unused-vars": "error",
    5 "@typescript-eslint/no-explicit-any": "warn"
    6 }
    7}

Docs Traceability:

  • Reference: docs/implementation.md - Section 2.2: Tooling
  • Reference: docs/sop.md - Section 2.1: Linters and Formatters

Checklist Update: Document ESLint configuration

Task 3.3: Configure Prettier ⬜

Action Steps:

  1. Create .prettierrc.json:
    json
    1{
    2 "semi": false,
    3 "trailingComma": "es5",
    4 "singleQuote": true,
    5 "tabWidth": 2,
    6 "useTabs": false,
    7 "printWidth": 100
    8}
  2. Create .prettierignore:
    text
    1node_modules
    2.next
    3out
    4public

Docs Traceability:

  • Reference: docs/sop.md - Section 2.1: Linters and Formatters

Checklist Update: Track Prettier setup

Task 3.4: Setup Husky & Lint-Staged ⬜

Action Steps:

  1. Install dependencies:
    bash
    1npm install --save-dev husky lint-staged
  2. Initialize Husky:
    bash
    1npx husky-init && npm install
  3. Create .husky/pre-commit:
    bash
    1#!/usr/bin/env sh
    2. "$(dirname -- "$0")/_/husky.sh"
    3npx lint-staged
  4. Add to package.json:
    json
    1{
    2 "lint-staged": {
    3 "*.{js,jsx,ts,tsx}": ["eslint --fix", "prettier --write"],
    4 "*.{json,md}": ["prettier --write"]
    5 }
    6}

Docs Traceability:

  • Reference: docs/sop.md - Section 2.2: Pre-commit Hooks
  • Requirement: Prevent poorly formatted code from entering repository

Checklist Update: Document pre-commit hook setup


Phase 4: Styling & UI Components

Docs Context References:

  • docs/ai_guidelines.md (Section 3: Styling and UI)
  • docs/implementation.md (Section 3: Styling)

Task 4.1: Verify Tailwind Configuration ⬜

Action Steps:

  1. Verify tailwind.config.ts exists with proper content paths:
    typescript
    1import type { Config } from 'tailwindcss'
    2
    3const config: Config = {
    4 content: [
    5 './src/pages/**/*.{js,ts,jsx,tsx,mdx}',
    6 './src/components/**/*.{js,ts,jsx,tsx,mdx}',
    7 './src/app/**/*.{js,ts,jsx,tsx,mdx}',
    8 ],
    9 theme: {
    10 extend: {},
    11 },
    12 plugins: [],
    13}
    14export default config
  2. Verify app/globals.css includes Tailwind directives

Docs Traceability:

  • Reference: docs/ai_guidelines.md - Section 3.1: Tailwind CSS Mandate
  • Reference: docs/implementation.md - Section 3.1: Styling Strategy

Checklist Update: Verify Tailwind setup

Task 4.2: Setup shadcn/ui ⬜

Action Steps:

  1. Initialize shadcn/ui:
    bash
    1npx shadcn@latest init
    • Select style, color scheme, etc.
  2. Install initial components for demonstration:
    bash
    1npx shadcn@latest add button
    2npx shadcn@latest add card
    3npx shadcn@latest add input
  3. Verify components are copied to src/components/ui/

Docs Traceability:

  • Reference: docs/ai_guidelines.md - Section 3.2: Open Code Philosophy
  • Reference: docs/implementation.md - Section 3.2: Component Implementation
  • Requirement: Components must be source code, not NPM packages

Checklist Update: Document shadcn/ui integration

Task 4.3: Create components.json ⬜

Action Steps:

  1. Verify components.json was created during shadcn/ui init
  2. Ensure it references correct paths:
    json
    1{
    2 "$schema": "https://ui.shadcn.com/schema.json",
    3 "style": "default",
    4 "rsc": true,
    5 "tsx": true,
    6 "tailwind": {
    7 "config": "tailwind.config.ts",
    8 "css": "src/app/globals.css",
    9 "baseColor": "slate",
    10 "cssVariables": true
    11 },
    12 "aliases": {
    13 "components": "@/components",
    14 "utils": "@/lib/utils"
    15 }
    16}

Docs Traceability:

  • Reference: docs/ai_guidelines.md - Section 3.2: UI Component Strategy

Checklist Update: Verify components.json configuration


Phase 5: Project Structure

Docs Context References:

  • docs/ai_guidelines.md (Section 4: Project Structure)
  • docs/architecture.md (Section 2: Structural Organization)
  • docs/sop.md (Section 3: Development Structure)

Task 5.1: Create Private Folders ⬜

Action Steps:

  1. Create private utility folders following underscore convention:
    text
    1src/
    2├── app/
    3├── _components/ # Shared non-routable components
    4├── _lib/ # Utility functions
    5├── _utils/ # Helper utilities
    6├── _hooks/ # Custom React hooks
    7└── _types/ # TypeScript type definitions

Docs Traceability:

  • Reference: docs/ai_guidelines.md - Section 4.2: Private Folders
  • Requirement: Private folders prefixed with underscore

Checklist Update: Document folder structure

Task 5.2: Create Base App Structure ⬜

Action Steps:

  1. Create sample route structure demonstrating best practices:
    text
    1src/app/
    2├── layout.tsx # Root layout
    3├── page.tsx # Home page
    4├── globals.css # Global styles
    5├── (marketing)/ # Route group
    6│ ├── layout.tsx
    7│ └── about/
    8│ └── page.tsx
    9├── dashboard/
    10│ ├── layout.tsx
    11│ ├── page.tsx
    12│ ├── @analytics/ # Parallel route slot
    13│ │ └── page.tsx
    14│ └── @revenue/ # Parallel route slot
    15│ └── page.tsx
    16├── blog/
    17│ ├── [slug]/ # Dynamic route
    18│ │ └── page.tsx
    19│ └── page.tsx
    20├── api/
    21│ └── hello/
    22│ └── route.ts # Route handler
    23├── loading.tsx # Root loading UI
    24├── error.tsx # Root error boundary
    25└── not-found.tsx # Custom 404 page

Docs Traceability:

  • Reference: docs/architecture.md - Section 1: Routing Architecture
  • Reference: docs/architecture.md - Section 2: Route Groups & Parallel Routing
  • Requirement: Demonstrate all major routing patterns

Checklist Update: Track structure creation

Task 5.3: Create Utility Files ⬜

Action Steps:

  1. Create src/_lib/utils.ts with common utilities:
    typescript
    1import { type ClassValue, clsx } from 'clsx'
    2import { twMerge } from 'tailwind-merge'
    3
    4export function cn(...inputs: ClassValue[]) {
    5 return twMerge(clsx(inputs))
    6}
  2. Create src/_types/index.ts for shared types
  3. Create sample custom hooks in src/_hooks/

Docs Traceability:

  • Reference: docs/ai_guidelines.md - Section 4.2: Private Folders Use Cases

Checklist Update: Document utility file creation


Phase 6: Routing Implementation

Docs Context References:

  • docs/requirements.md (Section 3: Routing Capabilities)
  • docs/architecture.md (Section 1: Routing Architecture)
  • docs/implementation.md (Section 4: Routing Implementation)

Task 6.1: Implement Root Layout ⬜

Action Steps:

  1. Update src/app/layout.tsx with proper structure:
    typescript
    1import type { Metadata } from 'next'
    2import { Inter } from 'next/font/google'
    3import './globals.css'
    4
    5const inter = Inter({ subsets: ['latin'] })
    6
    7export const metadata: Metadata = {
    8 title: 'Next.js Boilerplate',
    9 description: 'Production-ready Next.js boilerplate',
    10}
    11
    12export default function RootLayout({
    13 children,
    14}: {
    15 children: React.ReactNode
    16}) {
    17 return (
    18 <html lang="en">
    19 <body className={inter.className}>{children}</body>
    20 </html>
    21 )
    22}

Docs Traceability:

  • Reference: docs/architecture.md - Section 2.B: Nested Layouts
  • Requirement: Root layout wraps all pages

Checklist Update: Track root layout implementation

Task 6.2: Implement Static Routes ⬜

Action Steps:

  1. Create home page (app/page.tsx)
  2. Create about page (app/(marketing)/about/page.tsx)
  3. Implement proper Server Components with async data fetching examples

Docs Traceability:

  • Reference: docs/requirements.md - Section 3.1: Static Routes
  • Reference: docs/ai_guidelines.md - Section 1.2: RSC as Default

Checklist Update: Document static route implementation

Task 6.3: Implement Dynamic Routes ⬜

Action Steps:

  1. Create app/blog/[slug]/page.tsx:
    typescript
    1interface PageProps {
    2 params: { slug: string }
    3}
    4
    5export default async function BlogPost({ params }: PageProps) {
    6 const { slug } = params
    7 // Fetch data based on slug
    8 return <div>Blog Post: {slug}</div>
    9}
    10
    11export async function generateStaticParams() {
    12 // Generate static paths
    13 return [{ slug: 'first-post' }, { slug: 'second-post' }]
    14}

Docs Traceability:

  • Reference: docs/requirements.md - Section 3.1: Dynamic Routes
  • Reference: docs/architecture.md - Section 1: Dynamic Routing

Checklist Update: Track dynamic route creation

Task 6.4: Implement Parallel Routes ⬜

Action Steps:

  1. Create dashboard with parallel slots:
    • app/dashboard/@analytics/page.tsx
    • app/dashboard/@revenue/page.tsx
  2. Update app/dashboard/layout.tsx to receive slots as props:
    typescript
    1export default function DashboardLayout({
    2 children,
    3 analytics,
    4 revenue,
    5}: {
    6 children: React.ReactNode
    7 analytics: React.ReactNode
    8 revenue: React.ReactNode
    9}) {
    10 return (
    11 <div>
    12 <div>{children}</div>
    13 <div className="grid grid-cols-2 gap-4">
    14 {analytics}
    15 {revenue}
    16 </div>
    17 </div>
    18 )
    19}

Docs Traceability:

  • Reference: docs/architecture.md - Section 3: Parallel Rendering
  • Reference: docs/requirements.md - Section 3.1: Parallel Routing

Checklist Update: Document parallel routing implementation

Task 6.5: Implement Route Groups ⬜

Action Steps:

  1. Create app/(marketing)/ folder for marketing pages
  2. Add shared layout in app/(marketing)/layout.tsx
  3. Verify URL paths don't include "(marketing)"

Docs Traceability:

  • Reference: docs/architecture.md - Section 2.C: Route Groups
  • Requirement: Parentheses folders excluded from URL path

Checklist Update: Track route group setup

Task 6.6: Implement Navigation Components ⬜

Action Steps:

  1. Create src/_components/navigation.tsx:
    typescript
    1'use client'
    2
    3import Link from 'next/link'
    4import { useRouter } from 'next/navigation'
    5
    6export function Navigation() {
    7 const router = useRouter()
    8
    9 return (
    10 <nav>
    11 <Link href="/">Home</Link>
    12 <Link href="/about">About</Link>
    13 <Link href="/blog">Blog</Link>
    14 <button onClick={() => router.push('/dashboard')}>
    15 Dashboard
    16 </button>
    17 </nav>
    18 )
    19}

Docs Traceability:

  • Reference: docs/implementation.md - Section 4.1: Navigation Between Routes
  • Reference: docs/sop.md - Section 6: Navigation Standards
  • Requirement: Use Link for internal, useRouter for programmatic

Checklist Update: Document navigation implementation


Phase 7: Data Fetching & State Management

Docs Context References:

  • docs/architecture.md (Section 4: Data Fetching Paradigm)
  • docs/requirements.md (Section 3.3: Efficient Data Fetching)
  • docs/implementation.md (Section 6: Performance Optimization)

Task 7.1: Implement Server-Side Data Fetching ⬜

Action Steps:

  1. Create example in app/blog/page.tsx:
    typescript
    1async function getPosts() {
    2 const res = await fetch('https://api.example.com/posts', {
    3 cache: 'force-cache', // SSG
    4 // cache: 'no-store', // SSR
    5 // next: { revalidate: 60 }, // ISR
    6 })
    7 return res.json()
    8}
    9
    10export default async function BlogPage() {
    11 const posts = await getPosts()
    12 return <div>{/* Render posts */}</div>
    13}

Docs Traceability:

  • Reference: docs/architecture.md - Section 4: Server Component Direct Fetching
  • Reference: docs/implementation.md - Section 6.2: Strategic Rendering
  • Requirement: Server-side data fetching in RSC

Checklist Update: Track data fetching examples

Task 7.2: Implement Route Handlers (API Routes) ⬜

Action Steps:

  1. Create app/api/hello/route.ts:
    typescript
    1import { NextResponse } from 'next/server'
    2
    3export async function GET() {
    4 return NextResponse.json({ message: 'Hello from API' })
    5}
    6
    7export async function POST(request: Request) {
    8 const body = await request.json()
    9 return NextResponse.json({ received: body })
    10}

Docs Traceability:

  • Reference: docs/architecture.md - Section 5: Route Handlers
  • Requirement: Support GET, POST, PUT, DELETE methods

Checklist Update: Document API route creation

Task 7.3: Implement Loading & Error States ⬜

Action Steps:

  1. Create app/blog/loading.tsx:
    typescript
    1export default function Loading() {
    2 return <div>Loading posts...</div>
    3}
  2. Create app/blog/error.tsx:
    typescript
    1'use client'
    2
    3export default function Error({
    4 error,
    5 reset,
    6}: {
    7 error: Error & { digest?: string }
    8 reset: () => void
    9}) {
    10 return (
    11 <div>
    12 <h2>Something went wrong!</h2>
    13 <button onClick={() => reset()}>Try again</button>
    14 </div>
    15 )
    16}
  3. Create app/not-found.tsx:
    typescript
    1export default function NotFound() {
    2 return <div>404 - Page Not Found</div>
    3}

Docs Traceability:

  • Reference: docs/implementation.md - Section 5: State Management
  • Reference: docs/requirements.md - Section 3.2: Error Handling
  • Requirement: loading.js wraps in Suspense, error.js must be Client Component

Checklist Update: Track state management files


Phase 8: Testing Infrastructure

Docs Context References:

  • docs/testing.md (All sections)
  • docs/requirements.md (Section 3.2: Error Handling)

Task 8.1: Install Testing Dependencies ⬜

Action Steps:

  1. Install Jest and React Testing Library:
    bash
    1npm install --save-dev jest jest-environment-jsdom @testing-library/react @testing-library/jest-dom @testing-library/user-event @types/jest
  2. Install additional testing utilities:
    bash
    1npm install --save-dev @testing-library/react-hooks

Docs Traceability:

  • Reference: docs/testing.md - Section 2.1: Development Dependencies

Checklist Update: Track testing package installation

Task 8.2: Configure Jest ⬜

Action Steps:

  1. Create jest.config.js:
    javascript
    1const nextJest = require('next/jest')
    2
    3const createJestConfig = nextJest({
    4 dir: './',
    5})
    6
    7const customJestConfig = {
    8 setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
    9 testEnvironment: 'jest-environment-jsdom',
    10 moduleNameMapper: {
    11 '^@/(.*)$': '<rootDir>/src/$1',
    12 },
    13 collectCoverageFrom: [
    14 'src/**/*.{js,jsx,ts,tsx}',
    15 '!src/**/*.d.ts',
    16 '!src/**/*.stories.{js,jsx,ts,tsx}',
    17 '!src/**/__tests__/**',
    18 ],
    19 coverageThreshold: {
    20 global: {
    21 branches: 80,
    22 functions: 80,
    23 lines: 80,
    24 statements: 80,
    25 },
    26 },
    27}
    28
    29module.exports = createJestConfig(customJestConfig)
  2. Create jest.setup.js:
    javascript
    1import '@testing-library/jest-dom'

Docs Traceability:

  • Reference: docs/testing.md - Section 2.2: Code Coverage Requirement
  • Requirement: >80% code coverage

Checklist Update: Document Jest configuration

Task 8.3: Create Sample Tests ⬜

Action Steps:

  1. Create src/_components/__tests__/navigation.test.tsx:
    typescript
    1import { render, screen } from '@testing-library/react'
    2import { Navigation } from '../navigation'
    3
    4jest.mock('next/navigation', () => ({
    5 useRouter: () => ({
    6 push: jest.fn(),
    7 }),
    8}))
    9
    10describe('Navigation', () => {
    11 it('renders navigation links', () => {
    12 render(<Navigation />)
    13 expect(screen.getByText('Home')).toBeInTheDocument()
    14 })
    15})
  2. Create unit tests for utilities
  3. Create integration tests for API routes

Docs Traceability:

  • Reference: docs/testing.md - Section 3: Testing Strategy
  • Requirement: Unit, Integration, and E2E tests

Checklist Update: Track test file creation

Task 8.4: Create Test for Routing Patterns ⬜

Action Steps:

  1. Create tests for static routes
  2. Create tests for dynamic routes with params
  3. Create tests for parallel routes rendering
  4. Create tests for error.js and not-found.js

Docs Traceability:

  • Reference: docs/testing.md - Section 4: Critical Next.js Feature Testing
  • Requirement: Test all routing conventions

Checklist Update: Document routing tests


Phase 9: Security Hardening

Docs Context References:

  • docs/security.md (All sections)
  • docs/architecture.md (Section 6: Security Considerations)

Task 9.1: Setup Environment Variables ⬜

Action Steps:

  1. Create .env.example:
    text
    1# Database
    2DATABASE_URL=postgresql://user:password@localhost:5432/db
    3
    4# API Keys
    5NEXT_PUBLIC_API_URL=https://api.example.com
    6API_SECRET_KEY=your-secret-key
    7
    8# Auth
    9NEXTAUTH_URL=http://localhost:3000
    10NEXTAUTH_SECRET=your-nextauth-secret
  2. Create .env.local (gitignored)
  3. Document environment variable usage

Docs Traceability:

  • Reference: docs/security.md - Section 2: Environment Variable Management
  • Requirement: Segmented by stage, never exposed to client

Checklist Update: Track env configuration

Task 9.2: Create Middleware for Auth ⬜

Action Steps:

  1. Create src/middleware.ts:
    typescript
    1import { NextResponse } from 'next/server'
    2import type { NextRequest } from 'next/server'
    3
    4export function middleware(request: NextRequest) {
    5 // Example: Check for auth token
    6 const token = request.cookies.get('session')
    7
    8 if (!token && request.nextUrl.pathname.startsWith('/dashboard')) {
    9 return NextResponse.redirect(new URL('/login', request.url))
    10 }
    11
    12 return NextResponse.next()
    13}

Docs Traceability:

  • Reference: docs/security.md - Section 4: Authentication and Authorization
  • Requirement: Middleware for protected routes

Checklist Update: Document middleware implementation

Task 9.3: Implement Server-Side Data Security ⬜

Action Steps:

  1. Create example server component with secure data fetching:
    typescript
    1// app/dashboard/page.tsx
    2async function getSecureData() {
    3 // Direct database call - safe in RSC
    4 const data = await fetch('http://localhost:3000/api/secure', {
    5 headers: {
    6 'Authorization': `Bearer ${process.env.API_SECRET_KEY}`
    7 }
    8 })
    9 return data.json()
    10}
    11
    12export default async function Dashboard() {
    13 const data = await getSecureData()
    14 return <div>{/* Render secure data */}</div>
    15}
  2. Document RSC security benefits in README

Docs Traceability:

  • Reference: docs/security.md - Section 3: Leveraging RSC for Data Security
  • Requirement: Server-side execution prevents credential leakage

Checklist Update: Track secure data fetching implementation

Task 9.4: Add Security Headers ⬜

Action Steps:

  1. Update next.config.ts with security headers:
    typescript
    1const nextConfig: NextConfig = {
    2 typedRoutes: true,
    3 reactStrictMode: true,
    4 async headers() {
    5 return [
    6 {
    7 source: '/(.*)',
    8 headers: [
    9 {
    10 key: 'X-Frame-Options',
    11 value: 'DENY',
    12 },
    13 {
    14 key: 'X-Content-Type-Options',
    15 value: 'nosniff',
    16 },
    17 {
    18 key: 'X-XSS-Protection',
    19 value: '1; mode=block',
    20 },
    21 {
    22 key: 'Referrer-Policy',
    23 value: 'strict-origin-when-cross-origin',
    24 },
    25 ],
    26 },
    27 ]
    28 },
    29}

Docs Traceability:

  • Reference: docs/security.md - Section 1: Handling Sensitive Information
  • Reference: Web security best practices

Checklist Update: Document security headers


Phase 10: CI/CD Pipeline

Docs Context References:

  • docs/sop.md (Section 4: Deployment)
  • docs/requirements.md (Deployment Environments)

Task 10.1: Create GitHub Actions Workflow ⬜

Action Steps:

  1. Create .github/workflows/ci.yml:
    yaml
    1name: CI/CD Pipeline
    2
    3on:
    4 push:
    5 branches: [main, develop]
    6 pull_request:
    7 branches: [main, develop]
    8
    9jobs:
    10 quality:
    11 runs-on: ubuntu-latest
    12 steps:
    13 - uses: actions/checkout@v4
    14
    15 - name: Setup Node.js
    16 uses: actions/setup-node@v4
    17 with:
    18 node-version: '18'
    19 cache: 'npm'
    20
    21 - name: Install dependencies
    22 run: npm ci
    23
    24 - name: Type check
    25 run: npm run type-check
    26
    27 - name: Lint
    28 run: npm run lint
    29
    30 - name: Format check
    31 run: npm run format:check
    32
    33 - name: Run tests
    34 run: npm run test:coverage
    35
    36 - name: Upload coverage
    37 uses: codecov/codecov-action@v3
    38 with:
    39 files: ./coverage/lcov.info
    40 flags: unittests
    41 name: codecov-umbrella
    42
    43 build:
    44 needs: quality
    45 runs-on: ubuntu-latest
    46 steps:
    47 - uses: actions/checkout@v4
    48
    49 - name: Setup Node.js
    50 uses: actions/setup-node@v4
    51 with:
    52 node-version: '18'
    53 cache: 'npm'
    54
    55 - name: Install dependencies
    56 run: npm ci
    57
    58 - name: Build application
    59 run: npm run build
    60
    61 - name: Upload build artifacts
    62 uses: actions/upload-artifact@v3
    63 with:
    64 name: build
    65 path: .next

Docs Traceability:

  • Reference: docs/sop.md - Section 4.1: CI/CD Pipeline Services
  • Requirement: Automated builds, tests, and deployment

Checklist Update: Track CI/CD configuration

Task 10.2: Configure Vercel Deployment ⬜

Action Steps:

  1. Create vercel.json:
    json
    1{
    2 "buildCommand": "npm run build",
    3 "devCommand": "npm run dev",
    4 "installCommand": "npm install",
    5 "framework": "nextjs",
    6 "outputDirectory": ".next"
    7}
  2. Create deployment documentation in README

Docs Traceability:

  • Reference: docs/sop.md - Section 4.2: Deployment Platform
  • Requirement: Deploy on [DEPLOYMENT_TARGET]

Checklist Update: Document Vercel configuration

Task 10.3: Setup Environment Variables for Deployment ⬜

Action Steps:

  1. Document required environment variables for production
  2. Create checklist for Vercel environment variable setup
  3. Add deployment verification steps

Docs Traceability:

  • Reference: docs/security.md - Section 2: Environment Variable Management
  • Requirement: Production environment variables

Checklist Update: Track deployment env setup


Phase 11: Performance & SEO Optimization

Docs Context References:

  • docs/implementation.md (Section 6: SEO and Performance)
  • docs/requirements.md (Section 3.4: SEO Integration)

Task 11.1: Implement SEO Metadata ⬜

Action Steps:

  1. Update app/layout.tsx with comprehensive metadata:
    typescript
    1import type { Metadata } from 'next'
    2
    3export const metadata: Metadata = {
    4 title: {
    5 template: '%s | Next.js Boilerplate',
    6 default: 'Next.js Boilerplate',
    7 },
    8 description: 'Production-ready Next.js boilerplate with App Router',
    9 keywords: ['Next.js', 'React', 'TypeScript', 'Boilerplate'],
    10 authors: [{ name: 'Your Name' }],
    11 creator: 'Your Name',
    12 openGraph: {
    13 type: 'website',
    14 locale: 'en_US',
    15 url: 'https://your-domain.com',
    16 title: 'Next.js Boilerplate',
    17 description: 'Production-ready Next.js boilerplate',
    18 siteName: 'Next.js Boilerplate',
    19 images: [{
    20 url: 'https://your-domain.com/og-image.png',
    21 width: 1200,
    22 height: 630,
    23 }],
    24 },
    25 twitter: {
    26 card: 'summary_large_image',
    27 title: 'Next.js Boilerplate',
    28 description: 'Production-ready Next.js boilerplate',
    29 images: ['https://your-domain.com/twitter-image.png'],
    30 },
    31 robots: {
    32 index: true,
    33 follow: true,
    34 },
    35}

Docs Traceability:

  • Reference: docs/implementation.md - Section 6.1: SEO Metadata
  • Reference: docs/requirements.md - Section 3.4: Mandatory Tags
  • Requirement: title ≤60 chars, description ≤160 chars, OG tags

Checklist Update: Track metadata implementation

Task 11.2: Create Sitemap and Robots.txt ⬜

Action Steps:

  1. Create app/sitemap.ts:
    typescript
    1import { MetadataRoute } from 'next'
    2
    3export default function sitemap(): MetadataRoute.Sitemap {
    4 return [
    5 {
    6 url: 'https://your-domain.com',
    7 lastModified: new Date(),
    8 changeFrequency: 'yearly',
    9 priority: 1,
    10 },
    11 {
    12 url: 'https://your-domain.com/about',
    13 lastModified: new Date(),
    14 changeFrequency: 'monthly',
    15 priority: 0.8,
    16 },
    17 {
    18 url: 'https://your-domain.com/blog',
    19 lastModified: new Date(),
    20 changeFrequency: 'weekly',
    21 priority: 0.5,
    22 },
    23 ]
    24}
  2. Create app/robots.ts:
    typescript
    1import { MetadataRoute } from 'next'
    2
    3export default function robots(): MetadataRoute.Robots {
    4 return {
    5 rules: {
    6 userAgent: '*',
    7 allow: '/',
    8 disallow: ['/api/', '/dashboard/'],
    9 },
    10 sitemap: 'https://your-domain.com/sitemap.xml',
    11 }
    12}

Docs Traceability:

  • Reference: docs/requirements.md - Section 3.4: Generated Files
  • Requirement: sitemap.xml and robots.txt

Checklist Update: Document SEO file generation

Task 11.3: Optimize Images and Fonts ⬜

Action Steps:

  1. Create example with Next.js Image component:
    typescript
    1import Image from 'next/image'
    2
    3export function OptimizedImage() {
    4 return (
    5 <Image
    6 src="/example.jpg"
    7 alt="Example image"
    8 width={800}
    9 height={600}
    10 priority
    11 placeholder="blur"
    12 />
    13 )
    14}
  2. Verify font optimization in layout (already using next/font)
  3. Add image optimization guidelines to README

Docs Traceability:

  • Reference: docs/implementation.md - Section 6.3: Optimization Assets
  • Requirement: Next.js Image and Font Optimization

Checklist Update: Track asset optimization

Task 11.4: Configure Caching Strategies ⬜

Action Steps:

  1. Create examples of different caching strategies:
    typescript
    1// SSG - Static Site Generation
    2async function getStaticData() {
    3 const res = await fetch('https://api.example.com/data', {
    4 cache: 'force-cache' // Default
    5 })
    6 return res.json()
    7}
    8
    9// ISR - Incremental Static Regeneration
    10async function getRevalidatedData() {
    11 const res = await fetch('https://api.example.com/data', {
    12 next: { revalidate: 3600 } // Revalidate every hour
    13 })
    14 return res.json()
    15}
    16
    17// SSR - Server-Side Rendering
    18async function getDynamicData() {
    19 const res = await fetch('https://api.example.com/data', {
    20 cache: 'no-store' // Always fetch fresh
    21 })
    22 return res.json()
    23}
  2. Document caching strategies in README

Docs Traceability:

  • Reference: docs/implementation.md - Section 6.2: Strategic Rendering
  • Requirement: SSG, ISR, SSR based on content dynamism

Checklist Update: Document caching implementation


Phase 12: Documentation

Docs Context References:

  • docs/sop.md (Section 5: Documentation Maintenance)
  • All docs files for context

Task 12.1: Create Comprehensive README.md ⬜

Action Steps:

  1. Create README.md with following sections:
    markdown
    1# Next.js Boilerplate
    2
    3Production-ready Next.js boilerplate with App Router, TypeScript, Tailwind CSS, and shadcn/ui.
    4
    5## Features
    6
    7- ✅ Next.js 14+ with App Router
    8- ✅ React 18+ with Server Components
    9- ✅ TypeScript with strict mode
    10- ✅ Tailwind CSS for styling
    11- ✅ shadcn/ui components (Open Code philosophy)
    12- ✅ ESLint + Prettier for code quality
    13- ✅ Husky + Lint-Staged for pre-commit hooks
    14- ✅ Jest + React Testing Library
    15- ✅ GitHub Actions CI/CD
    16- ✅ Security best practices
    17- ✅ SEO optimization
    18
    19## Prerequisites
    20
    21- Node.js v18.18.0 or later
    22- npm or yarn or pnpm
    23
    24## Getting Started
    25
    26### Installation
    27
    28\`\`\`bash
    29# Clone repository
    30git clone [REPOSITORY_URL]
    31cd [PROJECT_NAME]
    32
    33# Install dependencies
    34npm install
    35
    36# Copy environment variables
    37cp .env.example .env.local
    38
    39# Run development server
    40npm run dev
    41\`\`\`
    42
    43Open [http://localhost:3000](http://localhost:3000) in your browser.
    44
    45## Project Structure
    46
    47\`\`\`
    48src/
    49├── app/ # Next.js App Router
    50│ ├── (marketing)/ # Route group
    51│ ├── api/ # API routes
    52│ ├── blog/ # Blog pages
    53│ ├── dashboard/ # Dashboard with parallel routes
    54│ ├── layout.tsx # Root layout
    55│ ├── page.tsx # Home page
    56│ ├── error.tsx # Error boundary
    57│ ├── loading.tsx # Loading UI
    58│ └── not-found.tsx # 404 page
    59├── _components/ # Shared components
    60├── _lib/ # Utility functions
    61├── _hooks/ # Custom React hooks
    62├── _types/ # TypeScript types
    63└── middleware.ts # Middleware for auth/routing
    64\`\`\`
    65
    66## Available Scripts
    67
    68- `npm run dev` - Start development server
    69- `npm run build` - Build for production
    70- `npm run start` - Start production server
    71- `npm run lint` - Run ESLint
    72- `npm run lint:fix` - Fix ESLint issues
    73- `npm run format` - Format code with Prettier
    74- `npm run format:check` - Check code formatting
    75- `npm run test` - Run tests
    76- `npm run test:watch` - Run tests in watch mode
    77- `npm run test:coverage` - Generate coverage report
    78- `npm run type-check` - Check TypeScript types
    79
    80## Architecture Highlights
    81
    82### App Router
    83- File-system based routing
    84- Server Components by default
    85- Nested layouts and route groups
    86- Parallel routing for dashboards
    87- Dynamic routes with `[slug]` convention
    88
    89### Data Fetching
    90- Server-side fetching with `fetch` API
    91- Caching strategies (SSG, ISR, SSR)
    92- Direct database calls in Server Components
    93- Route Handlers for API endpoints
    94
    95### Styling
    96- Tailwind CSS utility-first approach
    97- shadcn/ui components (customizable source code)
    98- CSS Modules support
    99- Responsive design patterns
    100
    101### Testing
    102- Jest for unit testing
    103- React Testing Library for component testing
    104- Coverage threshold: 80%
    105- GitHub Actions for CI/CD
    106
    107### Security
    108- Environment variable management
    109- Server-side data fetching
    110- Middleware for authentication
    111- Security headers configured
    112
    113## Environment Variables
    114
    115See `.env.example` for required environment variables.
    116
    117## Deployment
    118
    119### Vercel (Recommended)
    120
    1211. Push code to GitHub
    1222. Import project in Vercel
    1233. Configure environment variables
    1244. Deploy
    125
    126## Documentation
    127
    128Comprehensive documentation available in `docs/`:
    129- [AI Guidelines](docs/ai_guidelines.md)
    130- [Requirements](docs/requirements.md)
    131- [Architecture](docs/architecture.md)
    132- [Implementation](docs/implementation.md)
    133- [Testing](docs/testing.md)
    134- [Security](docs/security.md)
    135- [SOP](docs/sop.md)
    136- [Checklist](docs/checklist.md)
    137
    138## Contributing
    139
    140See [CONTRIBUTING.md](CONTRIBUTING.md) for contribution guidelines.
    141
    142## License
    143
    144MIT License - see [LICENSE](LICENSE) for details.

Docs Traceability:

  • Reference: docs/sop.md - Section 5.1: README.md
  • Requirement: Setup, development, testing, deployment instructions

Checklist Update: Track README creation

Task 12.2: Create CONTRIBUTING.md ⬜

Action Steps:

  1. Create CONTRIBUTING.md:
    markdown
    1# Contributing Guidelines
    2
    3Thank you for considering contributing to this project!
    4
    5## Getting Started
    6
    71. Fork the repository
    82. Clone your fork
    93. Create a feature branch
    104. Make your changes
    115. Run tests and linting
    126. Commit with conventional commits
    137. Push to your fork
    148. Create a Pull Request
    15
    16## Development Workflow
    17
    18### Branching Strategy
    19
    20We use [GitHub Flow / Gitflow]:
    21- `main` - Production-ready code
    22- `develop` - Development branch
    23- `feature/*` - Feature branches
    24- `fix/*` - Bug fix branches
    25
    26### Commit Messages
    27
    28Follow [Conventional Commits](https://www.conventionalcommits.org/):
    29- `feat:` - New features
    30- `fix:` - Bug fixes
    31- `docs:` - Documentation changes
    32- `style:` - Code style changes
    33- `refactor:` - Code refactoring
    34- `test:` - Test additions/changes
    35- `chore:` - Maintenance tasks
    36
    37### Code Quality
    38
    39- All code must pass ESLint checks
    40- All code must be formatted with Prettier
    41- All tests must pass
    42- Coverage must maintain >80%
    43- TypeScript strict mode must pass
    44
    45### Pull Request Process
    46
    471. Update documentation if needed
    482. Add tests for new features
    493. Ensure all checks pass
    504. Request review from maintainers
    515. Address review feedback
    526. Squash commits if requested
    53
    54## Code Style
    55
    56- Use TypeScript for all files
    57- Follow ESLint configuration
    58- Use functional components
    59- Prefer Server Components
    60- Use 'use client' only when necessary
    61- Follow naming conventions in docs/
    62
    63## Testing
    64
    65- Write unit tests for utilities
    66- Write component tests with RTL
    67- Write integration tests for features
    68- Maintain coverage above 80%
    69
    70## Questions?
    71
    72Open an issue for discussion!

Docs Traceability:

  • Reference: docs/sop.md - Section 5.2: Contributing Guidelines

Checklist Update: Document contributing guidelines

Task 12.3: Create LICENSE ⬜

Action Steps:

  1. Create LICENSE file (MIT or chosen license)
  2. Add copyright information

Docs Traceability:

  • Reference: Standard open source practices

Checklist Update: Track license file

Task 12.4: Add Inline Code Documentation ⬜

Action Steps:

  1. Add JSDoc comments to utility functions
  2. Add comments explaining complex logic
  3. Document component props with TypeScript interfaces
  4. Add README files in key directories

Docs Traceability:

  • Reference: docs/sop.md - Section 5.3: Architecture Documentation

Checklist Update: Track code documentation


Phase 13: Final Validation & Packaging

Docs Context References:

  • All documentation files
  • docs/checklist.md (self-reference)

Task 13.1: Run Full Test Suite ⬜

Action Steps:

  1. Run all commands to verify setup:
    bash
    1npm run type-check
    2npm run lint
    3npm run format:check
    4npm run test:coverage
    5npm run build
  2. Verify all checks pass
  3. Document any warnings or issues

Docs Traceability:

  • Reference: All implementation phases
  • Requirement: All quality checks must pass

Checklist Update: Track validation results

Task 13.2: Verify Documentation Completeness ⬜

Action Steps:

  1. Review all docs files for completeness
  2. Verify cross-references work
  3. Ensure README accurately reflects implementation
  4. Check that checklist.md is up-to-date

Docs Traceability:

  • Reference: docs/documentation-summary.md
  • Requirement: Traceability between docs and code

Checklist Update: Document verification status

Task 13.3: Security Audit ⬜

Action Steps:

  1. Run npm audit and address vulnerabilities
  2. Verify .env.example doesn't contain secrets
  3. Verify .gitignore excludes sensitive files
  4. Check middleware authentication logic
  5. Verify security headers in next.config.ts

Docs Traceability:

  • Reference: docs/security.md - All sections
  • Requirement: Zero security vulnerabilities

Checklist Update: Track security audit

Task 13.4: Performance Testing ⬜

Action Steps:

  1. Run Lighthouse audit on built application
  2. Verify Core Web Vitals scores
  3. Check bundle size with npm run build
  4. Verify image optimization working
  5. Test loading states and error boundaries

Docs Traceability:

  • Reference: docs/requirements.md - Non-functional Requirements
  • Reference: docs/implementation.md - Section 6: Performance
  • Requirement: Load times <2 seconds

Checklist Update: Document performance metrics

Task 13.5: Create Deployment Checklist ⬜

Action Steps:

  1. Create deployment verification document
  2. List all environment variables needed
  3. Document deployment steps
  4. Create rollback procedures
  5. Add monitoring setup instructions

Docs Traceability:

  • Reference: docs/sop.md - Section 4: Deployment

Checklist Update: Track deployment documentation

Task 13.6: Final Checklist Review ⬜

Action Steps:

  1. Review docs/checklist.md for completeness
  2. Ensure all tasks are marked ✅ or documented as blocked
  3. Add final summary section to checklist
  4. Document known issues or future enhancements
  5. Add completion timestamp

Docs Traceability:

  • Reference: This prompt document
  • Requirement: Full traceability and observability

Checklist Update:

markdown
1## Final Summary
2
3### Completion Status
4- Total Tasks: [NUMBER]
5- Completed: [NUMBER] ✅
6- Blocked: [NUMBER] ❌
7- Overall Progress: [PERCENTAGE]%
8
9### Completion Date
10[YYYY-MM-DD HH:MM]
11
12### Deliverables Checklist
13- ✅ Next.js boilerplate with App Router
14- ✅ TypeScript configuration
15- ✅ Tailwind CSS + shadcn/ui
16- ✅ ESLint + Prettier + Husky
17- ✅ Jest + React Testing Library
18- ✅ GitHub Actions CI/CD
19- ✅ Environment variable setup
20- ✅ Security middleware
21- ✅ SEO optimization
22- ✅ Comprehensive documentation
23- ✅ All tests passing
24- ✅ All quality checks passing
25
26### Known Issues
27[List any known issues or limitations]
28
29### Future Enhancements
30[List potential improvements or features for future versions]
31
32### Traceability Matrix
33All requirements from docs/ mapped to implementation:
34- ai_guidelines.md → [FILES]
35- requirements.md → [FILES]
36- architecture.md → [FILES]
37- implementation.md → [FILES]
38- testing.md → [FILES]
39- security.md → [FILES]
40- sop.md → [FILES]

Task 13.7: Package Repository ⬜

Action Steps:

  1. Ensure all files are committed to Git
  2. Create final commit: git commit -m "chore: complete Next.js boilerplate v1.0.0"
  3. Tag release: git tag v1.0.0
  4. Create repository archive:
    bash
    1# Option 1: Zip file
    2git archive --format=zip --output=nextjs-boilerplate-v1.0.0.zip HEAD
    3
    4# Option 2: Tarball
    5git archive --format=tar.gz --output=nextjs-boilerplate-v1.0.0.tar.gz HEAD
  5. Document push instructions for remote repository

Docs Traceability:

  • Reference: Final deliverable requirement

Checklist Update: Mark packaging complete


Output Instructions for CLine

Continuous Updates

Throughout the entire process:

  1. Update docs/checklist.md after EVERY task completion

    • Change status from ⬜ to 🟡 when starting
    • Change status from 🟡 to ✅ when complete
    • Add timestamp using format: YYYY-MM-DD HH:MM
    • Link to relevant docs context
    • Note any deviations or decisions
    • List next action items
  2. Commit frequently with descriptive messages

    • Use conventional commit format
    • Commit after each major task or logical grouping
    • Reference checklist task number in commits
    • Example: feat: implement typed routes configuration (Task 2.1)
  3. Document decisions and trade-offs

    • Add comments in code explaining "why" not just "what"
    • Update checklist with rationale for implementation choices
    • Note any deviations from docs guidance

Final Deliverables

When all phases are complete:

  1. Verify checklist.md is fully updated

    • All tasks marked with status
    • Final summary section completed
    • Traceability matrix filled out
  2. Create repository archive

    • Generate zip file: nextjs-boilerplate-v1.0.0.zip
    • Include all files except node_modules and .next
    • Ensure .env.example is included, not .env.local
  3. Provide handoff documentation

    • Output location of zip file
    • Provide instructions for:
      • Extracting archive
      • Installing dependencies
      • Running development server
      • Deploying to production
    • Include link to docs/checklist.md for progress reference
  4. Create summary report

    markdown
    1# Next.js Boilerplate - Completion Report
    2
    3## Executive Summary
    4Successfully created production-ready Next.js boilerplate following all guidelines from docs/ folder.
    5
    6## Statistics
    7- Total Files Created: [NUMBER]
    8- Total Lines of Code: [NUMBER]
    9- Test Coverage: [PERCENTAGE]%
    10- Total Commits: [NUMBER]
    11- Time Taken: [DURATION]
    12
    13## Documentation Traceability
    14- ai_guidelines.md: [STATUS] - All mandates implemented
    15- requirements.md: [STATUS] - All requirements met
    16- architecture.md: [STATUS] - Architecture followed
    17- implementation.md: [STATUS] - Standards applied
    18- testing.md: [STATUS] - Testing complete
    19- security.md: [STATUS] - Security hardened
    20- sop.md: [STATUS] - SOPs established
    21
    22## Quality Metrics
    23- Type Safety: ✅ TypeScript strict mode
    24- Code Quality: ✅ ESLint passing
    25- Formatting: ✅ Prettier passing
    26- Testing: ✅ [COVERAGE]% coverage
    27- Build: ✅ Production build successful
    28- Security: ✅ No vulnerabilities
    29
    30## Deliverables
    31- ✅ Repository: [LOCATION]
    32- ✅ Archive: nextjs-boilerplate-v1.0.0.zip
    33- ✅ Documentation: docs/
    34- ✅ Checklist: docs/checklist.md
    35
    36## Next Steps
    371. Extract archive to desired location
    382. Run `npm install`
    393. Copy `.env.example` to `.env.local`
    404. Run `npm run dev`
    415. Review docs/checklist.md for implementation details
    426. Deploy to [DEPLOYMENT_TARGET]

Success Criteria

The boilerplate is considered complete when:

  • ✅ All 13 phases marked as "Done" in checklist.md
  • ✅ All tasks within each phase marked as ✅
  • ✅ All quality checks passing (lint, format, type-check, test)
  • ✅ Test coverage ≥80%
  • ✅ Build successful with no errors
  • ✅ Security audit passed with zero vulnerabilities
  • ✅ All documentation complete and accurate
  • ✅ Full traceability between docs/ and implementation
  • ✅ Repository archived and ready for distribution

Important Reminders

  1. ALWAYS update docs/checklist.md first - This is your source of truth
  2. Reference docs context at every step - Maintain traceability
  3. Commit frequently - Small, logical commits with clear messages
  4. Test as you go - Don't wait until the end to test
  5. Document decisions - Future you (and others) will thank you
  6. Follow the docs strictly - They contain all requirements and constraints
  7. Ask for clarification - If requirements conflict, document and proceed with best judgment

Begin with Phase 0: Creating docs/checklist.md, then proceed systematically through each phase. Good luck! 🚀


Now you can see why I leave Anthropic for the final draft. There are multiple ways to proceed. The best method is to stop after each phase outlined and test everything. But for today I am going to YOLO through all the phases and see if we got it all in one prompt.


Vibe Coding


Image


Image


Image


Image


Link to Repo


Not much effort other than periodically clicking proceed. When most people think about vibe coding they typically think the process begins here but as you can see this is bascially the end. But does it work?


Vibe Debugging


Image


So it runs without errors when I initially start it up. It is functional except for two key part:

No dashboard layout.tsx or page.tsx exists in the dashboard directory. This means the parallel routes (@analytics and @revenue) have content but there's no main dashboard container to display them.

The navigation includes an "/about" link, but there's no corresponding about page or directory in src/app/.

Currently, both pages are incomplete and won't render properly if accessed directly.

Since this is a boilerplate we really don't need all of that since it is pretty simple to expand that functionality if needed or remove it.

Conclusion: Mastering Vibe Coding for Next.js

Vibe coding represents a paradigm shift in software development, combining human expertise with AI assistance to create production-ready applications efficiently. This methodology proves particularly effective for Next.js boilerplate development, enabling rapid creation of robust, scalable applications.

Future implementations can leverage this structured approach to create increasingly sophisticated applications. The combination of comprehensive documentation, AI assistance, and systematic development processes establishes a new standard for efficient software development.

Ready to start your vibe coding journey? Begin with thorough research, create comprehensive documentation, and leverage AI tools to accelerate your Next.js development process.

I would call this success. We were able to create a boilerplate Next.JS repo all in one vibe coding prompt.


Link to Repo


Image

Sovereign AI book cover

Sovereign AI: Building Local-First Intelligent Systems

by Daniel Kliewer · Paperback · 72 pages

The hands-on guide to building AI that runs on your hardware, keeps your data private, and eliminates cloud dependence. Working code included.