https://github.com/centralmind/sample_databases
https://github.com/centralmind/sample_databases
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/centralmind/sample_databases
- Owner: centralmind
- Created: 2025-02-12T12:29:05.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-21T14:26:25.000Z (about 1 year ago)
- Last Synced: 2026-04-29T05:37:35.114Z (about 1 month ago)
- Language: Shell
- Size: 17.6 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Sample Database API Generation Example using Github Codespaces
This example demonstrates how to:
- Launch the Discovery process
- Generate APIs
- Launch an API Server
The example uses a sample public PostgreSQL database hosted on Supabase.
## Prerequisites
- Google Gemeni API Key - API Free tier is available
- 🚀 Launch Codespaces with prepared enviroment
## Usage
### 1. Start the Discovery Process
Run the following commands to start the discovery process. Replace `YOUR_KEY` with your Gemini API key.
Google provides a free tier for API keys without requiring a credit card or a complicated registration process, here:
```bash
export GEMINI_API_KEY=YOUR_KEY
```
```bash
./gateway discover \
--config connection.yaml \
--ai-provider gemini \
--prompt "Develop an API that enables a chatbot to retrieve information about data. Try to place yourself as analyst and think what kind of data you will require, based on that come up with useful API methods for that"
```
### 2. Launch the REST API Server
To start the REST API server and test its functionality, run:
```bash
./gateway start rest \
--config gateway.yaml \
--servers https://${CODESPACE_NAME}-9090.app.github.dev/
```
## Note
Make sure you have the necessary configuration files (`connection.yaml` and `gateway.yaml`) set up before running the commands.