Skip to content

Module 03 · Lesson 3.1

Generating a Project Skeleton

40 minUpdated 19 Nov 2026Part of Project Scaffolding · New Project Creation
On this page
  1. What you will learn
  2. What a project skeleton is
  3. Project generator or assistant proposal
  4. Worked scenario: the Tidewell skeleton
  5. Check that every file has a decision
  6. Step-by-step workflow: generate, review, commit
  7. What the assistant does and what you do
  8. Conclusion and your next step
  9. Reusable prompt
  10. Expected output
  11. Common errors and fixes
  12. Validation checklist
  13. Hands-on exercise
  14. Knowledge check
  15. Frequently asked questions
  16. References

Think of a new house. Before anyone paints a wall, a builder puts up the frame, the floors and the pipes. A project skeleton is that frame for software. It is the first set of folders and files that everything else will hang on.

In this lesson you create the skeleton for Tidewell Physiotherapy's booking system. You learn two ways to get one: a project generator, or a proposal from an AI assistant. Then you do the part people skip. You read every file and decide to keep it, change it or delete it, and you write down why.

What you will learn

  • Choose between a project generator and an assistant's proposal, and say why.
  • Generate a skeleton that follows your architecture decisions.
  • Review every generated file and record a keep, change or delete decision with a reason.
  • Make a clean first commit with no secrets and no unexplained files.

Before you start

  • Completed Diagramming the Design, or have your architecture decisions in front of you.
  • Git, a terminal and a code editor installed. Access to any capable AI assistant.
  • Optional: Node.js, if you want to run the examples and the generator yourself.

What a project skeleton is

A project skeleton is the smallest set of files that lets your project start, show a placeholder page and be checked. It has no real features yet. It only proves that the frame stands up.

Getting one wrong costs more than it looks. Every later file is placed relative to the skeleton. A messy frame means messy walls for the whole life of the project.

Repository
The project folder that Git tracks. Think of it as a filing cabinet that remembers every earlier version of every page.
Project generator
A tool that creates the same starting files each time you run it, like a cookie cutter. Next.js has its own, called create-next-app.
Dependency
Ready-made code written by other people that your project uses, like parts bought from a supplier instead of built by hand.
Lock file
A list of the exact dependencies your project was built with, so that everyone installs the same ones.
Commit
A saved snapshot of your project with a short note, like a save point in a game.

Project generator or assistant proposal

You have two ways to get a skeleton. Both are fine. What matters is that you read the result.

Project generatorAssistant's proposal
How it worksYou answer a few questions. The tool writes the files.You describe the stack and rules. The assistant lists or writes the files.
StrengthFiles come from the tool's maintainers and match their current docs.Fits your own layout and rules from the first minute.
RiskIncludes demo files and options you did not ask for.May invent files, settings or package names that do not exist.
Good whenThe framework has an official generator, as Next.js does.You need extra structure, or the framework has no generator.

For Tidewell you use the Next.js generator for the base. Then you use an assistant for the extra folders and files from your layout. That mix gives you official files for the framework and your own structure on top.

Worked scenario: the Tidewell skeleton

Module 2 decided on one deployable web application using TypeScript and the Next.js App Router, with PostgreSQL behind it (ADR-001 and ADR-002). The skeleton must match that and nothing more. The repository is called tidewell-booking.

Bash
npx create-next-app@latest tidewell-booking --typescript --eslint --app --src-dir --import-alias "@/*"
cd tidewell-booking
git status
git log --oneline

Run the generator. These options ask for TypeScript, ESLint, the App Router and a src folder. Names of options can differ by version, so check the docs.

What the generator gives you

The exact files depend on the options and the version you run. Expect something like the list below. The point is not to memorise it. The point is that each row gets a decision.

