ValTown-Package-Tracker
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: v14View latest version
A web application that ingests payloads from a HTTP integration and displays them on a map in realtime. The app tracks package locations and displays the history of where the package has been.
- HTTP endpoint to receive location data from ChirpStack
- Interactive map showing current and historical package locations
- Automatic map zooming to show all locations
- Detailed metadata view when clicking on a location point
- Persistent storage of location history
- Debug tools for monitoring and testing
/backend- Server-side code for the HTTP endpoint and API/frontend- Client-side code for the map interface/shared- Shared types and utilities
- Backend: Hono (API framework)
- Database: SQLite for persistent storage
- Frontend: HTML, CSS, JavaScript with Leaflet.js for mapping
- TypeScript for type safety
- The application will automatically receive data from ChirpStack when properly configured
- Visit the main page to view the package tracker interface
- Click on any location marker to view detailed metadata
The application includes several debug features to help with troubleshooting:
Click the "Debug" button in the top-right corner of the map to access:
- System status information
- Database statistics
- Test payload generator
The debug modal includes a "Send Test Payload" button that:
- Generates a random location near Oakland
- Creates a properly formatted ChirpStack payload
- Sends it to the ingest endpoint
- Displays the results in real-time
The application provides a debug endpoint at /api/debug/status that returns:
- Database connection status
- System information
- Database statistics (counts of locations, gateways, and devices)
The application includes comprehensive logging:
- All API endpoints log their operations
- The ingest endpoint logs detailed information about each step
- Database operations include logging for troubleshooting
- Errors are caught and logged with detailed information