Code Monkey home page Code Monkey logo

payever's Introduction

NodeJS Test Task

You have configured application with empty controller and service. Use https://docs.nestjs.com/ to find resources about framework.

Run npm i to install packages.
Run npm run lint to check code linting and cleanness.
Run npm run start to run app.

Part one - database schema

Create Mongo DB schema for entities below using NestJS Mongoose module. Docs: https://docs.nestjs.com/techniques/mongodb.

Application manages users, their hobbies and friends.
User's settings are hobby and city.
User can have many hobbies.
User can have many cities.
User can have other users as friends.
Cities and hobbies are not predefined.

Part two - endpoints to perform

List of necessary endpoints:

  • user creation
  • user deletion
  • friend assigning
  • retrieving friends of certain user
  • retrieving user's friends with certain hobby
  • retrieving user's friends from certain city with certain hobby
  • get hobbies existent in certain city
  • get cities which has users with certain hobby

Part three - special features

Add field features for user's schema. On user's creation field features should be automatically filled with an object. Depending on hobby object should contain special property with plain list of some feature's stuff. Just array of some strings. Data can be hardcoded in project. Properties are:

  • for guitar - property concerts with list of guitar concerts
  • for skiing - property resorts with list of skiing resorts
  • for stamp collecting - property stamps with list of stamps

Please, use strong TypeScript typing where possible.

Good luck!

payever's People

Contributors

lliu33 avatar

Stargazers

David Gutiérrez avatar Dmitry avatar

Watchers

James Cloos avatar  avatar Alexey Sitka avatar

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.