Skip to content

This project is a Golang REST API boilerplate using the Gin framework, with MongoDB as the database. It is designed for managing teams and user roles, and additionally handles product management for an e-commerce website. The product structure is directly compatible with Zoho Books item structure, making integration with Zoho seamless.

Notifications You must be signed in to change notification settings

mehulmina064/Golang-Rest-api-Zoho-integration-MongoDB

Repository files navigation

Golang REST API Boilerplate with Zoho Books Item Integration

This project is a Golang REST API boilerplate using the Gin framework, with MongoDB as the database. It is designed for managing teams and user roles, and additionally handles product management for an e-commerce website. The product structure is directly compatible with Zoho Books item structure, making integration with Zoho seamless.

Features

  • User and role management
  • Product management
  • Integration-ready with Zoho Books

Technologies Used

  • Backend: Golang with Gin framework
  • Database: MongoDB

Getting Started

Prerequisites

  • Go installed on your machine
  • MongoDB set up and running

Installation

  1. Install Go

    sudo apt install golang-go
  2. Set up environment path

    export GOPATH=$HOME/go
    export PATH=$GOPATH/bin:$PATH
  3. Set up environment variables

    Create a .env file in the root directory and add the necessary environment variables.

  4. Install Air for auto-refresh and rerun setup

    go install github.com/cosmtrek/air@latest

    Set up the path

    alias air='$(go env GOPATH)/bin/air'

    Initialize Air

    air init

Running the Server

Using Air for auto-refresh

air

Manual run

go run main.go

Troubleshooting

Server not ending issue

List open ports:

lsof -i

Kill the process by PID:

kill -9 <pid>

API Documentation

You can find the API documentation Link and Postman collection Link.

Contributing

Contributions are welcome. Please fork the repository and create a pull request.

Deployed Server Link

The server is deployed on Render machine. You can access it at server-link or BaseURL.

License

This project is licensed under the MIT License.


For detailed API usage and examples, refer to the Postman collection linked above. Happy coding!


Contact

For any inquiries or support, please contact mehulmeena064@gmail.com.

About

This project is a Golang REST API boilerplate using the Gin framework, with MongoDB as the database. It is designed for managing teams and user roles, and additionally handles product management for an e-commerce website. The product structure is directly compatible with Zoho Books item structure, making integration with Zoho seamless.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages