# Getting Started

Ng-Matero is a project based in Angular Material Components, so you need to know the basics of TypeScript and Sass.

## Installation

The easiest way to initialize the project is to use the CLI, you can customize admin template and theme. See [Project Init](/ng-matero/schematics/project-init.md) for details.

```bash
$ ng new <project-name>
$ cd <project-name>
$ ng add ng-matero
```

Except using CLI, you can also clone the Starter repo, but Starter has just side nav layout.

```bash
$ git clone --depth=1 git@github.com:ng-matero/starter.git <project-name>
$ cd <project-name>
$ npm install
```

## Development

It is recommended to run the program using hmr, do not use `npm start` or `ng serve`.

```bash
$ npm run hmr
```

Clone the whole repo.

```bash
$ git clone git@github.com:ng-matero/ng-matero.git
$ cd ng-matero
$ npm install
$ npm run hmr
```

Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.

![](/files/-LwvnU_yohLMRfO01KU2)

## Project Directory

```
├── src
│   ├── app
│   │   ├── core                               
│   │   │   ├── bootstrap                        
│   │   │   │   ├── menu.service.ts             
│   │   │   │   ├── settings.service.ts         
│   │   │   │   └── startup.service.ts  
│   │   │   ├── interceptors                    
│   │   │   │   └── default.interceptor.ts        
│   │   │   │── core.module.ts                  
│   │   │   │── **
│   │   │   └── settings.ts                     
│   │   ├── routes                              
│   │   │   ├── **
│   │   │   ├── routes-routing.module.ts        
│   │   │   └── routes.module.ts                
│   │   ├── shared                              
│   │   │   |—— **
│   │   │   └── shared.module.ts                
│   │   ├── theme                               
│   │   │   ├── admin-layout                    
│   │   │   ├── auth-layout                     
│   │   │   ├── style                           
│   │   │   ├── style.scss              
│   │   |   └── theme.module.ts                 
│   │   ├── app.component.ts                    
│   │   ├── app.module.ts                       
│   │   └── material.module.ts                  
│   ├── assets                                  
│   ├── environments                            
│   ├── styles                                 
│   │   ├── grid                                
│   │   ├── helpers                             
│   │   ├── plugins                             
│   │   ├── **
│   │   ├── _app-theme.scss
│   │   └── themes.scss                         
└── └── styles.scss                              
```

The directory structure follows the Angular style guide, and is also for convenience of the CLI to add business module. There may be some small adjustments in the future.

## Project Running

The project runs `startup.service` by default. Some key information (such as menu data, user data, etc.) before the project starts can be written in the `startup.service`.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://nzbin.gitbook.io/ng-matero/getting-started.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
