Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/finastra/angular-nestjs-starter


https://github.com/finastra/angular-nestjs-starter

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

        

Angular NestJS Starter


Angular Logo
Nx Logo
Nest Logo




Angular & NestJS starter for enterprise-grade full-stack projects, built under a clean architecture that helps to scale and maintain a fast workflow.



Build status

Repo License

PRs welcome





unit tests with Jest





## 🚀 Quick Start

```
npm start
```

Or in two separate commands :

```
npm run dev

npm run start:server
```


## 🌟 Features


Client
Angular Logo

- Strict mode
- Lazy loading
- Smart and pure components pattern
- Self-contained components and encapsulated modules
- Components types (e.g. component, features)
- Amazing directory structure
- Unit tests with Jest instead of Karma & Jasmine
- Dark mode
- Migration from TSLint to ESLint
- GitHub Actions workflows for unit tests and build



Server
Nest Logo

- Smart Logging (human-readable or JSON if console is not interactive)
- Proxy
- Auth ready


## 🛠️ Make some initial tweaks

- Change application title:

- Go to [apps/client/src/index.html](./apps/client/src/index.html) and inside the `title` tag, replace "AngularNestjsStarter" with your app name.\
- Go to [apps/client/src/app/app.component.ts](./apps/client/src/app/app.component.ts) and change the property `appName`

- Change your favicon:

Go to [apps/client/src](./apps/client/src/favicon.ico) and replace the current `favicon.ico`

- Start hacking:

- Go to [libs/features/home/src/lib/home.component.html](./libs/features/home/src/lib/home.component.html) and replace content with your own !

- Enable auth:
- Go to [apps/server/src/main.ts](./apps/server/src/main.ts) and uncomment
- Go to [apps/server/src/app/app.module.ts](./apps/server/src/app/app.module.ts) and uncomment


## Environement variables

| Variable | Default value |
| :--------------- | :------------------------------------------------ |
| `PORT` | `3000` |
| `CATS_API_KEY` | |
| `OIDC_CLIENT_ID` | |
| `CLIENT_SECRET` | |
| `SESSION_SECRET` | Generated uiid |
| `FFDC` | `https://api.fusionfabric.cloud` |
| `OIDC_ISSUER` | `https://api.fusionfabric.cloud/login/v1/sandbox` |
| `OIDC_SCOPES` | `openid profile` |
| `OIDC_ORIGIN` | `http://localhost:3000` |

> Duplicate the `.env.template` and rename it to .env 👌🏼


## 🧙‍♂️ Commands

| Command | Description |
| :------------- | :--------------------------------------------------------- |
| `nx` | See available commands |
| `dev` | Builds client in watch mode |
| `start:server` | Builds the server in watch mode |
| `start` | Builds the client and then starts the server in watch mode |
| `build:prod` | Builds both client and server in production mode |
| `test:cov` | Run test and outptus coverage |


_Below are some more advanced commands that might speed up your development flow:_

### Generate a new features

Run `ng g @nrwl/angular:lib my-feature --directory=features --simpleModuleName` to generate a features library.

### Generate a new cdk

The Component Dev Kit (CDK) is a set of components shared accross you project.

Start by creating your cdk lib by running `ng g @nrwl/angular:lib foo --directory=cdk --simpleModuleName`.

And then run `ng g component foo --project=cdk-foo --flat` to generate a new component.

### Generate a library

Run `ng g @nrwl/angular:lib my-lib` to generate a library.

> You can also use any of the plugins above to generate libraries as well.

Libraries are shareable across libraries and applications. They can be imported from `@finastra/mylib`.

### Running unit tests

Run `npm t` to execute the unit tests via [Jest](https://jestjs.io).

Run `npm run test:cov` to execute the unit tests and output coverage.

Run `nx affected:test` to execute the unit tests affected by a change.

### Understand your workspace

Run `nx dep-graph` to see a diagram of the dependencies of your projects.


## Further help

- [Finastra's Developer Portal](https://developer.fusionfabric.cloud/documentation)
- [Finastra's Design System](https://design.fusionfabric.cloud)
- [Angular Documentation](https://angular.io/docs)
- [NestJS Documentation](https://docs.nestjs.com/)
- [Nx Documentation](https://nx.dev/angular)


[![Brought to you by Finastra](https://raw.githubusercontent.com/Finastra/finastra-nodejs-libs/develop/media/spread-knowledge-readme-banner%402x.png)](https://www.finastra.com/)