No environment variables are required for the basic deployment. All
authentication uses public APIs.
Testing the Deployment
1. Test Data Ingestion
Monitor the jetstreamPoller logs to ensure it's receiving and processing
check-in events.
2. Test API Endpoints
Use the provided test script or Val Town CLI:
# Using the test script (update BASE_URL first)
./scripts/test-api.sh
# Or using Val Town CLI
API_URL=$(vt url anchorAPI)
curl "$API_URL/global?limit=5"
curl "$API_URL/stats"
curl "$API_URL/nearby?lat=52.0705&lng=4.3007&radius=5"
3. Monitor Processing Logs
Check the processing_log_v1 table to monitor ingestion health and performance.
Scaling Considerations
Performance Optimization
Monitor SQLite performance as data grows
Consider implementing pagination for large result sets
Add query timeout handling for long-running spatial queries
Rate Limiting
The social graph sync includes built-in rate limiting
Jetstream poller has a 45-second collection window
API endpoints have built-in limits (max 100 results per query)
Error Handling
All functions include comprehensive error handling
Failed address resolutions are cached to avoid retry storms
Processing logs track errors for monitoring
Monitoring and Maintenance
Health Checks
Monitor the /stats endpoint for system health
Check processing logs for ingestion errors
Monitor SQLite database size and performance
Database Maintenance
Periodically clean up old processing logs
Monitor address cache hit rates
Consider archiving old check-ins if storage becomes an issue