0.2.1 • Published 3 years ago

@dig-platform/dig-app v0.2.1

Weekly downloads
46
License
mit
Repository
-
Last release
3 years ago

DigApps

The vast majority of apps have the same basic platform dependencies. DigApps creates a lightweight, immutable app container that provides access to these resources in a consistent way.

Installation

npm install @dig-platform/dig-app

Getting started

DigApps are based on configuration, which should implement DigConfig and adapters for the other resources your app requires.

@Injectable({
  providedIn: 'root'
})
export class TodoService {
  public readonly app: DigApp = DigPlatform.factory({
    config: {
      id: 'todo',
      status: 'plan',
      title: 'Todo',
      description: 'Beginner tutorial',
      icon: 'construct',
    },
    adapters: {
      db: new AngularFirestoreAdapter(this.afs),
      auth: new AngularFireAuthAdapter(this.auth),
      state: new DigStateAdapter({
       todos: []
      })
    }
  });


  constructor(private afs: AngularFirestore, private auth: AngularFireAuth) {
  }
}

App Resources

Configuration

DigApps are configuration driven, which makes integration and extension as easy as possible.

User authentication

You can optionally load an authentication adapter which will load the auth state from a wide range of providers into your DigApp.

Database

At the time of writing we only support Firebase Firestore, but you can use our generic adapter to integrate with other data sources.

File Storage

At the time of writing we only support Firebase Storage, but you can use our generic adapter to integrate with other data sources.

State

DigApp ships with a simple Rxjs based state container. An Ngrx adapter is in development.

0.2.1

3 years ago

0.2.0

3 years ago

0.1.11

3 years ago

0.1.12

3 years ago

0.1.13

3 years ago

0.1.14

3 years ago

0.1.15

3 years ago

0.1.16

3 years ago

0.1.10

3 years ago

0.1.8

3 years ago

0.1.9

3 years ago

0.1.7

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago

0.0.4

3 years ago

0.0.1

3 years ago