File or folderDecisionReason
package.jsonChangeSet the project name and add the check scripts in lesson 3.4.
package-lock.jsonKeepPins exact dependency versions so every install matches.
tsconfig.jsonKeepOpen it and confirm strict mode is on. No change needed.
eslint config fileKeepLinting is a stated need. Lesson 3.4 reviews its rules.
next.config fileKeepLeft at its defaults until a decision needs a change.
.gitignoreChangeConfirm it excludes .env files but allows .env.example.
src/app/layout.tsxChangeReplace the demo title with the clinic's booking title.
src/app/page.tsxChangeReplace the demo page with a plain placeholder.
src/app/globals.cssKeepNeeded by the layout. Styling decisions come in Module 5.
public/ demo imagesDeleteUnused logos from the demo page. Nothing refers to them.
README.mdChangeReplace the generic text with how to run, check and configure Tidewell.
A review ledger for the generated files. Your own list will differ.

Some generators make a first commit for you. Run git log --oneline to see. That commit holds the untouched output. It is useful because later commits show exactly what you changed. It is safe because no secret exists yet. Do not share it until you have done the review.

Check that every file has a decision

A ledger is only useful if it is complete. This small script compares the files the generator made with your ledger. It reports files with no decision, rows with no reason and rows that point at a file that is not there.

TypeScriptreview-ledger.ts
export type Decision = "keep" | "change" | "delete";

export interface LedgerRow {
  path: string;
  decision: Decision;
  reason: string;
}

/** Compare the files a generator made with the rows in your review ledger. */
export function checkLedger(generated: string[], ledger: LedgerRow[]): string[] {
  const problems: string[] = [];
  const reviewed = new Set(ledger.map((row) => row.path));

  for (const path of generated) {
    if (!reviewed.has(path)) problems.push(`Not reviewed: ${path}`);
  }
  for (const row of ledger) {
    if (row.reason.trim() === "") problems.push(`No reason given: ${row.path}`);
    if (!generated.includes(row.path)) problems.push(`Not in the project: ${row.path}`);
  }
  return problems;
}

const generated = ["package.json", "src/app/page.tsx", "src/app/globals.css", "public/vercel.svg"];

const ledger: LedgerRow[] = [
  { path: "package.json", decision: "change", reason: "Add check scripts" },
  { path: "src/app/page.tsx", decision: "change", reason: "" },
  { path: "src/app/globals.css", decision: "keep", reason: "Needed by the layout" },
  { path: "src/app/old.css", decision: "delete", reason: "Unused" },
];

const problems = checkLedger(generated, ledger);
console.log(problems.length === 0 ? "Every file has a decision." : problems.join("\n"));

Tested with the TypeScript compiler and run twice. The ledger here is deliberately flawed so you can see each kind of problem.

What each part does

  • Decision lists the three allowed answers. Anything else is a type error.
  • checkLedger takes the generated file names and your ledger rows.
  • The first loop finds generated files nobody reviewed.
  • The second loop finds missing reasons and rows for files that do not exist.
  • The last lines set up a small example and print the result.
OutputCaptured from a real run
Not reviewed: public/vercel.svg
No reason given: src/app/page.tsx
Not in the project: src/app/old.css

You do not need this script in your real project. It shows the idea: a review is a list you can check for gaps, not a feeling that you looked at everything.

Step-by-step workflow: generate, review, commit

  1. Step 1: Write down the stack and the rules

    Copy the decisions from Module 2 onto one page: language, framework, database, layout and what is out of scope. This is what you check the skeleton against.

    What you should see: A short list of decisions you can hold the skeleton up against.

  2. Step 2: Run the generator, or ask for a proposal

    For the generator, use the command from the official docs. For an assistant, use the prompt card and ask for a file list first, with no code yet.

    What you should see: A project folder that starts, or a reviewed list of files to create.

  3. Step 3: List every file and folder

    Use your editor or a directory listing. Open each file and read it. Do not skip configuration files, because they hold the quiet decisions.

    What you should see: A full list of what is in the project.

  4. Step 4: Write the ledger

    Give each file or folder a keep, change or delete decision, with a one-line reason. Ask the assistant to explain any file you do not understand. Then check its explanation against the official docs.

    What you should see: A ledger with no empty reasons.

  5. Step 5: Make the changes and start the project

    Apply the changes and deletions. Install the dependencies and start the project. Open the placeholder page in a browser.

    What you should see: A placeholder page shows, and the project starts from a clean clone.

  6. Step 6: Check for secrets, then commit

    Run git status and look at every file about to be saved. No .env file and no keys. Then commit with a clear message such as 'Add project skeleton'.

    What you should see: A first commit that you can explain line by line.

From decisions to first commit
  1. Decisions

    Stack and rules

  2. Generate

    Tool or proposal

  3. Read every file

    Open each one

  4. Ledger

    Keep, change, delete

  5. Run it

    Placeholder page

  6. Commit

    No secrets

Review sits between generating and saving. Skipping it moves problems into your history.

What the assistant does and what you do

TaskAssistant's partYour part
Choosing the stackNot its job. The stack was decided in Module 2.Give it the decisions and ask it to follow them.
Proposing filesLists files and says what each is for.Check each file is needed, and that none breaks a decision.
Explaining a fileSays in plain words what a file does.Verify the explanation in the official docs.
Adding packagesSuggests packages.Approve each one. Check the name and the reason.
The first commitCan draft a message.Read the list of files and run the checks yourself.

Conclusion and your next step

A skeleton is a set of decisions in file form. Whether it comes from a generator or an assistant, you read every file and record keep, change or delete. You start it, check it holds no secrets and only then commit.

Your next step: a skeleton starts with default folders. Next you give features clear homes. Continue with Repository Structure and Conventions.

For more on working with an assistant, read Giving AI Coding Assistants Useful Context and AI-Generated Code Review Checklist. To practise on a similar clinic, try the Appointment Booking Portal.

Reusable prompt

Skeleton proposal with a file-by-file purpose

Gets a list of proposed files, each with a reason, before any code is written, so you can review it.

You are helping me set up the starting structure of a new project. Do not write any code yet.

Fictional project: tidewell-booking, an appointment booking web app for Tidewell Physiotherapy.
Decisions already made (do not change them):
- One deployable web application serving pages and a REST API.
- TypeScript in strict mode, Next.js with the App Router and a src folder.
- PostgreSQL with plain SQL migration files in db/migrations.
- Folders: docs/, db/migrations/, src/app/, src/features/bookings/, src/lib/, src/components/.
Out of scope: payments, insurer billing, clinical notes, sign-in (a later module).

Tasks:
1. List every file and folder the skeleton needs. For each, give one line: what it is for and which decision above it follows.
2. List every package you would add. For each, say why it is needed now. Do not add packages for features that are out of scope.
3. Mark anything you are unsure exists in current versions as "Check the docs".
4. List files that tools often generate but that this project does not need.
5. Do not include any real keys. Use fake placeholder values only.
Show the reusable template

Replace each {{placeholder}} with your own details.

You are helping me set up the starting structure of a new project. Do not write any code yet.

Project: {{project_name}}, {{one_line_description}}.
Decisions already made (do not change them):
{{decisions}}
Out of scope: {{out_of_scope}}

Tasks:
1. List every file and folder the skeleton needs. For each, give one line: what it is for and which decision above it follows.
2. List every package you would add. For each, say why it is needed now. Do not add packages for features that are out of scope.
3. Mark anything you are unsure exists in current versions as "Check the docs".
4. List files that tools often generate but that this project does not need.
5. Do not include any real keys. Use fake placeholder values only.

Expected output and limitations

A list of files and folders with a one-line purpose each, a short list of packages with reasons, anything uncertain marked 'Check the docs', and a list of generated files you can leave out.

Sample responseIllustrative — your output will differ
src/app/layout.tsx - page frame shared by all pages (decision: App Router)
src/app/page.tsx - placeholder home page
src/lib/config.ts - reads settings once at start-up (decision: one place for settings)
db/migrations/ - numbered SQL files (decision: plain SQL migrations)
docs/ - requirements, criteria, architecture, adr/ (decision: written before code)

Packages: pg - talks to PostgreSQL (decision: node-postgres, plain SQL).
Check the docs: the exact options your generator offers for ESLint and the src folder.
Not needed: demo images, a CSS framework, any sign-in library (out of scope).

Limitations to keep in mind

  • The assistant may list files from an older version of a tool. Compare with what the generator really produced.
  • It may add a package that sounds right but does not exist. Search for each name before installing.
  • A confident purpose line is not proof the file is needed. The decision it cites must be one you actually made.

