Skip to main content

Project structure

✏️ Note

If the Strapi project was created with the starter CLI, its structure includes both a frontend and backend folder, where the backend folder has the default structure.

Structure of a project created with the starter CLI
my-project
β”œβ”€β”€β”€ frontend # starter folder
β”œβ”€β”€β”€ backend # template folder, has the default structure of a project
└─── node_modules

The default structure of a Strapi project created without the starter CLI depends on whether the project was created with vanilla JavaScript or with TypeScript, and looks like the following:

The following diagram is interactive: you can click on any file or folder name highlighted in purple to go to the corresponding documentation page.

. # root of the application
β”œβ”€β”€β”€β”€ .strapi # auto-generated folder β€” do not update manually
β”‚ └──── client # files used by bundlers to render the application
β”‚ β”œ index.html
β”‚ β”” app.js
β”œβ”€β”€β”€β”€ .tmp
β”œβ”€β”€β”€β”€ build # build of the admin panel
β”œβ”€β”€β”€β”€ config # API configurations
β”‚ β”œ api.js
β”‚ β”œ admin.js
β”‚ β”œ cron-tasks.js
β”‚ β”œ database.js
β”‚ β”œ middlewares.js
β”‚ β”œ plugins.js
β”‚ β”” server.js
β”œβ”€β”€β”€β”€ database
β”‚ └──── migrations
β”œβ”€β”€β”€β”€ node_modules # npm packages used by the project
β”œβ”€β”€β”€β”€ public # files accessible to the outside world
β”‚ └──── uploads
β”œβ”€β”€β”€β”€ src
β”‚ β”œβ”€β”€β”€β”€ admin # admin customization files
β”‚ β”œβ”€β”€β”€β”€ extensions # files to extend the admin panel
β”‚ β”‚ β”œ app.js
β”‚ β”‚ β”” webpack.config.js
β”‚ β”œβ”€β”€β”€β”€ api # business logic of the project split into subfolders per API
β”‚ β”‚ └──── (api-name)
β”‚ β”‚ β”œβ”€β”€β”€β”€ content-types
β”‚ β”‚ β”‚ └──── (content-type-name)
β”‚ β”‚ β”‚ β”” lifecycles.js
β”‚ β”‚ β”‚ β”” schema.json
β”‚ β”‚ β”œβ”€β”€β”€β”€ controllers
β”‚ β”‚ β”œβ”€β”€β”€β”€ middlewares
β”‚ β”‚ β”œβ”€β”€β”€β”€ policies
β”‚ β”‚ β”œβ”€β”€β”€β”€ routes
β”‚ β”‚ β”œβ”€β”€β”€β”€ services
β”‚ β”‚ β”” index.js
β”‚ β”œβ”€β”€β”€β”€ components
β”‚ β”‚ └──── (category-name)
β”‚ β”‚ β”œ (componentA).json
β”‚ β”‚ β”” (componentB).json
β”‚ β”œβ”€β”€β”€β”€ extensions # files to extend installed plugins
β”‚ β”‚ └──── (plugin-to-be-extended)
β”‚ β”‚ β”œβ”€β”€β”€β”€ content-types
β”‚ β”‚ β”‚ └──── (content-type-name)
β”‚ β”‚ β”‚ β”” schema.json
β”‚ β”‚ β”” strapi-server.js
β”‚ β”œβ”€β”€β”€β”€ middlewares
β”‚ β”‚ └──── (middleware-name).js
β”‚ β”œβ”€β”€β”€β”€ plugins # local plugins files
β”‚ β”‚ └──── (plugin-name)
β”‚ β”‚ β”œβ”€β”€β”€β”€ admin
β”‚ β”‚ β”‚ └──── src
β”‚ β”‚ β”‚ β”” index.js
β”‚ β”‚ β”œβ”€β”€β”€β”€ server
β”‚ β”‚ β”‚ β”œβ”€β”€β”€β”€ content-types
β”‚ β”‚ β”‚ β”œβ”€β”€β”€β”€ controllers
β”‚ β”‚ β”‚ └──── policies
β”‚ β”‚ β”œ package.json
β”‚ β”‚ β”œ strapi-admin.js
β”‚ β”‚ β”” strapi-server.js
β”‚ β”œβ”€β”€β”€ policies
β”‚ β”” index.js # include register(), bootstrap() and destroy() functions
β”œ .env
β”” package.json