This is a boilerplate setup for a Go Fiber application that uses JWT for authentication.
This project provides a starting point for building a web API with user authentication using JWT. It leverages Fiber for the web framework and GORM for the ORM.
- Go version 1.23.3
The following endpoints are available in the API:
- POST /api/auth/register: Register a new user.
- POST /api/auth/login: Authenticate a user and return a JWT.
- GET /api/user/:id: Get a user (requires a valid JWT).
- POST /api/user: Create a new user.
- PATCH /api/user/:id: Update a user (requires a valid JWT).
- DELETE /api/user/:id: Delete a user (requires a valid JWT).
- GET /api/product: Get all products.
- GET /api/product/:id: Get a product.
- POST /api/product: Create a new product (requires a valid JWT).
- DELETE /api/product/:id: Delete a product (requires a valid JWT).