# project-type

Project-type classification that decides whether a folder is an application, library, e2e suite, CLI tool, or plugin.

[`detectProjectType`](https://www.hyperfrontend.dev/docs/libraries/project-scope/heuristics/project-type/#api-detectProjectType) scores a project against multiple signals: `package.json` name suffixes (`-lib`, `-app`, `-e2e`, `-cli`), presence of `exports`/[`main`](https://www.hyperfrontend.dev/docs/libraries/project-scope/project/package/#api-PackageJson-prop-main)/`module`/[`bin`](https://www.hyperfrontend.dev/docs/libraries/project-scope/project/package/#api-PackageJson-prop-bin), entry-point file patterns (`server.ts` vs `index.ts`), directory layout (`public/`, `pages/`, `lib/`, `cypress/`), framework membership, and e2e tooling. The result includes the chosen `type`, a [`confidence`](https://www.hyperfrontend.dev/docs/libraries/project-scope/heuristics/project-type/#api-ProjectTypeDetection-prop-confidence) percentage, and a list of [`evidence`](https://www.hyperfrontend.dev/docs/libraries/project-scope/heuristics/project-type/#api-ProjectTypeDetection-prop-evidence) entries explaining each contributing factor. Useful as a starting point for code-mod scripts, scaffolding, and workspace-management tooling that needs to react differently per project shape.

---

Canonical page: https://www.hyperfrontend.dev/docs/libraries/project-scope/heuristics/project-type/
This file: https://www.hyperfrontend.dev/docs/libraries/project-scope/heuristics/project-type.md
Documentation index: https://www.hyperfrontend.dev/llms.txt
