1.0.81 • Published 4 years ago

yalento-fullstack v1.0.81

Weekly downloads
82
License
ISC
Repository
-
Last release
4 years ago

Yalento fullstack

This awesome package creates a fullstack web application. Angular as the frontend and firebase as the backend. There is a simple but fully automated workflow with swagger definitions from that integration tests and models are automatically generated. With this package, the Swagger sample project http://editor.swagger.io/ can be implemented in a few minutes.

  • Automated integration tests (swagger definitions against backend, intelligent auto-mocking)
  • Including bitbucket pipeline
  • Automated generation of models and json-schema based on swagger definitions
  • Swagger editor included
  • Compile time and runtime checks (interfaces and validators)

Install first

1. Global packages

npm install -g firebase-tools @angular/cli

2. Create angular app

ng new app && cd ./app

3. Init new firebase project

  • Add database, firestore, functions, hosting and emulators.
  • Select always default values if you are asked from firebase cli.
  • Select functions, firestore, database and hosting for Emulator Setup.
  • Select typescript if you are asked for.

firebase init

4. Add yalento packages

npm add yalento-fullstack yalento

5. Ready to develop

Fullstck developing with live-reload

  • npm run start (ng serve)
  • npm run yalento:compile:watch
  • npm run yalento:backend:serve

More npm commands

  • npm run swagger:edit: Open swagger editor ui in browser.
  • npm run yalento:test:api: Test swagger definitions against firebase backend.

You can edit ./swagger.yaml in your project root in your ide as well. 'yalento:compile:watch' is detecting changes. The generated swagger documentation get published automatically here: /swagger/index.html

6. Having fun

Import automatically generated models and schema validators

import {Pet, Validator} from 'yalento-fullstack';

const pet: Pet = {
  name: 'bunny'
};

Validator.Pet(pet).catch((error) => console.log(error));
  • This will console.log an error with detailed infos why data is not matching against the definitions in ./swagger.yaml (runtime check)
  • The above code cannot be built using the typescript compiler because the interface is wrong (compile time check)

Compatible with Yalento (Browser and node.js)

import { Pet } from 'yalento-fullstack';
import { Repository, IEntity } from 'yalento';

const repository: Repository<Pet> = new Repository(Pet, 'Pet');
const bunny: IEntity<Pet> = await repository.create({ name: 'Bunny'});
const animals: Array<IEntity<Pet>> = repository.select({ where: 'name LIKE "Bunny"'}).getResults();

Read more about Yalento.

7. Publishing your app to production

Yalento Fullstack generates automatically a ready to use bitbucket-pipelines.yml. Just add repository variables FIREBASE_TOKEN_CI with your firebase cli token how to generate read here.

1.0.79

4 years ago

1.0.80

4 years ago

1.0.81

4 years ago

1.0.73

4 years ago

1.0.72

4 years ago

1.0.71

4 years ago

1.0.77

4 years ago

1.0.76

4 years ago

1.0.75

4 years ago

1.0.74

4 years ago

1.0.78

4 years ago

1.0.69

4 years ago

1.0.70

4 years ago

1.0.68

4 years ago

1.0.67

4 years ago

1.0.66

4 years ago

1.0.65

4 years ago

1.0.64

4 years ago

1.0.63

4 years ago

1.0.62

4 years ago

1.0.61

4 years ago

1.0.60

4 years ago

1.0.59

4 years ago

1.0.58

4 years ago

1.0.57

4 years ago

1.0.56

4 years ago

1.0.55

4 years ago

1.0.54

4 years ago

1.0.53

4 years ago

1.0.52

4 years ago

1.0.51

4 years ago

1.0.50

4 years ago

1.0.49

4 years ago

1.0.48

4 years ago

1.0.47

4 years ago

1.0.46

4 years ago

1.0.45

4 years ago

1.0.44

4 years ago

1.0.43

4 years ago

1.0.42

4 years ago

1.0.40

4 years ago

1.0.41

4 years ago

1.0.39

4 years ago

1.0.38

4 years ago

1.0.33

4 years ago

1.0.37

4 years ago

1.0.36

4 years ago

1.0.35

4 years ago

1.0.34

4 years ago

1.0.29

4 years ago

1.0.28

4 years ago

1.0.32

4 years ago

1.0.31

4 years ago

1.0.30

4 years ago

1.0.27

4 years ago

1.0.26

4 years ago

1.0.25

4 years ago

1.0.24

4 years ago

1.0.23

4 years ago

1.0.22

4 years ago

1.0.21

4 years ago

1.0.20

4 years ago

1.0.19

4 years ago

1.0.18

4 years ago

1.0.17

4 years ago

1.0.16

4 years ago

1.0.15

4 years ago

1.0.14

4 years ago

1.0.13

4 years ago

1.0.12

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago