Giter VIP home page Giter VIP logo

introcept-assessment-backend's Introduction

Introcept Assessment

Assessment task for full-stack web developer job in Introcept Nepal.

Task Description

The task is to create simple application which has CREATE and READ of the small CRUD application. The application should have a form for collecting clients data. The clients data should be saved on a server in csv form. Then the saved clients data are to be fetchced and displayed in webpage.

This part of application performs two tasks:

  1. Receive client data, check if its valid or not, if valid save in csv form
  2. On get requests read all saved client details and send them.

This is the backend part of the application. See Frontend

Solution

The application is built in typescript/nestjs. The steps taken to built this app are mentioned in follwoing points:

  1. Create nest application See Guide
  2. Create client resource using nest cli
nest generate resource src/modules/client
  1. Create necessary enum constants for client data like Gender, Nationality, Contact Mode and Education Level.
  2. Create a helper module to save and read client data from a file. This module exports two functions save and read.
  • Save function: This function takes a filepath and object data. The object data is converted into csv value and saved in gived filepath
  • Read function: This function takes a filepath from where data is to be read. This function uses csvjson dependency to convert csv values into json.
  1. Integrate the exported helper module functions (save, read) in ClientService class.
  2. Validate incoming client data for create client request in create-client.dto.ts inside src/modules/client/dto. class-validator dependency is used to validate incoming data.
  3. Deploy the app in Heroku Server. See guide

Packgaes used

  1. csvjson: In this application this dependency is used to convert csv values into json format.
  2. class-validator: In this application this dependency is used to validate incoming data for create client request.

introcept-assessment-backend's People

Contributors

thearkein avatar

Watchers

 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.