https://github.com/akifzdemir/postgres-tui
This is a terminal user interface (TUI) application built with Bubble Tea that connects to a PostgreSQL database and displays data in a table format.
https://github.com/akifzdemir/postgres-tui
bubbles bubbletea go lipgloss postgresql psql tui
Last synced: 4 months ago
JSON representation
This is a terminal user interface (TUI) application built with Bubble Tea that connects to a PostgreSQL database and displays data in a table format.
- Host: GitHub
- URL: https://github.com/akifzdemir/postgres-tui
- Owner: akifzdemir
- Created: 2024-05-21T20:53:58.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-06-08T15:44:39.000Z (almost 2 years ago)
- Last Synced: 2024-09-28T18:02:58.810Z (over 1 year ago)
- Topics: bubbles, bubbletea, go, lipgloss, postgresql, psql, tui
- Language: Go
- Homepage:
- Size: 511 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PostgreSQL TUI with Bubble Tea
This is a terminal user interface (TUI) application built with Bubble Tea that connects to a PostgreSQL database and displays data in a table format.
## Features
- Connect to a PostgreSQL database
- Display data from a selected table
- Navigate through the table using keyboard keys
- Delete records from the table

## Prerequisites
- Go
- PostgreSQL database
## To do
- Add create, update record
- Add create,delete database
- Refactor error handling
## Installation
1. **Clone the repository**
```sh
git clone https://github.com/akifzdemir/postgres-tui.git
cd postgres-tui
```
2. **Install dependencies**
Ensure you have the necessary Go modules:
```sh
go mod tidy
```
3. **Run the application**
```sh
go run main.go
```
## Code Structure
- **main.go**: The entry point of the application. Connects to the database and initializes the TUI.
- **models/**: Contains the Bubble Tea models for managing the TUI states and interactions.
- **constants.go**: Defines constant values used across the application.