What you can delete
A new triple project is 819 files, and the common reaction to that number is "819 files I now maintain". Most of them are not that: 124 are tests that run themselves, and the largest group is code you will never open. Here is what each group is, which ones you can take out, and which ones are the application.
Every number here was measured on a grit new measured --triple --next at v3.569.0, not estimated. The "nothing imports it" claims were checked by grepping every import in apps/api, and then by deleting the six directories and running go build ./... and go test ./..., which passed.
What the number actually is
441
Go files in apps/api
including 124 test files that ship with your project and run themselves
242
TypeScript in apps/admin
the admin panel: components, screens, hooks
34
TypeScript in apps/web
the public site, which is close to empty on purpose
102
everything else
config, Docker, CI, the shared package, assets
The useful split is not by language. It is: code you will edit, code you will read once, and code you will never open. The third group is most of it, and it is the group this page is about.
The sample resources, which have a command
A new project ships a Blog and a Post so there is something in the admin on the first run. They are ordinary generated resources, and the generator can take them back out:
grit remove resource Bloggrit remove resource Post # --force to skip the confirmation
This is the one removal you should not do by hand. A resource with two plain fields is fourteen files plus thirty edits to files it does not own: the migration registry, the route table, the authz catalogue, the admin registry, the shared type exports, the route-coverage table. grit remove reverses every one of them and drops the manifest entries, and it prints what it did:
✗ Removed permissions from the authz catalog✓ apps/api/internal/access/registry.go now covers 209 routes✗ Removed 16 manifest entries✅ Resource Invoice removed successfully!
Deleting the files instead leaves a project that does not compile, and if it does compile, leaves permissions in the catalogue for a resource that is gone.
The libraries waiting for a field type
Six Go packages, 3,079 lines between them, that nothing imports. They are not dead code and they are not loaded at runtime: they are there so that the day you type price:money, the generator has somewhere to point.
Measured on a project that has already generated a resource, and that condition is the whole subtlety. Before you generate anything, pdf, rowrules, export, factory and testkit look unimported too, and every one of them is used by the first resource you create. Do not read a bare project's import graph as a deletion list.
| Package | Lines | What needs it |
|---|---|---|
| internal/money | 480 | exact money: integer minor units and a currency. Used by a money field. |
| internal/jsontime | 295 | the date and datetime types that survive a browser date picker. Used by a date or datetime field. |
| internal/docx | 1077 | Word documents. Used by the document generation a resource opts into. |
| internal/stock | 448 | stock levels and movements, for a resource that tracks them. |
| internal/workflow | 387 | status state machines, for a resource with a workflow. |
| internal/notify | 392 | the notification fan-out, for code that sends one. |
You can delete all six today and the project builds and its tests pass. What happens next is the part worth knowing, because it is not a subtle failure:
$ grit generate resource Invoice --fields "total:money,due:date"$ cd apps/api && go build ./...internal/models/invoice.go:9:2: package myapp/apps/api/internal/jsontime is not in stdinternal/models/invoice.go:10:2: package myapp/apps/api/internal/money is not in std
So the rule is simple: delete one of these when you are confident you will never use the field type it serves, and put it back from a fresh grit new if you were wrong. Nothing else in the project refers to them, so there is no second edit to make in either direction.
grit upgrade does not bring back a directory you deleted. It updates the files it wrote and still finds; a file that is not there is not a file it is maintaining.
Whole apps
apps/web, apps/admin, apps/expo and apps/desktop are each a directory and a line in the pnpm workspace. Deleting one is deleting both, and nothing in the Go API knows they exist.
Better: do not scaffold it. The architecture you pick at grit new decides which apps exist, and --double is the triple shape without the admin, --api is the Go server alone. A project you never generated is cheaper than one you deleted.
What is the application
These are imported from everywhere, and the import graph is the evidence rather than the names:
internal/handlersinternal/servicesinternal/modelsinternal/routesinternal/respondinternal/middlewareinternal/authzinternal/configinternal/databaseinternal/migrateinternal/paginateinternal/ids
The same goes for anything mounted in routes.go. If you want a feature off rather than gone, most of them are a line in .env or a module switch in the admin, which is reversible and does not need a diff.
Is there a --lean preset?
No, and after measuring this page I do not think there should be. Of the 819 files, the ones a preset could leave out are the six directories above, 3,079 lines that nothing imports and nothing loads. The cost of them is disk, and the cost of leaving them out is a generator that cannot emit half its field types until you notice why.
What actually makes a project smaller is choosing the architecture: an --api project is the Go server with no frontend at all. What makes it feel smaller is knowing which files you will never open, which is what this page is for.
