• Townie
    AI
  • Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
wolf

wolf

FixItWand

Public
Like
FixItWand
Home
Code
15
.vscode
1
backend
8
docs
2
frontend
8
pi
8
shared
1
.envrc
.gitignore
.vtignore
README.md
deno.json
drizzle.config.ts
flake.lock
flake.nix
import_map.json
Branches
3
Pull requests
Remixes
History
Environment variables
8
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.
Sign up now
Code
/
README.md
Code
/
README.md
Search
4/28/2025
Viewing readonly version of main branch: v3877
View latest version
README.md

Maintenance Work Order System

A comprehensive system for submitting and managing maintenance work orders with AI-powered features for transcription, location detection, and work order generation.

Features

  • 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

API Endpoints

Transcription API

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." }

Work Orders API

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..." }

Other APIs

  • Authentication: /api/auth/*
  • Locations: /api/locations/*
  • Wands: /api/wands/*

Development

Prerequisites

  • Deno runtime
  • OpenAI API key (set as environment variable)

Environment Setup

Create a .env file with the following variables:

OPENAI_API_KEY=your_openai_api_key

Commands for Development

  • Initialize node modules: deno cache --node-modules-dir .
  • Generate database migrations: deno run -A --node-modules-dir npm:drizzle-kit generate

Project Structure

  • /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)

Todo

  • Enroll devices
  • Implement vector similarity search: https://orm.drizzle.team/docs/guides/vector-similarity-search
  • Add more comprehensive documentation
FeaturesVersion controlCode intelligenceCLI
Use cases
TeamsAI agentsSlackGTM
ExploreDocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.