Skip to main content
Skip table of contents

Quickstart

Install

CODE
npm i next-levels/next-framework

Model Class

TYPESCRIPT
@Model({
  slug: 'user', 
  features: ['base', 'notification'],
})
export class UserModel {

  @Field({ type: 'TEXT' })
  @PrimaryGeneratedColumn('increment')
  id: number;

  @Field({ type: 'TEXT', required: true })
  @Column({ type: 'varchar', nullable: true })
  first_name: string;
  
  @Field({ type: 'TEXT', required: true })
  @Column({ type: 'varchar', nullable: true })
  last_name: string;
}

Backend Import

TYPESCRIPT
imports: [
RootStoreModule.forFeature(UserModel),
]

This example will create:

  • Database Table

  • API Calls

  • Websocket Connection

Frontend Import

TYPESCRIPT
imports: [
RootStoreModule.forFeature(UserModel),
]

This example will create:

  • Ngrx Store State Management

  • Websocket Implementation and update of Store

  • Global Facade with Actions and Selector Methods

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.