Skip to content

itsablabla/garza-api-v2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GARZA API v2 - Backend First

Minimal, working API with PostgreSQL.

Setup

npm install

Environment

cp .env.example .env
# Edit .env with your DATABASE_URL

Run Locally

npm run dev

API Endpoints

Health Check

curl http://localhost:3000/health

Sign Up

curl -X POST http://localhost:3000/api/auth/signup \
  -H "Content-Type: application/json" \
  -d '{"email":"user@example.com"}'

Response:

{
  "success": true,
  "token": "eyJ1c2VySWQiOi...",
  "userId": "123e4567-e89b-12d3-a456-426614174000",
  "email": "user@example.com"
}

List Agents

curl http://localhost:3000/api/agents/{userId}

Create Agent

curl -X POST http://localhost:3000/api/agents/{userId} \
  -H "Content-Type: application/json" \
  -d '{"name":"Support Bot","model":"claude-3-sonnet"}'

Delete Agent

curl -X DELETE http://localhost:3000/api/agents/{userId}/{agentId}

Database

  • PostgreSQL (Neon)
  • Auto-creates tables on startup
  • Users table + Agents table

Deploy to Vercel

  1. Push to GitHub
  2. Create Vercel project
  3. Set DATABASE_URL env var
  4. Deploy

That's it!

About

GARZA API - Minimal, working backend with PostgreSQL

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors