Skip to content

Add phoenix-todo-app (ported from todo-app example) #2803

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nshkrdotcom
Copy link

Overview

Phoenix.Sync port of the existing todo-app example, demonstrating ElectricSQL integration with Phoenix backend.

Changes from Original

  • Phoenix Backend replaces the original backend, using Phoenix.Sync for embedded ElectricSQL
  • Same React Frontend with @electric-sql/react hooks (minimal changes)
  • Dual deployment modes: Production (single server) + Development (CORS-enabled)
  • Organized structure: phoenix/ and frontend/ directories with unified start.sh

Key Improvements

  • No separate Electric service needed (embedded via Phoenix.Sync)
  • Single-server production deployment eliminates CORS complexity
  • Better developer experience with organized project structure
  • Comprehensive documentation and setup scripts

Usage

./start.sh  # Choose production or development mode

Testing

  • ✅ All Phoenix tests passing (39 tests)
  • ✅ ElectricSQL real-time replication working
  • ✅ React frontend with live data sync identical to original
  • ✅ Both deployment modes tested and working

This provides the same todo app functionality with a cleaner Phoenix.Sync architecture.

Copy link

codecov bot commented Jun 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.30%. Comparing base (ad1994e) to head (ce2d92c).
Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2803      +/-   ##
==========================================
- Coverage   78.36%   78.30%   -0.06%     
==========================================
  Files         153      153              
  Lines        7183     7183              
  Branches      272      272              
==========================================
- Hits         5629     5625       -4     
- Misses       1552     1556       +4     
  Partials        2        2              
Flag Coverage Δ
elixir 77.21% <ø> (-0.04%) ⬇️
elixir-client 68.58% <ø> (ø)
packages/experimental 87.73% <ø> (-1.23%) ⬇️
packages/react-hooks 86.30% <ø> (ø)
packages/typescript-client 92.41% <ø> (ø)
packages/y-electric 55.12% <ø> (ø)
postgres-140000 77.87% <ø> (-0.06%) ⬇️
postgres-170000 78.00% <ø> (ø)
sync-service 78.26% <ø> (-0.04%) ⬇️
typescript 84.36% <ø> (-0.19%) ⬇️
unit-tests 78.30% <ø> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Successfully merging this pull request may close these issues.

1 participant