Git Product home page Git Product logo

unusualcodeorg / wimm-node-app Goto Github PK

View Code? Open in Web Editor NEW
36.0 2.0 9.0 1.9 MB

Modern Backend Development - WhereIsMyMotivation - NestJS. - Learn to build a modular and secure backend services using very popular Nest framework.

Home Page: https://github.com/janishar/wimm-node-app

License: Apache License 2.0

JavaScript 0.45% TypeScript 99.26% Shell 0.02% Dockerfile 0.28%
backend backend-api backend-service express express-js expressjs mongodb mongoose nest nestjs nestjs-backend node node-js nodejs redis typescript vscode

wimm-node-app's Introduction

Modern Backend Development - WhereIsMyMotivation

Docker Compose CI

Cover

This is a complete production ready project to learn modern techniques and approaches to build a performant and secure backend API services. It is designed for web apps, mobile apps, and other API services.

Framework

  • Nest
  • Express Node
  • Typescript
  • Mongoose
  • Mongodb
  • Redis
  • JsonWebToken
  • Jest
  • Docker
  • Multer

Highlights

  • API key support
  • Token based Authentication
  • Role based Authorization
  • Database dump auto setup
  • vscode template support
  • Unit Tests
  • Integration Tests
  • 75% plus Test Coverage
  • Clean and modular codebase

Notes

A few things are added to aid the learning process

  • disk submodule is added to provide images
  • database dump is added to seed the database

About Project

WhereIsMyMotivation is a concept where you see videos and quotes that can inspire you everyday. You will get information on great personalities and make them your perceived mentors. You can also subscribe to topics of your interests.

You can track your happiness level and write down daily journals. You can also share things of interest from web to store in your motivation box.

Using this app can bring a little bit of happiness and energy to live an inspired life.

Android App using this backend

Screenshot-Light

The Android App using this backend is also open-sourced. You can find the project here: Modern Android Development - WhereIsMyMotivation

API Framework Design

Request-Response-Design

Request-Response Flow

src → main.ts → app-module.ts → core.module.ts → apikey.guard.ts → auth.module.ts → auth.guard.ts → role.guard.ts → [feature].module.ts → [feature].controller.ts → [feature].service.ts → response.validation.ts → exception.handler.ts → response.transformer.ts

Installation Instruction

vscode is the recommended editor - dark theme

Get the repo

# clone repository recursively
git clone https://github.com/unusualcodeorg/wimm-node-app.git --recursive

Install libraries

$ npm install

Run Docker Compose

# install and start docker containers
docker-compose up -d

Run Tests

docker exec -t tester npm run test:cov

If having any issue

  • Make sure 3000 port is not occupied else change PORT in .env file.
  • Make sure 27017 port is not occupied else change DB_PORT in .env file.
  • Make sure 6379 port is not occupied else change REDIS_PORT in .env file.

Run on the local machine

Change the following hosts in the .env and .env.test

  • DB_HOST=localhost
  • REDIS_HOST=localhost

Best way to run this project is to use the vscode Run and Debug button. Scripts are available for debugging and template generation on vscode.

$ npm install

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

API DOC

API Documentation

Minimalistic version of this project

If you want to use plain Express.js to create the same project explore the Minimalistic version of this project

Minimalistic Backend Development - WhereIsMyMotivation

Find this project useful ? ❤️

  • Support it by clicking the ⭐ button on the upper right of this page. ✌️

More on YouTube channel - Unusual Code

Subscribe to the YouTube channel UnusualCode for understanding the concepts used in this project:

YouTube

Contribution

Please feel free to fork it and open a PR.

wimm-node-app's People

Contributors

janishar avatar

Stargazers

Tanay avatar David Lázaro Fernández avatar Mrigangka Datta avatar Ariyaman Debnath avatar SimonHan avatar Borja Paz Rodríguez avatar Abir Hasan avatar  avatar Doddy MATABARO avatar Ababii Vicu avatar  avatar Preeti Gupta avatar Precious Olusola avatar Dmytro avatar  avatar  avatar Rathijit Paul avatar Jerry Lusato avatar arezki kacioui avatar Elijah Oluwaseyifunmi Banjo  avatar TuanBinh avatar  avatar  avatar Jaydeepsinh Parmar avatar Zokirjon avatar Tushar kumar singh avatar  avatar  avatar Oyinlola Olasunkanmi Raymond avatar Donovan Townes avatar Dhaval Vyas avatar Lukas Dzenkauskas avatar Clayton Kehoe avatar Ruslan Konviser avatar Alvaro Aguilar avatar  avatar

Watchers

 avatar  avatar

wimm-node-app's Issues

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.