The backend for Open Loopback, a feedback collection and management system. Built with Hono, Bun, and Drizzle ORM.
- 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.
- Framework: Hono
- Runtime: Bun
- Database: PostgreSQL (via Supabase)
- ORM: Drizzle ORM
- Validation: Zod
- Deployment: Vercel
- Bun installed
- Vercel CLI installed globally (
npm install -g vercel) - A PostgreSQL database (e.g., Supabase)
- Clone the repository
- Install dependencies:
bun install
- Copy
.env.exampleto.envand fill in your database URL:cp .env.example .env
Run the development server with hot reload:
bun devThe server will be available at http://localhost:3000.
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
To deploy to Vercel:
vc deployFor production:
vc deploy --prod- URL:
/feedback - Method:
POST - Body:
{ "sourceId": "string", "feedbackText": "string", "rating": number, // 1-5 "metadata": { ... } // optional }
- URL:
/health - Method:
GET - Success Response:
{"message": "OK"}
MIT