|
| 1 | +# Project Structure & Organization |
| 2 | + |
| 3 | +## Monorepo Layout |
| 4 | + |
| 5 | +``` |
| 6 | +nxrocks/ |
| 7 | +├── packages/ # Library packages (libsDir) |
| 8 | +├── e2e/ # E2E test applications (appsDir) |
| 9 | +├── tools/ # Build and development scripts |
| 10 | +└── images/ # Documentation assets |
| 11 | +``` |
| 12 | + |
| 13 | +## Package Categories |
| 14 | + |
| 15 | +### Core Libraries |
| 16 | + |
| 17 | +- **common**: Shared utilities across all plugins |
| 18 | +- **common-cli**: CLI-specific shared functionality |
| 19 | +- **common-jvm**: JVM-specific shared utilities |
| 20 | + |
| 21 | +### Nx Plugins |
| 22 | + |
| 23 | +- **nx-spring-boot**: Spring Boot integration |
| 24 | +- **nx-flutter**: Flutter development support |
| 25 | +- **nx-quarkus**: Quarkus framework support |
| 26 | +- **nx-micronaut**: Micronaut framework support |
| 27 | +- **nx-melos**: Melos monorepo tool integration |
| 28 | +- **nx-ktor**: Ktor framework support |
| 29 | + |
| 30 | +### CLI Tools |
| 31 | + |
| 32 | +- **create-nx-spring-boot**: Bootstrap Spring Boot workspaces |
| 33 | +- **create-nx-flutter**: Bootstrap Flutter workspaces |
| 34 | +- **create-nx-quarkus**: Bootstrap Quarkus workspaces |
| 35 | +- **create-nx-micronaut**: Bootstrap Micronaut workspaces |
| 36 | +- **create-nx-ktor**: Bootstrap Ktor workspaces |
| 37 | + |
| 38 | +## Standard Package Structure |
| 39 | + |
| 40 | +``` |
| 41 | +packages/[package-name]/ |
| 42 | +├── src/ |
| 43 | +│ ├── executors/ # Nx executors (build, test, run, etc.) |
| 44 | +│ ├── generators/ # Code generators and schematics |
| 45 | +│ ├── migrations/ # Migration scripts |
| 46 | +│ ├── utils/ # Package-specific utilities |
| 47 | +│ ├── core/ # Core functionality |
| 48 | +│ ├── graph/ # Dependency graph plugins |
| 49 | +│ └── index.ts # Main export |
| 50 | +├── testing/ # Test utilities (if applicable) |
| 51 | +├── recipes/ # Recipe configurations (JVM plugins) |
| 52 | +├── generators.json # Generator definitions |
| 53 | +├── executors.json # Executor definitions |
| 54 | +├── migrations.json # Migration definitions |
| 55 | +├── package.json |
| 56 | +├── project.json # Nx project configuration |
| 57 | +├── tsconfig.lib.json # TypeScript config for library |
| 58 | +├── tsconfig.spec.json # TypeScript config for tests |
| 59 | +└── jest.config.ts # Jest configuration |
| 60 | +``` |
| 61 | + |
| 62 | +## E2E Test Structure |
| 63 | + |
| 64 | +``` |
| 65 | +e2e/[plugin-name]-e2e/ |
| 66 | +├── tests/ # Test specifications |
| 67 | +├── jest.config.ts # Jest configuration |
| 68 | +├── project.json # Nx project configuration |
| 69 | +└── tsconfig.spec.json # TypeScript config |
| 70 | +``` |
| 71 | + |
| 72 | +## Naming Conventions |
| 73 | + |
| 74 | +- **Packages**: `@nxrocks/[name]` (scoped) |
| 75 | +- **Executors**: Kebab-case (e.g., `build-image`, `check-format`) |
| 76 | +- **Generators**: Kebab-case (e.g., `project`, `link`) |
| 77 | +- **Files**: Kebab-case for configs, camelCase for TypeScript |
| 78 | +- **Directories**: Kebab-case |
| 79 | + |
| 80 | +## Configuration Files |
| 81 | + |
| 82 | +- **generators.json**: Defines available generators with schemas |
| 83 | +- **executors.json**: Defines available executors with implementations |
| 84 | +- **migrations.json**: Defines migration scripts for version updates |
| 85 | +- **project.json**: Nx-specific project configuration |
| 86 | +- **package.json**: Standard npm package configuration with workspace dependencies |
0 commit comments