GithubHelp home page GithubHelp logo

crm-backend's Introduction

Project features

The project represents the backend of a customer relationship management (CRM) web application. As users interact with the app via some user interface, your server will support all of the functionalities:

All REST APIs (GET, POST, PATCH, DELETE)

Getting a list of all customers

through a the /customers path

Getting data for a single customer

through a /customers/{id} path

Adding a customer

through a /customers path

Updating a customer's information

through a /customers/{id} path

Removing a customer

through a /customers/{id} path

Api

  • Getting a list of all customers
url : GET localhost:3000/customers
  • Response
[
  {
    "id": "1",
    "name": "Tom",
    "role": "Software Engineer",
    "email": "[email protected]",
    "phone": 123456892,
    "contacted": true
  },
  {
    "id": "2",
    "name": "Tim",
    "role": "Senior Software Engineer",
    "email": "[email protected]",
    "phone": 213456892,
    "contacted": false
  },
  {
    "id": "3",
    "name": "Max",
    "role": "Product Manager",
    "email": "[email protected]",
    "phone": 231564892,
    "contacted": true
  },
  {
    "id": "4",
    "name": "Joe",
    "role": "Software Engineer",
    "email": "[email protected]",
    "phone": 123456892,
    "contacted": true
  },
  {
    "id": "5",
    "name": "Ross",
    "role": "Civil Engineer",
    "email": "[email protected]",
    "phone": 123456892,
    "contacted": true
  },
  {
    "id": "6",
    "name": "Adam",
    "role": "IT Support Engineer",
    "email": "[email protected]",
    "phone": 123456892,
    "contacted": true
  }
]
  • Getting a single customer
url : GET localhost:3000/customers/{id}
  • Response
    {
        "id": "1",
        "name": "Tom",
        "role": "Software Engineer",
        "email": "[email protected]",
        "phone": 123456892,
        "contacted": true
    }
  • Adding a customer
url : POST localhost:3000/customers
  • Body
  {
   "name": "John",
   "role": "Software Developer",
   "email": "[email protected]",
   "phone": 123456789,
   "contacted": true
   }
  • Response
[
    {
        "id": "1",
        "name": "Tom",
        "role": "Software Engineer",
        "email": "[email protected]",
        "phone": 123456892,
        "contacted": true
    },
    {
        "id": "2",
        "name": "Tim",
        "role": "Senior Software Engineer",
        "email": "[email protected]",
        "phone": 213456892,
        "contacted": false
    },
    {
        "id": "3",
        "name": "Max",
        "role": "Product Manager",
        "email": "[email protected]",
        "phone": 231564892,
        "contacted": true
    },
    {
        "id": "4",
        "name": "Joe",
        "role": "Software Engineer",
        "email": "[email protected]",
        "phone": 123456892,
        "contacted": true
    },
    {
        "id": "5",
        "name": "Ross",
        "role": "Civil Engineer",
        "email": "[email protected]",
        "phone": 123456892,
        "contacted": true
    },
    {
        "id": "6",
        "name": "Adam",
        "role": "IT Support Engineer",
        "email": "[email protected]",
        "phone": 123456892,
        "contacted": true
    },
    {
        "id": "6cf26e2f-4d90-43b2-99e3-e4e89f2e891e",
        "name": "John",
        "role": "Software Developer",
        "email": "[email protected]",
        "phone": 123456789,
        "contacted": true
    }
]
  • Updating a customer's information
url : PATCH localhost:3000/customers/{id}
  • Body
        "name": "Jo",
        "role": "Software Developer",
        "contacted": true
  • Response
[
  {
    "id": "1",
    "name": "Tom",
    "role": "Software Engineer",
    "email": "[email protected]",
    "phone": 123456892,
    "contacted": true
  },
  {
    "id": "2",
    "name": "Tim",
    "role": "Senior Software Engineer",
    "email": "[email protected]",
    "phone": 213456892,
    "contacted": false
  },
  {
    "id": "3",
    "name": "Max",
    "role": "Product Manager",
    "email": "[email protected]",
    "phone": 231564892,
    "contacted": true
  },
  {
    "id": "4",
    "name": "Joe",
    "role": "Software Engineer",
    "email": "[email protected]",
    "phone": 123456892,
    "contacted": true
  },
  {
    "id": "5",
    "name": "Ross",
    "role": "Civil Engineer",
    "email": "[email protected]",
    "phone": 123456892,
    "contacted": true
  },
  {
    "id": "6",
    "name": "Adam",
    "role": "IT Support Engineer",
    "email": "[email protected]",
    "phone": 123456892,
    "contacted": true
  },
  {
    "id": "6cf26e2f-4d90-43b2-99e3-e4e89f2e891e",
    "name": "Jo",
    "role": "Software Developer",
    "email": "[email protected]",
    "phone": 123456789,
    "contacted": true
  }
]
  • Removing a customer
url : DELETE localhost:3000/customers/{id}
  • Response
{
  "id": "6cf26e2f-4d90-43b2-99e3-e4e89f2e891e",
  "name": "Jo",
  "role": "Software Developer",
  "email": "[email protected]",
  "phone": 123456789,
  "contacted": true
}

Data

Dummy data is in data.go file

To Run Server

./CRM-Backend

Packages used

encoding/json

The applications leverages the encoding/json package to parse JSON data.

io/ioutil

The application leverages the io/ioutil package to read I/O (e.g., request) data.

github.com/google/uuid

Google UUID GitHub project to create a unique id for the customers.

github.com/gorilla/mux

The application uses a router (e.g., gorilla/mux, http.ServeMux, etc.) that supports HTTP method-based routing and variables in URL paths.

crm-backend's People

Contributors

dipti95 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.