# AI use cases for Factory (Khalidabdi1/factory)

Repo: [Khalidabdi1/factory](https://github.com/Khalidabdi1/factory) | Use cases: 4 | Page: https://dedupedai.com/use-cases/khalidabdi1-factory/

Factory Yard is a Next.js and three.js app that runs a live isometric simulation of a seaside town, a new city, a farming village and a Starship launch site in the browser.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Run the live isometric world on your own machine: https://dedupedai.com/use-cases/khalidabdi1-factory/run-live-isometric-world-locally/
- Publish the town as a static site on any host: https://dedupedai.com/use-cases/khalidabdi1-factory/publish-static-town-site/
- Teach the factory-to-shop flow using the live view: https://dedupedai.com/use-cases/khalidabdi1-factory/teach-supply-chain-flow-with-live-view/
- Add a new place to the yard simulation: https://dedupedai.com/use-cases/khalidabdi1-factory/add-new-place-to-yard-simulation/

## How to run the live isometric world on your own machine with Factory

Repo: [Khalidabdi1/factory](https://github.com/Khalidabdi1/factory) | Difficulty: Intermediate | Time: 30 min | Basis: From the README

Start the Factory Yard simulation locally and watch trucks, people and robberies move in real time.

**Who it is for:** A developer or hobbyist who wants to see the live isometric town running before deciding whether to use it.

**The problem:** Reading about a real-time isometric simulation does not show how it behaves, and the README is the only description available without running it.

**The outcome:** A local copy of the town running in the browser, with clickable cards showing live details for buildings, vehicles and people.

### Steps

1. Clone https://github.com/Khalidabdi1/factory and open the folder in a terminal.
2. Run `npm install`.
3. Run `npm run dev`.
4. Open the local address that `npm run dev` prints in the browser. (inferred, check the README)
5. Click a truck to see its card and route, then click a house to see its live details.

### Prompt to paste into your agent

```text
Clone the repo Khalidabdi1/factory, run `npm install` and then `npm run dev` in its folder, and report the local address the dev server prints. Verify that the page shows the isometric town with moving vehicles before reporting success.
```

### Caveat

The README gives the local page address only as a blank link, so you must read the address from the dev server output.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/khalidabdi1-factory/run-live-isometric-world-locally/

## How to publish the town as a static site on any host with Factory

Repo: [Khalidabdi1/factory](https://github.com/Khalidabdi1/factory) | Difficulty: Intermediate | Time: 30 min | Basis: From the README

Build Factory Yard to plain HTML and JS and host the output anywhere.

**Who it is for:** A developer or small team that wants to share the live town at a public address without running a server.

**The problem:** A dev server is not suitable for sharing with others, and the project needs a build that any static host can serve.

**The outcome:** A folder of plain HTML and JS in out/ that can be uploaded to any static host, plus a local preview to check it first.

### Steps

1. Run `npm install`.
2. Run `npm run build`.
3. Run `npm run preview` and check the built copy in the browser.
4. Upload the contents of the out/ folder to your static host.

### Prompt to paste into your agent

```text
In the repo Khalidabdi1/factory, run `npm install` and `npm run build`, then report the file list in out/. Verify that out/ contains plain HTML and JS files before saying the site is ready to host.
```

### Caveat

The README says the output can be hosted anywhere but does not name a specific host or deployment steps, so you must choose and configure the host yourself.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/khalidabdi1-factory/publish-static-town-site/

## How to teach the factory-to-shop flow using the live view with Factory

Repo: [Khalidabdi1/factory](https://github.com/Khalidabdi1/factory) | Difficulty: Intermediate | Time: 30 min | Basis: From the README

Use the running town to show how goods move from Factory to warehouse to shop.

**Who it is for:** An operations trainer or teacher preparing a session on logistics who needs a visual example of a supply chain.

**The problem:** Slides describing a supply chain are hard to follow, while the flow from Factory to shop is easier to see when the vehicles actually move.

**The outcome:** A live walkthrough in which the trainer points to Plant 01, the flatbeds, Warehouse 01, the box trucks and Corner Market, and shows the cards for each.

### Steps

1. Run `npm install` and `npm run dev` in the repo folder.
2. Open the local page in a browser.
3. Click Plant 01 to show its line and forklifts, then click a flatbed to show its route to the warehouse.
4. Click a box truck on its way to Corner Market and explain the four pallets it carries.
5. Click a home with a Track parcel button to show how an online order is followed on the card.

### Prompt to paste into your agent

```text
Using the repo Khalidabdi1/factory running locally with `npm run dev`, list the cards you can open for Plant 01, Warehouse 01 and Corner Market. Verify each card shows live details before you write the teaching notes.
```

### Caveat

The README describes the flow in a fictional town, so the trainer should explain that the simulation is a model and not a record of a real supply chain.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/khalidabdi1-factory/teach-supply-chain-flow-with-live-view/

## How to add a new place to the yard simulation with Factory

Repo: [Khalidabdi1/factory](https://github.com/Khalidabdi1/factory) | Difficulty: Advanced | Time: 1 hr | Basis: From the README

Follow the repo's folder layout to add a new building or area to the isometric world.

**Who it is for:** A developer who wants to extend the town with a new place, such as a new district, and needs to know which folders hold the engine and the simulation.

**The problem:** The codebase is split into kernel, models, world and sim folders, and a change in the wrong place can break the fixed build order.

**The outcome:** A new place added in the correct folder with its own card, built and running in the local dev server.

### Steps

1. Read the 'How the code is laid out' table and identify the folder for the new place, usually yard/world/ for static parts and yard/sim/ for moving ones.
2. Use the Part, Path and corridor graph helpers in yard/kernel/ to draw and route the new place.
3. Register the new place in yard/index.ts, which builds everything in a fixed order.
4. Run `npm run dev` and click the new place to check that its card shows.
5. Run `npm run build` to confirm the change compiles into out/.

### Prompt to paste into your agent

```text
In the repo Khalidabdi1/factory, add one new static building under yard/world/ and register it in yard/index.ts, then run `npm run build`. Verify that the build finishes without errors and that the new building appears when `npm run dev` runs.
```

### Caveat

The README does not document an API for adding places, so the steps depend on reading the code and matching the existing patterns.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/khalidabdi1-factory/add-new-place-to-yard-simulation/
