GithubHelp home page GithubHelp logo

jiayisheji / ng-nest-cnode Goto Github PK

View Code? Open in Web Editor NEW
17.0 2.0 2.0 4.55 MB

Angular 10 Front-End and Nestjs 7 framework Back-End build Fullstack CNode

License: MIT License

JavaScript 15.85% TypeScript 79.32% HTML 1.90% SCSS 1.01% Shell 1.92%
angular nestjs nodejs expressjs mongodb mongoose typegoose typeorm swagger rxjs redis ioredis passport jwt vscode jest cypress material fullstack nx

ng-nest-cnode's Introduction

ng-nest-cnode

A simple application demonstrating Angular (SPA, SSR) the basic usage of permissions with NestJS (JWT, Passport, Github, User, Group, Permission) based on CNode template.

Related Technology

  • NestJS - a JS backend framework providing architecture out of the box with a syntax similar to Angular
  • Angular - a JS frontend framework created by Google
  • Angular Universal - a JS frontend framework created by Google
  • Material-ui - Material Design components for Angular
  • TypeScript - reactive extensions for JavaScript
  • RxJS - superset of JS which compiles to JS, providing compile-time type checking
  • MongoDB - a NoSQL database
  • Mongoose - MongoDB object modeling designed to work in an asynchronous environment
  • TypeORM - ORM for TypeScript and JavaScript (ES7, ES6, ES5). Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, WebSQL databases.
  • Ioredis - A robust, performance-focused and full-featured Redis client for Node.js.
  • Passport - a popular library used to implement JavaScript authentication
  • jsonwebtoken - a JavaScript json web tokens implementation by auth0
  • @nrwl/schematics - Angular CLI power-ups for modern development

Features

  • Use the Mongoose(Typegoose) connect MongoDB
  • Use the Ioredis connect Redis
  • Use JWT for authentication
  • Support github authentication login
  • Super easy to install and start using the full-featured controllers and services
  • DB and service agnostic extendable CRUD controllers
  • Reach query parsing with filtering, pagination, sorting, relations, nested relations, cache, etc.
  • Framework agnostic package with query builder for a frontend usage
  • Query, path params and DTO validation included
  • Overriding controller methods with ease
  • Tiny config (including globally)
  • Additional helper decorators
  • Swagger documentation
  • Support Angular server rendering
  • Support Angular responsive presentation
  • Support Domain-Driven Design

Running the project

These instructions should be sufficient for one to get the project going on their local machine

Installing core dependencies

  • make sure you have node.js installed version 12.13+

Installing DB dependencies

  • make sure you have MongoDB installed version 3.4+
  • make sure you have Redis installed version 3.2+

Docker Installing DB dependencies

Cloning the github repository

To clone the project, run

git clone https://github.com/jiayisheji/ng-nest-cnode.git

Installing the dependencies

To install the dependencies after you've cloned the project, go to its root folder and run

cd ng-nest-cnode && npm install

Setting environment variables

cp .env.example  .env

Modify the corresponding values as required

Starting the MongoDB and Redis

Once you start the database application, you are ready to run the server

Boot according to your system

Notice that the server uses MongoDB and Redis so we need to have a MongoDB and Redis instance running so the server can connect to it。

If you use Docker:

docker-compose up -d

Alternative commands

If you need to work on the frontend and backend parts at the same time, you can run

npm start

Then, you can go to the Angular dev server at port 4200 and test server requests (to port 3000), we got a proxy to the backend

If you only need to work on the frontend, you can run

npm run start client

Alternatively, if you only need to work on the backend, you can run

npm run start server

Keeping in mind that you need to have the Angular app built and a MongoDB and Redis connection established

Documentation

Support

Any support is welcome. At least you can give us a star ⭐

Browser Support

Chrome
Chrome
Firefox
Firefox
IE / Edge
IE / Edge
Safari
Safari
Opera
Opera
last 2 versions last 2 versions IE11, Edge last 2 versions last 2 versions

License

MIT

ng-nest-cnode's People

Contributors

dependabot[bot] avatar jiayisheji avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

greenzhang qpoiop

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.