stevensDemo
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.
This guide will help you set up and personalize your Stevens butler app.
To set up the app with a fresh database, run:
deno run -A initializeApp.ts --clean
This will:
- Create a fresh, empty database
- Set up all necessary database tables and indexes
- Import calendar events (if Google Calendar API credentials are set)
To use all features, you'll need to set these environment variables:
ANTHROPIC_API_KEY
- For AI responses and daily briefings
TELEGRAM_TOKEN
- Your Telegram bot tokenTELEGRAM_CHAT_ID
- Your Telegram chat IDTELEGRAM_SECONDARY_CHAT_ID
- (Optional) Secondary Telegram chat ID for sending briefings to multiple recipients
GOOGLE_CLIENT_ID
- Google API client IDGOOGLE_CLIENT_SECRET
- Google API client secretGOOGLE_REFRESH_TOKEN
- Google OAuth refresh tokenGOOGLE_CALENDAR_ID
- Your Google Calendar ID (or "primary")
After setup, you can run individual importers to populate your database:
# Import calendar events deno run -A importers/getCalendarEvents.ts # Import weather data (for Perth, Australia in Celsius) deno run -A importers/getWeather.ts # Generate fun facts deno run -A importers/generateFunFacts.ts
You can manage your database with these utilities:
# Clean the database (remove all data) deno run -A dbUtils/cleanDatabase.ts # Set up the database structure deno run -A dbUtils/setupDatabase.ts
You can personalize Stevens by:
- Adding your own importers for data sources you care about
- Modifying the daily briefing format in the
dailyBriefing
directory - Adjusting location settings (currently set to Perth, Australia)
- Changing temperature units (currently set to Celsius)
The app is currently configured for:
- Location: Perth, Australia
- Timezone: Australia/Perth (UTC+8)
- Temperature: Celsius (°C)
- Time Format: 12-hour (AM/PM)
Access the admin dashboard through Val Town to view your memories and manage your data.
Important: The admin dashboard doesn't have authentication. It relies on security by obscurity. Consider implementing proper authentication if storing sensitive data.
If you encounter issues:
- Check your environment variables are correctly set
- Ensure you have the necessary permissions for API calls
- Look at the console logs for detailed error messages