Skip to content

Custom Angular Project Structure Generation #32187

@HarshadSonagara

Description

@HarshadSonagara

Which @angular/* package(s) are relevant/related to the feature request?

compiler-cli

Description

Currently, when creating a new Angular project using the Angular CLI (ng new), the CLI generates a fixed default folder structure. While this structure works well for simple applications, most real-world and enterprise Angular projects require a custom architecture from the beginning.

In practice, developers and teams often need to manually restructure the generated project to follow their preferred architecture, such as separating folders for auth, features, shared, and core. This manual setup process is repetitive, time-consuming, and can lead to inconsistencies across projects and teams.

I would like to propose a feature (or supporting tool) that allows developers to define their Angular project architecture before project generation.

Proposed solution

Provide a simple and interactive way to generate an Angular project with a custom structure instead of the default Angular CLI layout.

The proposed flow would be:

Ask the developer which Angular version they want to use when creating the project

Ask whether the project should be module-based or standalone (component-based)

Allow the developer to define their own main folder structure

For example, a developer may want the following top-level folders:

core

shared

features

layout

The developer should be able to fully manage and customize these folders, including creating subfolders inside them based on project needs.

After defining the configuration and folder structure, the tool should generate the Angular project automatically. When the developer runs a single command or clicks a generate button, the Angular project should be created according to the selected version, architecture type, and custom folder structure.

This approach would give developers full flexibility, reduce manual setup work, and help maintain a consistent project architecture from the beginning.

Alternatives considered

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions