Skip to content

The backend for Open Loopback, a feedback collection and management system.

License

Notifications You must be signed in to change notification settings

open-loopback/loopback-backend

Repository files navigation

Open Loopback Backend

License: MIT Bun Hono TypeScript Drizzle ORM Vercel

The backend for Open Loopback, a feedback collection and management system. Built with Hono, Bun, and Drizzle ORM.

Features

  • Feedback Collection: Single endpoint to receive user feedback with ratings and metadata.
  • Relational Data Model: Manages projects, sources, and feedbacks.
  • Vercel Ready: Optimized for deployment on Vercel.
  • Type-safe: Built with TypeScript and Zod for validation.

Tech Stack

Getting Started

Prerequisites

  • Bun installed
  • Vercel CLI installed globally (npm install -g vercel)
  • A PostgreSQL database (e.g., Supabase)

Installation

  1. Clone the repository
  2. Install dependencies:
    bun install
  3. Copy .env.example to .env and fill in your database URL:
    cp .env.example .env

Development

Run the development server with hot reload:

bun dev

The server will be available at http://localhost:3000.

Database Management

Drizzle Kit is used for database migrations:

  • Generate migrations: bun run db:generate
  • Push changes directly: bun run db:push
  • Run migrations: bun run db:migrate
  • Open Drizzle Studio: bun run db:studio

Deployment

To deploy to Vercel:

vc deploy

For production:

vc deploy --prod

API Documentation

Feedback

Submit Feedback

  • URL: /feedback
  • Method: POST
  • Body:
    {
      "sourceId": "string",
      "feedbackText": "string",
      "rating": number, // 1-5
      "metadata": { ... } // optional
    }

Health

  • URL: /health
  • Method: GET
  • Success Response: {"message": "OK"}

License

MIT

About

The backend for Open Loopback, a feedback collection and management system.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •