Axion is a simple auction application built with Go and React. It is a simple application that allows users to create auctions for products. Users can bid on auctions and the highest bidder wins the auction. The application also allows users to create products and auctions for those products.
- Clone the repository:
git clone https://github.com/codeyzx/axion-be.git
- Navigate to the project directory:
cd axion-be
- Install the dependencies:
go get -u
- Create mysql database:
axion
- Run the application:
go run main.go
notes: database will be migrated automatically
METHOD | ROUTE | FUNCTIONALITY | ACCESS |
---|---|---|---|
GET | / |
Redirects to API documentation | All users |
GET | /docs/* |
Serves the API documentation page | All users |
GET | /public/* |
Serves static files (images, CSS, etc.) | All users |
POST | /login |
Logs in a user | All users |
GET | /check-jwt |
Validate Expiration JWT | All users |
POST | /register |
Registers a new user | All users |
GET | /users |
Gets a list of all users | Admin |
GET | /users/:id |
Gets information on a single user | All users |
PUT | /users/:id |
Updates a user's profile | Owner/Admin |
PUT | /users/:id/update-email |
Updates a user's email address | Owner/Admin |
PUT | /users/:id/update-role |
Updates a user's role (admin/operator/user) | Admin |
DELETE | /users/:id |
Delete a user | Admin |
GET | /users-export-excel |
Get file xlsx of users data | Admin |
GET | /users-export-pdf |
Get file pdf of users data | Admin |
GET | /products |
Gets a list of all products | All users |
GET | /products/:id |
Gets information on a single product | All users |
GET | /products-by-users/:id |
Gets a list of all products on a single user | All users |
POST | /products |
Creates a new product | Operator |
PUT | /products |
Update a product | Owner/Operator |
DELETE | /products/:id |
Delete a product | Owner/Operator |
GET | /products-export-excel |
Get file xlsx of products data | Admin |
GET | /products-export-pdf |
Get file pdf of products data | Admin |
GET | /auctions |
Gets a list of all auctions | All users |
GET | /auctions/:id |
Gets information on a single auction | All users |
POST | /auctions |
Creates a new auction | User/Operator |
PUT | /auctions/:id |
Update an auction | User/Operator |
DELETE | /auctions/:id |
Delete an auction | User/Operator |
GET | /auctions-export-excel |
Get file xlsx of auctions data | Admin |
GET | /auctions-export-pdf |
Get file pdf of auctions data | Admin |
GET | /auctions-histories |
Gets a list of all auction histories | Admin |
GET | /auction-histories/:id |
Gets information on a single auction history | All users |
GET | /auction-histories/user/:id |
Gets a list of all auction histories for a user | Owner/Admin |
POST | /auction-histories/ |
Create a new auction history | User/Operator |
PUT | /auction-histories/:id |
Update an auction history | Admin |
DELETE | /auction-histories/:id |
Delete an auction history | Admin |
GET | /auction-histories-export-excel |
Get file xlsx of auction histories data | Admin |
GET | /auction-histories-export-pdf |
Get file pdf of auction histories data | Admin |
GET | /history |
Gets a list of all history log | Admin |
GET | /history/:id |
Gets information on a single history log | Admin |
POST | /history |
Creates a new history log | Admin |
PUT | /history/:id |
Update an history log | Admin |
DELETE | /history/:id |
Delete an history log | Admin |
GET | /history-export-excel |
Get file xlsx of history data | Admin |
GET | /history-export-pdf |
Get file pdf of history data | Admin |
Project ini bertujuan untuk memenuhi UJI KOMPETENSI KEAHLIAN REKAYASA PERANGKAT LUNAK TAHUN PELAJARAN 2022/2023
dengan judul tugas Sistem Lelang Online
pada paket 4
.