# @nxpm
With Nxpm you can create full-stack apps with an opinionated and scalable structure.
## How it works
At it's core, Nxpm extends the [Nx](https://nx.dev) generators like `@nrwl/angular`, `@nrwl/nest`, `@nrwl/react` and `@nrwl/react-native`.
Where Nx seperates their packages by _technology_, Nxpm abstracts these into the _functionality_ with packages like `@nxpm/api`, `@nxpm/mobile` and `@nxpm/web`.
That means that with Nxpm, the `@nxpm/web` package can create both Angular and React apps with `@nxpm/web:app` and libraries with `@nxpm/web:lib`.
```
@nxpm/api
- @nrwl/nest
# Support for Go is being considered
@nxpm/mobile
- @nrwl/react-native
# Support for Ionic is being considered
# Support for NativeScript is being considered
@nxpm/web
- @nrwl/angular
- @nrwl/react
```
Having these building blocks allows us to create full-stack apps by combining and wrapping around these generators. These groups are called `features`.
## @nxpm/api
Generate a NestJS+Prisma API with auth, account management and user admin.
```markdown
# Generators
- application (app):
- generates basic application
- library (lib):
- generates basic library
- feature (feat):
# Account management features
- account
- data-access
- feature
# Authentication
- auth
- data-access
- feature
- util
# Global configuration and Prisma
- core
- data-access
- feature
- util
# Admin User management
- user
- data-access
- feature
```
## @nxpm/cli
```markdown
- lint
- init
...everyting from current @nxpm/cli like release
```
## @nxpm/mobile
Generate a React Native app with auth and account management.
```markdown
- application
- libs
# Account management features
- account
- feature
- ui
# Authentication
- auth
- feature
- ui
- util
# Application Dashboard
- dashboard
- feature
- ui
# Application Shell
- shell
- feature
# Ui libraries
- ui
- button
- form
- layout
- page
```
## @nxpm/stack
```markdown
nxpm init
--api-name api
--mobile-name mobile
--mobile-type react-native
--web-name web
--web-type react
```
- Create API with @nxpm/api
- Create Mobile App with @nxpm/mobile
- Create Web App with @nxpm/web
- Create Shared SDK
## @nxpm/web
Generate an app using @nrwl/angular or @nrwl/react with auth and account management.
```markdown
- application
- libs
# Account management features
- account
- feature
- ui
# Authentication
- auth
- data-access
- feature
- ui
- util
# Application Dashboard
- dashboard
- feature
- ui
# Application Shell
- shell
- feature
# Ui libraries
- ui
- button
- form
- layout
- page
# Awdmin User management
- user
- feature
- ui
```
# Commands Reference
```markdown
# Generate default API with libraries
nx g @nxpm/api:app api
# these params are passed to the features
--auth-jwt-secret=bla
--core-prisma-database-url=postgres://bla
```
```markdown
# Generate a default library
nx g @nxpm/api:feature <name>
--no-feature
--no-data-access
--no-util
```
```markdown
# Generate the API Auth feature
nx g @nxpm/api:feature auth
--jwt-secret=bla
```