Project structure
The structure of a Strapi project depends on whether the project was created with TypeScript (which is the default if you used the --quickstart
option while creating the project) or with vanilla JavaScript, and looks like the following:
- TypeScript-based projects
- JavaScript-based projects
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
βββββ config # API configurations
β β admin.ts
β β api.ts
β β cron-tasks.ts # optional, only if you created CRON tasks
β β database.ts
β β middlewares.ts
β β plugins.ts
β β server.ts
βββββ database
β βββββ migrations
βββββ dist # build of the backend
β βββββ build # build of the admin panel
βββββ node_modules # npm packages used by the project
βββββ public # files accessible to the outside world
β βββββ uploads
β β robots.txt
βββββ src
β βββββ admin # admin customization files
β β βββββ extensions # optional, files to extend the admin panel
β β βββββ app.example.tsx
β β βββββ webpack.config.example.js
| | βββββ tsconfig.json
β βββββ api # business logic of the project split into subfolders per API
β β βββββ (api-name)
β β βββββ content-types
β β β βββββ (content-type-name)
β β β β lifecycles.ts
β β β β schema.json
β β βββββ controllers
β β βββββ middlewares
β β βββββ policies
β β βββββ routes
β β βββββ services
β β β index.ts
β βββββ 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)
β β β defaults.json
β β β index.ts
β βββββ plugins # local plugins files
β β βββββ (plugin-name)
β β βββββ admin
β β β βββββ src
β β β β index.tsx
β β β β pluginId.ts
β β βββββ server
β β β βββββ content-types
β β β βββββ controllers
β β β βββββ policies
β β β package.json
β β β strapi-admin.js
β β β strapi-server.js
β ββββ policies
β β index.ts # include register(), bootstrap() and destroy() functions
βββββ types
β βββββ generated
β β components.d.ts # generated types for your components
β β contentTypes.d.ts # generated types for content-types
β .env
β .strapi-updater.json # used to track if users need to update their application
β favicon.png
β package.json
β tsconfig.json
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
β β admin.js
β β api.js
β β cron-tasks.ts # optional, only if you created CRON tasks
β β 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 # optional, 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
β favicon.png
β package.json