tidytown
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
The app uses a storage abstraction layer that makes it easy to switch between different storage backends:
- Currently using browser localStorage for persistence
- Will transition to Firebase in the future
- All storage operations are async to match Firebase's API
- Storage service handles both intentions and weekly focus data
To switch to Firebase:
- Create new FirebaseStorageService class implementing StorageService interface
- Update storage.ts to export Firebase implementation instead of localStorage
- Intentions and weekly focus are stored separately
- All storage operations are wrapped in try/catch for error handling
- Loading state prevents saving partial data during initial load