PromptFixer

A service for helping users improve their AI prompts by collecting feedback and issues, then delivering enhanced prompts.

Project Overview

PromptFixer offers two ways for users to submit their prompt fixing requests:

  1. Web Form - Users can fill out a form with their existing prompt, expected outcome, and why they think it's not working.
  2. Email Submission - Users can email their prompt details, which are automatically parsed using Gemini AI.

All submissions are stored in a SQLite database and can be accessed through an admin panel where administrators can:

  • View all prompt requests
  • Create improved versions of user prompts
  • Send the fixed prompts back to users via email

Project Structure

  • backend/ - Server-side code
    • index.ts - Main API server (Hono)
    • database.ts - SQLite database operations
    • email-service.ts - Email processing and sending
    • email-handler.ts - Email endpoint handler
  • frontend/ - Client-side code
    • index.html - Public submission form
    • admin.html - Admin dashboard
  • shared/ - Common types and utilities
    • types.ts - TypeScript interfaces and types

Features

  • Public HTML Form that collects:
    • Email address
    • Existing prompt
    • Expected outcome
    • Issue description
  • Email Processing
    • Extracts prompt information from emails
    • Sends clarification emails when information is missing
  • Admin Panel
    • Secure login system
    • View all submitted requests
    • Create and send improved prompts to users
  • SQLite Database for data storage
  • Email Notifications
    • To admins when new requests arrive
    • To users when their improved prompt is ready

API Endpoints

  • GET /api/health - Health check endpoint
  • POST /api/submit-form - Submit a prompt request via web form
  • POST /api/process-email - Process email submission
  • POST /api/admin/login - Admin authentication
  • GET /api/admin/requests - Get all prompt requests
  • GET /api/admin/requests/:id - Get a specific prompt request
  • POST /api/admin/requests/:id/update - Update a prompt with a fix and notify user

Technologies Used

  • Val Town Platform
  • Hono (API framework)
  • SQLite (database)
  • OpenAI (for email processing)
  • TailwindCSS (styling)
  • JWT (authentication)