BasicTrade is a backend application designed to manage products and their variants, with robust authorization, authentication, and validation mechanisms. It leverages Gin Gonic for routing, GORM for ORM, JWT for authentication, and Cloudinary for image uploads.
BasicTrade is a backend application designed to manage products and their variants, with robust authorization, authentication, and validation mechanisms. It leverages Gin Gonic for routing, GORM for ORM, JWT for authentication, and Cloudinary for image uploads.
Endpoint | Method | Description | Authorization |
---|---|---|---|
/login | POST | Authenticate admin and receive JWT token | No |
Endpoint | Method | Description | Authorization |
---|---|---|---|
/products | GET | Retrieve all products with optional name search and pagination | No |
/products/:uuid | GET | Retrieve product details by UUID | No |
/products | POST | Create a new product | Yes |
/products/:uuid | PUT | Update product details | Yes |
/products/:uuid | DELETE | Delete a product | Yes |
Endpoint | Method | Description | Authorization |
---|---|---|---|
/variants | GET | Retrieve all variants with optional name search and pagination | No |
/variants/:uuid | GET | Retrieve variant details by UUID | No |
/products/:uuid/variants | POST | Create a new variant for a product | Yes |
/variants/:uuid | PUT | Update variant details | Yes |
/variants/:uuid | DELETE | Delete a variant | Yes |
github.com/golang-jwt/jwt/v5
golang.org/x/crypto
github.com/cloudinary/cloudinary-go/v2
To use BasicTrade, follow these steps:
Access the Application
Interact with Endpoints
Authentication
/login
endpoint before accessing authenticated endpoints.Testing
Deployment
Feedback and Contributions