So I was wondering if anyone is interested in a boilerplate for Aurelia with NestJS. If there are many persons interested and are willing to contribute (the latter would be really great), I could create a GitHub repo for it.
So I’m in the learning process (personal that is) of Aurelia with NestJS that includes the following
- Passport with OAuth and JWT
- also with Local Strategy (username/password)
- GraphQL with NestJS
Why I chose NestJS? Because of the following…
- it’s a NodeJS framework which has Dependency Injection built in
- TypeScript support by default (also support ES6 if you wish)
- easy to add GraphQL
- easy to add Swagger
- easy to add MongoDB/Mongoose
- it’s very well organized and structured for a NodeJS framework
- fastest growing framework of 2018/2019 (it gained almost 10k stars just in 2019, it’s now close to 20k stars)
What you might not like
- The architecture of NestJS is very similar to Angular 2 since the main author based himself on Angular to build and expand NestJS.
What I got working so far
- GraphQL (with Guards requiring user to be authenticated)
- Passport OAuth Strategies (all Auths are using REST though)
- for Google/Facebook/GitHub/LinkedIn/Microsoft Account
- a lot of the code that I have for this to work with Passport, comes from Aurelia-Auth. I copied a lot of his code and refactored it to get it working with Passport (though I feel that I’ll eventually have to separate that into an external plugin to cleanup the code).
- Save OAuth account to MongoDB and reuse them on next login
So the final thought would be that the POC (Proof of Concept) is all done and working, I’m more into adding extra features and learning how to structure everything the correct way. So far so good.
Here’s 2 print screens (OAuth and GraphQL)