This is a TUI app, built with the bubbletea framework in Go. The backend is an HTTP REST API built in Go, also using a PostgreSQL database. Documentation for the app can be found here. And documentation for the REST API can be found here.
- Bubbletea TUI library
- Chi HTTP library
- SQLC SQL code generation tool
- goose database migration tool
- postgreSQL database
I created this app as a model for sharing toys for my toddlers who are trying to learn the concept.
This is a sample app, but could easily be translated into other domains such as:
- A library book checkout system
- Tracking employee's use of company resources
- Keeping track of repeated tasks, chores, daily cleaning checklist, etc.
- And more!
The main page of the app is a view of three lists: a list of all the items and their check out status, a list of the actions you can perform, and a list of the current user's checked out items:
The app also contains other pages for filling out forms, view an item's check out history, etc.
The only environment variable required is DB_URL. This variable is used by the HTTP server to connect to the database. The expected database type is postgres. I use a .env file in the root directory of the project for this, with this line:
DB_URL=postgres://palmer:@localhost:5432/my_database
The database schema can be found in sql/shema/. I used goose to handle the migrations. From within the sql/schema/ directory run:
goose postgres <DB_URL> up
to create the tables.
You can compile the executable from the root directory of the project:
go build ./cmd/inventory_tracker_app
run the executable:
./inventory_tracker_app