-
Notifications
You must be signed in to change notification settings - Fork 295
Tanstack DB Web Starter improvements #3091
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Add src/lib/electric-proxy.ts with prepareElectricUrl() and proxyElectricRequest() - Update API routes (projects, users, todos) to use new abstraction - Reduces ~50 lines of duplicated code across 3 routes - Centralizes Electric Cloud auth and proxy configuration - Includes proper Vary header handling for cache invalidation 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- Add authStateCollection for caching auth state in memory - Implement smart baseURL detection (browser vs server) - Add beforeLoad with auth state caching to prevent repeated auth checks - Add comprehensive error component with graceful degradation - Eliminates flash of loading states and improves performance 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- Add Core Pattern description and data flow architecture - Include detailed patterns for reading/writing data - Add Critical Rules section with key constraints - Document collection definition patterns with examples - Add naming conventions and schema management guidance - Provide component patterns for consistent development Improves developer onboarding and prevents common mistakes. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- Enable defaultPreload: 'viewport' in router configuration - Preloads routes when they come into viewport - Significantly improves perceived performance with minimal overhead - Routes load instantly when user navigates to them 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- Import ELECTRIC_PROTOCOL_QUERY_PARAMS from @electric-sql/client - Replace hardcoded array with official constant - Ensures compatibility with Electric SQL client updates - More maintainable and follows best practices 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- Use correct error code USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL - Better error message display using error.message - Improved console logging for debugging - More robust error handling in catch block 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3091 +/- ##
==========================================
+ Coverage 75.85% 77.22% +1.36%
==========================================
Files 163 170 +7
Lines 8355 9050 +695
Branches 106 280 +174
==========================================
+ Hits 6338 6989 +651
- Misses 2016 2059 +43
- Partials 1 2 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
- Fix TipTap editor type issues in linearlite example with proper type assertions - Fix react-beautiful-dnd JSX component type errors in both linearlite examples - Fix react-window List JSX component type errors in both examples - Fix y-electric BodyInit type compatibility with Uint8Array - Fix crypto API BufferSource type compatibility in encryption example - Convert SST config to use dynamic imports instead of top-level imports 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Examples
|
|
N.b.: I think |
|
FYI: e6f1ab7 without it netlify complains when deployed via CLI (it's fine via Github deployment): |
|
Also FYI, draft |
- Add comprehensive Quick Start section with clear 4-step timeline - Add troubleshooting table for common pitfalls (Docker, Caddy, ports) - Add detailed Caddy rationale explaining HTTP/2 benefits for Electric shapes - Add production deployment checklist with auth security warnings - Add complete 'Adding a New Table' walkthrough with 7-step process - Extract generateTxId to shared trpc.ts file (DRY up duplicate code) - Add migrate:generate script for cleaner migration workflow - Add core architecture rules explaining Electric/tRPC/collection patterns - Update .env.example with production environment variables and comments - Remove unused @tanstack/react-router-with-query dependency 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Cool, I'll just have a go at using it. |
|
@thruflo can you approve? |
No description provided.