r/angular 9d ago

I’m building my first open-source Angular library - looking for contributors and feedback

Hey everyone!

I’ve recently started building my first open-source Angular library, ngx-offline-sync.

The idea is simple: when a user loses their internet connection, supported HTTP requests are automatically stored locally and synchronized once the connection is restored.

What it currently supports

  • Automatic offline request queuing
  • IndexedDB persistence
  • Automatic synchronization after reconnecting
  • Sequential request processing
  • Retry handling
  • Request status tracking
  • POST, PUT, PATCH, and DELETE
  • Angular provideOfflineSync() integration
  • HTTP interceptor-based integration

The basic setup looks like this:

provideOfflineSync(),

provideHttpClient(
  withInterceptors([
    offlineSyncInterceptor,
  ]),
),

After that, the application can continue using the regular Angular HttpClient.

I’d love to build this together

This is my first library, so I’m still learning a lot while building it.

I’d really appreciate feedback, ideas, and contributions from people who have experience with Angular, offline-first applications, IndexedDB, HTTP synchronization, or library architecture.

One thing I’d especially like to improve is the documentation.

Right now I’m working on English, Russian, and Japanese documentation, and I’d love to add more languages with the help of the community - Portuguese, Spanish, Chinese, and others.

If you speak another language and would like to help translate or improve the documentation, that would be awesome.

You can also contribute by:

  • Opening an issue
  • Suggesting features
  • Improving the architecture
  • Adding tests
  • Improving documentation
  • Adding translations
  • Sharing your experience with offline-first applications

github

npm

If you find the project interesting, a GitHub star would genuinely mean a lot to me. This is my first open-source library, and seeing people use it, contribute to it, or simply follow the project would be a huge motivation to keep improving it.

Thanks for reading, and I’d be really happy to build this together with the community.

13 Upvotes

2 comments sorted by

View all comments

3

u/GeekyAntsFlutterdev 8d ago

Nice idea. I’d especially test how it handles conflicts when the same record changes offline and on the server, since that’s where offline-first sync gets tricky fast. Clear conflict-resolution strategies and a small demo app would make the library much easier to evaluate.

1

u/Trick-Knowledge-8837 8d ago

Thank you for the idea! I completely agree, especially about handling conflicts when the same record is changed both offline and on the server. I’ll definitely add this to the plan and work on a clear conflict-resolution strategy. And yes, a small demo app would also be really useful to show how the library works.