1.0.81 • Published 5 years ago

yalento-fullstack v1.0.81

Weekly downloads
82
License
ISC
Repository
-
Last release
5 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

5 years ago

1.0.80

5 years ago

1.0.81

5 years ago

1.0.73

5 years ago

1.0.72

5 years ago

1.0.71

5 years ago

1.0.77

5 years ago

1.0.76

5 years ago

1.0.75

5 years ago

1.0.74

5 years ago

1.0.78

5 years ago

1.0.69

5 years ago

1.0.70

5 years ago

1.0.68

5 years ago

1.0.67

5 years ago

1.0.66

5 years ago

1.0.65

5 years ago

1.0.64

5 years ago

1.0.63

5 years ago

1.0.62

5 years ago

1.0.61

5 years ago

1.0.60

5 years ago

1.0.59

5 years ago

1.0.58

5 years ago

1.0.57

5 years ago

1.0.56

5 years ago

1.0.55

5 years ago

1.0.54

5 years ago

1.0.53

5 years ago

1.0.52

5 years ago

1.0.51

5 years ago

1.0.50

5 years ago

1.0.49

5 years ago

1.0.48

5 years ago

1.0.47

5 years ago

1.0.46

5 years ago

1.0.45

5 years ago

1.0.44

5 years ago

1.0.43

5 years ago

1.0.42

5 years ago

1.0.40

5 years ago

1.0.41

5 years ago

1.0.39

5 years ago

1.0.38

5 years ago

1.0.33

5 years ago

1.0.37

5 years ago

1.0.36

5 years ago

1.0.35

5 years ago

1.0.34

5 years ago

1.0.29

5 years ago

1.0.28

5 years ago

1.0.32

5 years ago

1.0.31

5 years ago

1.0.30

5 years ago

1.0.27

5 years ago

1.0.26

5 years ago

1.0.25

5 years ago

1.0.24

5 years ago

1.0.23

5 years ago

1.0.22

5 years ago

1.0.21

5 years ago

1.0.20

5 years ago

1.0.19

5 years ago

1.0.18

5 years ago

1.0.17

5 years ago

1.0.16

5 years ago

1.0.15

5 years ago

1.0.14

5 years ago

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago