restfull API
Go to file
2023-08-21 11:29:36 +07:00
api first 2023-08-21 09:49:58 +07:00
db first 2023-08-21 09:49:58 +07:00
interceptor first 2023-08-21 09:49:58 +07:00
logger first 2023-08-21 09:49:58 +07:00
logs first 2023-08-21 09:49:58 +07:00
model first 2023-08-21 09:49:58 +07:00
testDir first 2023-08-21 09:49:58 +07:00
uploaded first 2023-08-21 09:49:58 +07:00
.gitattributes Initial commit 2023-08-21 09:43:41 +07:00
database.db first 2023-08-21 09:49:58 +07:00
databaselog.db first 2023-08-21 09:49:58 +07:00
go.mod first 2023-08-21 09:49:58 +07:00
go.sum first 2023-08-21 09:49:58 +07:00
readme.md Update readme.md 2023-08-21 11:29:36 +07:00
request_authen.http first 2023-08-21 09:49:58 +07:00
request_log.http first 2023-08-21 09:49:58 +07:00
request_product.http first 2023-08-21 09:49:58 +07:00
request_transaction.http first 2023-08-21 09:49:58 +07:00
server.go first 2023-08-21 09:49:58 +07:00

Stock Product Management System

👋 Welcome to the Stock Product Management System project repository! This project aims to provide a web-based system for managing stock products, transactions, and authentication using the Go programming language : the Gin web framework and database : gorm and sqlite .

Table of Contents

Introduction

This project is developed using Go and Gin framework to create a stock product management system. It includes features like authentication, product management, and transaction tracking.

Features

  • ✔️ User authentication (login and registration)
  • 📦 Product management (create, read, update, delete)
  • 📊 Transaction tracking (create, read)
  • 🌐 API endpoints for interaction with the system

Installation

  1. Clone the repository:

      git clone https://github.com/chopperverapat/stock_product.git
    
    
  2. Navigate to the project directory:

      cd stock_product
    
  3. Install dependencies:

      go mod download
    
  4. Set up your database configuration in db/config.go.

  5. Run the application:

      go run server.go
    

Usage

API Endpoints

The API endpoints are designed to interact with the system programmatically. Here are some of the available endpoints:

  • /api/v2/login: Authenticate user and generate a JWT token.
  • /api/v2/register: Register a new user.
  • /api/v2/product: Get a list of products.
  • /api/v2/product/:id: Get product details by ID.
  • /api/v2/transaction: Get a list of transactions.
  • /api/v2/transaction: Create a new transaction (requires JWT token). Refer to the source code for a complete list of API endpoints and their functionality.

Contributing

Contributions to this project are welcome! If you find any issues or would like to add new features, feel free to open an issue or submit a pull request.