1.5.5 • Published 3 years ago

caldero-nest-library v1.5.5

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

Table of contents

  1. About the library
  2. Requirements
  3. Getting started
  4. Using the features
  5. Demo App
  6. License

About the library

It's mainly inspired by the PHP Framework Laravel and closes the functional gap bewteen best-practice frameworks like Laravel and the Node.Js web framework NestJs. In reserach question 1, the most important features of these best-practice frameworks were identified and analyzed. After that, the most popular Node.Js frameworks were analyzed in research question 2. Out of the analyzed frameworks, NestJs has the highest coverage of features and also has the biggest community. Because of that, it was chosen as the foundation of this library.

Goal

The goal of this library is to help developers build NestJs web applications faster and more efficiently by providing the missing features out-of-the-box and combining existing community solutions. This means that it provides services and endpoints to access those features, making it possible to integrate and use them in new NestJs projects, without having to implement all the logic of those features by oneself. It also generates a lot of useful files, like for example an user entity and decorator, mail templates and a database config file.

  • Auth System using JWT
  • i18n
  • Notifications
  • Sending Mails
  • Full-Text Search using Algolia
  • Payments (Stripe)
  • Chat
  • Helpers for Strings, Arrays and Dates
  • Seeder

How you can set up and use each feature is explained in the links above.

Requirements

Node.Js and npm

To be able to use the library, Node.Js and npm need to be installed on your computer. Install npm with the following command:

npm install -g npm

The best way of installing Node.js is to use a node version manager. A guide for doing so can be found here. To check whether you already have Node.Js and npm installed, run the following commands:

node -v
npm -v

Database

A (test) database is neccessary to test the features of the library. You can use XAMPP to setup a test database. 1. Download and install XAMPP 2. Run the XAMPP Control Panel 3. Start the Apache and MySQL Server. 4. You can access the user interface on 'localhost/phpmyadmin'

The connection details are handled in the typeormconfig.ts file, which will be located in the src folder of your NestJs project.

Getting started

# First, install the nestjs cli
npm i -g @nestjs/cli@7.6.0 

# and then, create a new nest project.
nest new project-name

# enter the root folder of the project
cd project-name

# install the library there
npm i caldero-nest-library
npm install

# After everything is installed, this command generates the necessary files for scaffolding your app
caldero-file-generate

# IMPORTANT: If the command wasn't found, install the library globally and execute the above command again.
npm i caldero-nest-library -g

# start the project 
nest start

Rename the generated .env-example file to .env

Using the features

After completing the Getting started section, you can already start using the seeder by executing the following command. This will create ten new users in your database.

npm run seed

Also, you can start to import and use all the other features. How that works for each specific feature is explained in the links of the Features section.

Demo App

To make a proof of concept, we developed a demo app. If you want to start and test the app, start both the frontend and backend projects. How you start them is explained in the README of each project.

ProjectDescription
StubyProjects/library-demo-backendTask manager app, which includes the core features of the library
StubyProjects/library-demo-frontendDemo Frontend for the App (created by Ariel Weinberger)

To have access to the repositories use the following github account:

username: bachelortester
password: Bachelor2021Zugriff123!

web.de
email: bachelortester@web.de
password: Bachelor2021Zugriff123!

stripe
email: bachelortester@web.de
password: Bachelor2021Zugriff123!

License

MIT

1.5.5

3 years ago

1.5.4

3 years ago

1.5.3

3 years ago

1.5.2

3 years ago

1.5.1

3 years ago

1.5.0

3 years ago

1.4.9

3 years ago

1.4.6

3 years ago

1.3.7

3 years ago

1.2.8

3 years ago

1.4.5

3 years ago

1.3.6

3 years ago

1.2.7

3 years ago

1.4.4

3 years ago

1.3.5

3 years ago

1.2.6

3 years ago

1.4.3

3 years ago

1.3.4

3 years ago

1.2.5

3 years ago

1.4.2

3 years ago

1.3.3

3 years ago

1.2.4

3 years ago

1.4.1

3 years ago

1.3.2

3 years ago

1.4.0

3 years ago

1.3.1

3 years ago

1.3.0

3 years ago

1.4.8

3 years ago

1.3.9

3 years ago

1.4.7

3 years ago

1.3.8

3 years ago

1.2.9

3 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.2.0

3 years ago

1.1.9

3 years ago

1.1.8

3 years ago

1.1.7

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.2.1

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.9

3 years ago