FixItWand
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Viewing readonly version of main branch: v3878View latest version
A comprehensive system for submitting and managing maintenance work orders with AI-powered features for transcription, location detection, and work order generation.
- Authentication: User authentication and authorization system
- Work Order Generation: AI-powered work order creation from audio descriptions and/or images
- Audio Transcription: Convert audio recordings to text using OpenAI Whisper
- Location Detection: Identify and match location references in work order descriptions
- Wand Management: Track and manage maintenance wands/devices
Transcribe audio recordings to text using OpenAI's Whisper model.
Endpoint: POST /api/transcribe
Request Body:
{ "audioB64": "data:audio/mp3;base64,YOUR_BASE64_AUDIO_DATA_HERE" }
Response:
{ "success": true, "transcription": "The transcribed text will appear here." }
Generate and manage maintenance work orders.
Generate Work Order: POST /api/workorders/generate
Request Body:
{ "imageB64": "data:image/jpeg;base64,YOUR_BASE64_IMAGE_DATA_HERE", // Optional "audioB64": "data:audio/mp3;base64,YOUR_BASE64_AUDIO_DATA_HERE", // Optional "fromName": "John Doe" }
Response:
{ "subject": "Maintenance Request - [Issue Summary]", "body": "Full work order email body..." }
- Authentication:
/api/auth/*
- Locations:
/api/locations/*
- Wands:
/api/wands/*
- Deno runtime
- OpenAI API key (set as environment variable)
Create a .env
file with the following variables:
OPENAI_API_KEY=your_openai_api_key
- Initialize node modules:
deno cache --node-modules-dir .
- Generate database migrations:
deno run -A --node-modules-dir npm:drizzle-kit generate
/backend
: Server-side code/db
: Database schemas and queries/routes
: API routes and handlers/workorders
: Work order generation logic
/frontend
: Client-side code/components
: React components/pages
: Page components
/shared
: Shared code between frontend and backend/pi
: Code for Raspberry Pi devices (wands)
- Enroll devices
- Implement vector similarity search: https://orm.drizzle.team/docs/guides/vector-similarity-search
- Add more comprehensive documentation