# Project Structure — NestJS

Source: https://www.geekswithgeeks.com/en/nestjs/nestjs-project-structure

> How NestJS organizes code into modules, controllers, and services.

## Folder layout

Each feature lives in its own folder with its module, controller, and service.

```text
src/
  main.ts
  app.module.ts
  users/
    users.module.ts
    users.controller.ts
    users.service.ts
  posts/
    posts.module.ts
    posts.controller.ts
    posts.service.ts
```

## Module = a slice of the app

A **module** groups related controllers and services. The root `AppModule` imports all feature modules; the app assembles them into a tree.
