Skip to content
/ CRM Public

this is a final project of udacity golang Bootcamp

Notifications You must be signed in to change notification settings

Mohrip/CRM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CRM Application for Udacity Bootcamp

This is a simple CRM (Customer Relationship Management) application built using Go. It provides RESTful APIs for managing customer data, including creating, retrieving, updating, and deleting customer records.

Features

  • Register new customers.
  • Retrieve all customers.
  • Retrieve a single customer by ID.
  • Update customer information.
  • Delete customer records.

Project Structure

CRM/ ├── cmd/ │ └── main.go ├── internal/ │ ├── handlers/ │ │ └── customer.go │ ├── models/ │ │ └── customer.go │ └── routes/ │ └── router.go ├── go.mod ├── go.sum └── README.md

Getting Started...

Installation

  1. Clone the repository:

    git clone https://github.com/Mohrip/CRM.git

  2. CD to this path: CRM/cmd

Launch the Application

  1. Run the application: go run main.go

  2. The server will start and be accessible at http://localhost:8080.

Example Usage with Postman or cURL

1- Retrieve All Customers: GET http://localhost:8080/customers

2- Create a New Customer: POST http://localhost:8080/customers

  • Request Body: { "name": "Alice Johnson", "role": "Manager", "email": "[email protected]", "phone": "123456789", "contacted": true }

3- Retrieve a Customer by ID: GET http://localhost:8080/customers/{id}

4- Update a Customer: PUT http://localhost:8080/customers/{id}

  • Request Body: { "name": "Alice Updated", "role": "CEO", "email": "[email protected]", "phone": "987654321", "contacted": false }

5- Delete a Customer by ID: DELETE http://localhost:8080/customers/{id}

Important Note:

When using the POST method to create a new customer, send the following JSON body without an ID field, as it will be uniquely generated by the application.

Example of body request: { "name": " delete3312", "role": "XXX", "email": "[email protected]", "phone": "000001", "contacted": false }

Resources

1- Go Programming Language https://go.dev/ 2- Gorilla Mux https://github.com/gorilla/mux 3- JSON Encoding/Decoding in Go https://pkg.go.dev/encoding/json 4- Udacity Go Programming Course

License

This project is licensed under the MIT License.

About

this is a final project of udacity golang Bootcamp

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages