A lightweight fullstack audio (and video conversation) application built with Go and SvelteKit, leveraging Twilio's Programmable Video, Twilio Programmable Audio, and Twilio Verify.
Backend (Go):
Frontend (SvelteKit):
web/build/ (embedded in binary)web/static/ (served at root, embedded in binary)git clone https://github.com/kaustavdm/awwdio.git
cd awwdio
Copy the sample environment file and add your Twilio credentials:
cp sample.env .env
# Edit .env with your actual credentials
source .env
Required Environment Variables:
TWILIO_ACCOUNT_SID: Your Twilio account SID (find in Twilio Console)TWILIO_API_KEY: API key SID (create at API Keys)TWILIO_API_SECRET: API key secretPORT: Server port (default: 8080)Optional Environment Variables:
DEBUG: Set to true to enable debug loggingJSON_LOGGER: Set to true for JSON-formatted logscd web
npm install
cd ..
The easiest way to work with the project is using the included build.sh script:
# Run backend in development mode
./build.sh dev
# In another terminal, run frontend dev server
cd web && npm run dev
Run the Go server directly from source:
# Using the build script (recommended)
./build.sh dev
# Or manually
go run main.go
The server will start on http://localhost:8080 (or the port specified in PORT).
For frontend development with hot reload:
cd web
npm run dev
The frontend dev server runs on http://localhost:5173 and proxies API requests to http://localhost:8080.
Make sure the backend is running separately when using the frontend dev server.
Terminal 1 - Start backend:
./build.sh dev
Terminal 2 - Start frontend dev server:
cd web
npm run dev
Open http://localhost:5173 for hot-reloading frontend development
Terminal 1 - Start backend:
source .env
go run main.go
Terminal 2 - Start frontend dev server:
cd web
npm run dev
Open http://localhost:5173 for hot-reloading frontend development
The easiest way to build the project:
# Full production build
./build.sh build
# Or build components separately
./build.sh build-ui # Frontend only
./build.sh build-api # Backend only
# Clean build artifacts
./build.sh cleanup
# Clean rebuild
./build.sh cleanup && ./build.sh build
Build a single executable with embedded frontend:
# 1. Build frontend
cd web && npm run build && cd ..
# 2. Build Go binary with embedded frontend
go build -o bin/awwdio
# 3. Run the binary
./bin/awwdio
The binary embeds all frontend assets and serves everything from a single process.
# Using build script
./build.sh build-ui
# Or manually
cd web
npm run build
Output: web/build/ (embedded by Go binary)
# Using build script
./build.sh build-api
# Or manually
go build -o bin/awwdio
Output: bin/awwdio (10MB binary with embedded frontend)
source .env
go run main.go
./bin/awwdio
The application serves both frontend and API from the same port (default: 8080):
http://localhost:8080/http://localhost:8080/api/*npm run dev in the web/ directory for frontend hot reloadgo run main.go when modifying backend codecd web && npm run build && cd .. && go build -o bin/awwdio after frontend changes for productionPort already in use:
lsof -ti:8080 | xargs kill -9
Frontend not updating:
# Using build script (recommended)
./build.sh cleanup && ./build.sh build
# Or manually
find web/build -mindepth 1 ! -name '.gitkeep' -delete # Clean build output
rm -rf web/.svelte-kit # Clean SvelteKit cache
cd web && npm run build && cd ..
go build -o bin/awwdio
API endpoints not working:
source .env)TWILIO_API_KEY matches TWILIO_ACCOUNT_SIDMIT.