CRM Backend is built with Go. It is the server-side portion of a complete CRM application. Users are able to make HTTP requests to perform CRUD operations. With this project, I have implemented several different RESTful endpoints which allow you to perform CRUD operations.
CRM-Backend provides an API that includes functionality to read, write, update, and delete content. This application can easily be integrated with any front-end application. All requests are done through HTTP, and requests and responses are in JSON.
To test out the application you can use Postman or cURL.
The application handles the following 5 operations for customers:
- Getting a single customer:
/customers/{id}
- Getting all customers:
/customers
- Creating a customer:
/customers
- Updating a customer:
/customers/{id}
- Deleting a customer:
/customers/{id}
Clone the project to a local directory:
git clone https://github.com/sonnyochoa/CRM-Backend.git
Inside the project directory run:
go run main.go
{
"name": "new customer",
"role": "test role",
"email": "[email protected]",
"phone": "5551234567",
"contacted": true
}
DO NOT INCLUDE A USER ID. IT WILL BE AUTO GENERATED
Output:
{
"1": {
"id": 1,
"name": "sonny",
"role": "admin",
"email": "[email protected]",
"phone": "1234567890"
},
"2": {
"id": 2,
"name": "panda",
"role": "writer",
"email": "[email protected]",
"phone": "5552346789"
},
"3": {
"id": 3,
"name": "bear",
"role": "builder",
"email": "[email protected]",
"phone": "3012456789",
"contacted": true
}
}
Output:
{
"id": 1,
"name": "sonny",
"role": "admin",
"email": "[email protected]",
"phone": "1234567890"
}
Request Body Input:
{
"name": "22new customer",
"role": "22test customer",
"email": "[email protected]",
"phone": "2225555555",
"contacted": true
}
Output:
{
"id": 200428821,
"name": "22new customer",
"role": "22test customer",
"email": "[email protected]",
"phone": "2225555555",
"contacted": true
}
Request Body Input:
{
"name": "SONNY",
"role": "SUPER ADMIN",
"email": "[email protected]",
"phone": "5555555555",
"contacted": true
}
Output:
{
"id": 1,
"name": "SONNY",
"role": "SUPER ADMIN",
"email": "[email protected]",
"phone": "5555555555",
"contacted": true
}
Output:
{
"1": {
"id": 1,
"name": "SONNY",
"role": "SUPER ADMIN",
"email": "[email protected]",
"phone": "5555555555",
"contacted": true
},
"3": {
"id": 3,
"name": "bear",
"role": "builder",
"email": "[email protected]",
"phone": "5552456789",
"contacted": true
}
}