Common errors and how to fix them

The skeleton is committed with demo files nobody looked at.

Why it happens: The generator's output was assumed to be correct and complete.

Fix: Do the ledger. Delete what has no reason, and say why you kept the rest.

A package from an assistant fails to install, or installs something unexpected.

Why it happens: The name was invented or misspelled, and a different package has a similar name.

Fix: Look up each package name on the official registry first. Check who publishes it and what it does.

The skeleton starts on your machine but not on a fresh clone.

Why it happens: A needed file is ignored by Git, or a step lives only in your head.

Fix: Clone the repository into a new folder and follow your own README. Fix whatever breaks.

Validation checklist

Tick each item once you have confirmed it.

Hands-on exercise

A skeleton review for Ferngate Cycle Repairs

Ferngate Cycle Repairs wants a small web app to record parts taken from the store room. Use the prompt card to get a proposed skeleton for it. Then write a review ledger for the proposal and mark every item keep, change or delete.

You will need

  • Ferngate's decisions: one web application, TypeScript, Next.js App Router, PostgreSQL.
  • Ferngate's facts: mechanics share one tablet, the internet is unreliable, no payments.
  • The assistant's proposed file and package list.

Acceptance criteria

Your work is done when every one of these is true.

Hints (2)
  • Start with the out-of-scope list. Anything that serves it is a candidate to delete.
  • Ask what each package would break if it were missing. If nothing breaks yet, it can wait.
Show a model answer

A strong answer has a ledger with one row per file and per package, each with a real reason tied to a Ferngate decision. It removes something tempting, such as a sign-in library or a payment package, because it is out of scope. It notes where each uncertain claim was checked. It ends with a fresh-clone check: clone, install, start, open the placeholder page, and confirm no environment file is staged. The answer does not need a perfect file list. It needs evidence that a person read each item.

Knowledge check

Choose an answer, then check it. Nothing is recorded — this is for you.

  1. 1.A generator creates 30 files. What should you do before your first commit?
    Show the answer and explanation

    Answer: B. Reading and recording decisions is what makes the skeleton yours. Committing first is tempting because the tool is well known, but unneeded or unsafe content then sits in your history. Deleting almost everything breaks the project for no reason.

  2. 2.An assistant proposes a package you do not recognise. What is the safest next step?
    Show the answer and explanation

    Answer: B. Assistants can produce names that do not exist, or that match a different package. Looking it up first costs a minute. Installing first is tempting but runs unknown code on your machine before you have checked it.

  3. 3.Why start a skeleton from the Module 2 decisions instead of from what the assistant prefers?
    Show the answer and explanation

    Answer: A. The assistant does not know your team, budget or limits, but your decision records do. Smaller size may follow, but it is a side effect. Assistants can create a skeleton without a list, so the second option is simply untrue.

Frequently asked questions

What is a project skeleton?

It is the smallest set of folders and files that lets a project start and show a placeholder page. It has no real features yet. It is the frame that later work is built on.

Should I use create-next-app or ask an AI to scaffold my project?

Use the official generator for the framework's own files, because it matches the current docs. Use an assistant for extra structure that is specific to your project. Whichever you use, read every file before you keep it.

Is it safe to run npx create-next-app?

It runs code downloaded from the internet, so copy the command from the official Next.js documentation and check the package name. Run it in an empty folder. If you are unsure, read the docs page first.

Why delete files that the generator made?

Every file you keep is a file you must understand and maintain. Demo images and sample pages have no purpose in your project. Deleting them early keeps the project small and the history clear.

Written by
PromptFable Editorial
Last updated 19 Nov 2026
Review
Reviewed by Waseem Nadir, Technical Reviewer
Last reviewed 27 Nov 2026

References

Primary sources for the technical details in this lesson. Vendor platforms change — check the official page if anything here looks different from what you see.

PromptFable is independent and is not affiliated with, endorsed by or sponsored by Anthropic, Google, OpenAI or any other vendor. Claude, Gemini, Google AI Studio and other product names are trademarks of their respective owners.