Boxes-api is an api server for a box management program.
Go to file
Steve White ea4c6142d0 working on updating items' box id 2024-10-14 08:20:04 -05:00
config Save image working along with image upload 2024-10-11 17:10:32 -05:00
data Removed DB from git and updated .gitignore again 2024-10-06 14:30:16 -05:00
scripts Added search/items endpoint for searching all items. 2024-10-11 21:15:15 -05:00
.gitignore fixing image display one step at a time. Removing .DS_Store 2024-10-10 17:16:56 -05:00
API_Ref.md working on updating items' box id 2024-10-14 08:20:04 -05:00
ApplicationDescription.md Initial commit 2024-10-08 17:50:10 -05:00
Dockerfile working on updating items' box id 2024-10-14 08:20:04 -05:00
README.md added some individual scripts to test things 2024-10-08 17:34:49 -05:00
api_reference.md working on updating items' box id 2024-10-14 08:20:04 -05:00
api_specification.md Minor changes 2024-10-11 10:43:23 -05:00
boxes-api Updated to tests.bash, moved config.yaml to config/config.yaml for docker mount in /app/config/config.yaml 2024-10-07 10:28:16 -05:00
config.go Initial Commit 2024-10-04 20:10:35 -05:00
db.go fixed image upload, patched up tests.bash 2024-10-06 18:02:38 -05:00
go.mod Updated to tests.bash, moved config.yaml to config/config.yaml for docker mount in /app/config/config.yaml 2024-10-07 10:28:16 -05:00
go.sum Added CORS middleware 2024-10-04 22:05:30 -05:00
handlers.go working on updating items' box id 2024-10-14 08:20:04 -05:00
main.go working on updating items' box id 2024-10-14 08:20:04 -05:00

README.md

Boxes API

Overview

This is a back-end application written in Go that provides an API for managing boxes and items stored within those boxes. It uses SQLite3 as its database and supports JWT-based authentication.

Features

  • Box Management: Create, retrieve, and delete boxes.
  • Item Management: Add, retrieve, update, and delete items within boxes.
  • Image Storage: Store images associated with items.
  • JWT Authentication: Secure API access with JSON Web Tokens.
  • Configuration: Manage settings via a config.yaml file.
  • Logging: Logs user logins and box/item actions to a file.

API Documentation

See the API Specification for detailed information on endpoints, request/response formats, and authentication.

Getting Started

  1. Clone the repository:

    
    git clone https://github.com/your-username/boxes-api.git
    
    
  2. Configuration:

    • Create a config.yaml file in the project root directory.
    • Refer to the config.yaml.example file for available settings.
  3. Database Setup:

    • The database will be automatically created if it doesn't exist.
    • Configure the database path in the config.yaml file.
  4. Running the Application:

    • Build and run the Go application:
    
    go run boxes-api .
    
    
  5. Run the test script:

    
    ./tests.bash
    
    

Podman Support

Build the podman image:


podman build -t boxes-api  .

Run the podman container:


podman run  \       
  -e CONFIG="/app/config/config.yaml" \
  -v /Users/stwhite/CODE/boxes/data:/app/data \
  -v /Users/stwhite/CODE/boxes/images:/app/images \
  -v /Users/stwhite/CODE/boxes/config:/app/config \
  -p 8080:8080 \
  --name boxes-api-container \
  localhost/boxes-api
  
  ```