This project is a comprehensive Inventory Management System built with Go for the backend and PostgreSQL for data storage. It includes user authentication, product management, stock management, supplier management, and sales order management.
POST /api/register
: Register a new user.POST /api/login
: Log in an existing user.
POST /products/insert
: Add a new product.GET /products
: Retrieve a list of products.GET /products/{id}
: Retrieve a single product by ID.PUT /products/change-price
: Update a product by price.DELETE /products/remove/{id}
: Delete a product by ID.
POST /suppliers/insert
: Add a new supplier.GET /suppliers
: Retrieve a list of suppliers.GET /suppliers/{id}
: Retrieve a single supplier by ID.PUT /suppliers/change-email
: Update a supplier by email.PUT /suppliers/change-phone
: Update a supplier by phone number.DELETE /suppliers/remove/{id}
: Delete a supplier by ID.
- Go 1.16 or higher
- PostgreSQL
- Docker and Docker Compose
- Python 3.8 or higher
-
Clone the repository:
git clone https://github.com/vennisabarfi/small_business.git cd small_business
-
Set up environment variables: Create a
.env
file and add your database credentials and other necessary configurations. -
Start the development environment:
docker-compose up --build
-
Run migrations:
go run main.go migrate
-
Run the server:
go run main.go
Using fresh
fresh
- Access the API at
http://localhost:{PORT}
. Specify your port in your .env - Use tools like Postman to interact with the endpoints.
- Fork the repository.
- Create a new branch.
- Make your changes.
- Submit a pull request.
- Data Analysis tools to analyze sales order and inventory data.
- AI tools for more insights.
This project is licensed under the MIT License.