Skip to content
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

Write a walkthrough tutorial for an Electric web app #2368

Open
KyleAMathews opened this issue Feb 24, 2025 · 3 comments
Open

Write a walkthrough tutorial for an Electric web app #2368

KyleAMathews opened this issue Feb 24, 2025 · 3 comments
Labels
documentation Improvements or additions to documentation

Comments

@KyleAMathews
Copy link
Contributor

It should cover

  • setting up a local dev environment
  • defining shapes
  • optimize app speed by preloading
  • writes
  • auth
  • securing the production deployment
@thruflo
Copy link
Contributor

thruflo commented Feb 25, 2025

optimize app speed by preloading

I think this is one strategy to optimise app speed by fetching ahead. I think we could also cover basic shape patterns like:

  • fetching one shape as an index and then syncing one or more shapes using the content of it (e.g.: get all project IDs for user, then sync projects)
  • changing a shape -- how this works, how this works with a raw shape/shapestream and with useShape
  • cleanup on component unmount

I also think we should demonstrate what you can sync into. The tutorial is a perfect flow for syncing first into memory, then binding to a component, then syncing into a DB and binding using a liveQuery.

@thruflo thruflo added the documentation Improvements or additions to documentation label Feb 25, 2025
@thruflo thruflo changed the title Write a basic getting started tutorial for an Electric web app Write a walkthrough tutorial for an Electric web app Feb 25, 2025
@thruflo
Copy link
Contributor

thruflo commented Feb 25, 2025

This should be half-way between the existing quickstart (which is the "basic getting started", hence edited title) and the more detailed guides. So walkthrough the steps of more realistic e2e app development with Electric but also links out to guides for the full details.

@KyleAMathews
Copy link
Contributor Author

Generally for a tutorial you want to keep it as simple as possible with just the narrowest possible pathway connecting the key areas. They're for beginners who know absolutely nothing about what we're doing so we want to avoid presenting options or complexity beyond the minimum needed to get something basic working. Every branch in the explanation loses a lot of people.

Guides are a better place for detailed looks at complex patterns or comparing tradeoffs of syncing into memory vs. db. etc.

E.g. https://danielsieger.com/blog/2023/04/24/framework-for-better-documentation.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants