Capacitor Plugin (w/ Native Mobile SDKs)

Project Name: Capacitor-Zenon Plugin

Description: This proposal is for a Capacitor plugin which will allow for building cross-platform applications (web, android, ios, desktop) with a single codebase, while still leveraging native SDKs. This is vital for developers in the long term since the only other viable alternative is Flutter, which has limitations in that the developer must know Dart and they are unable to use any web libraries in their app. With Capacitor, they will be able to utilize any web framework (React, Angular, Vue, Vanilla JS, etc.), any web libraries, and any native libraries. Once the plugin is complete, someone could take their existing web zApp and have it working on mobile devices within 5 minutes, with no code changes and optimized native performance.

URL: https://forum2.zenon.org/t/capacitor-plugin-w-native-mobile-sdks/531

Team: Currently the plan is to develop the first implementation alone, but the plugin/SDKs will be released as open-source upon completion. I am one of the core engineers for Ionic (the team that created Capacitor) and I have extensive knowledge on the ecosystem and requirements necessary as I have architected and maintained several plugins.

Phases

What is your high-level roadmap? In order to accomplish everything, there will need to be three phases, each encapsulating a similar amount of time and effort.

Phase 1
High level overview of main tasks:

  • Kotlin SDK (for native Android apps)

Completion of Phase 1 will be measured by:

  • Porting the Dart SDK to Kotlin with at least 90% compatibility.
  • Publishing the SDK on Maven Central repository.
  • General usage documentation.
  • Uploading the code on Github for open-source contribution.

Phase 2
High level overview of main tasks:

  • Swift SDK (for native iOS apps)

Completion of Phase 2 will be measured by:

  • Porting the Dart SDK to Swift with at least 90% compatibility.
  • Publishing the SDK on Cocoapods & Swift Package Manager.
  • General usage documentation.
  • Uploading the code on Github for open-source contribution.

Phase 3
High level overview of main tasks:

  • Capacitor Plugin

Completion of Phase 3 will be measured by:

  • Integrate official Typescript SDK for the web portion of the plugin.
  • Integrate Kotlin SDK (from Phase 1) for the android portion of the plugin.
  • Integrate Swift SDK (from Phase 2) for the iOS portion of the plugin.
  • General usage documentation.
  • Publishing the plugin on NPM.
  • Uploading the code on Github for open-source contribution.
  • Sample application code uploaded on Github.

Funding

Total Requested Funding = 5000 ZNN and 50,000 QSR
Project Duration = 4-7 months

How did you calculate your budget?
This project will be a significant amount of work since there is no Kotlin SDK or Swift SDK in development or production, which are prerequisites for a Capacitor plugin to function on every platform. The plugin itself will also contain a decent amount of work since I want to be thorough in integration and testing all of the functionality on all platforms. However, I have set the proposal up in a way that each deliverable phase will have tremendous benefits to the ecosystem as a whole. I estimate each phase to take at least 80 working hours and due to my full-time job and other obligations, I will not be able to dedicate more than 20 hours per week on the project.

Project and Payment Milestones:
Phase 1
Funding Request: 30% (1,500 ZNN and 15,000 QSR)
Duration: 1-2 months (80-160 hours)

Phase 2
Funding Request: 30% (1,500 ZNN and 15,000 QSR)
Duration: 1-2 months (80-160 hours)

Phase 3
Funding Request: 40% (2,000 ZNN and 20,000 QSR)
Duration: 2-3 months (160-270 hours)

Other Information

Risks, Assumptions, Known Issues, Dependencies: Since I will be developing the Kotlin and Swift SDKs independently, the only other dependency will be the usability of the official typescript SDK. If the typescript SDK proves unusable or unstable in any way, I will have to allocate time to make it functional before I am able to complete Phase 3.

Have you previously submitted a proposal (either in Acclerator-Z or Incubator)? No.

Why is Capacitor necessary when there is Flutter?

  1. I would estimate that at least 95% of existing dApps are built with web technologies due to the technical challenges and hurdles that are present when trying to build for mobile. With a capacitor plugin, a developer could take any existing (or new) web zApp and easily make it compatible with mobile devices with no additional code changes.

  2. Capacitor is framework-agnostic, meaning it allows for developers to leverage their existing knowledge and use the framework of their choice. This could be Ionic, React, Angular, Vue, Typescript, etc… While, Flutter requires developers to use Dart.

  3. Capacitor will allow for web libraries, npm packages, web components, as well as any native mobile libraries of the developer’s choosing. Flutter is limited to only using existing dart packages and Flutter widgets.

  4. Flutter is not known for high performance web apps. It is not SEO-friendly, there’s no live reload, limited debugging tools for inspecting elements, and it is notorious for high file sizes (slow initial load), low fps, and buggy scrolling. That’s not to say that a Flutter web app cannot have good performance metrics, however Capacitor is built for web first, while Flutter is built for mobile first.

Please comment any additional information needed or questions that you have and I would be glad to answer.

12 Likes

Looks like a great initiative and thorough proposal to me!

Seems to be a great resource for cross platform zApp deployment + it would give the community several SDKs.

Looking forward to what other techies in the community have to say about this.

5 Likes

+1

  • 2-20 to meet the character limit too…
4 Likes

Thank you very much for taking the time to write out this comprehensive and well thought out proposal. Sounds like a useful plugin we should have. I will be voting yes.

4 Likes

Sounds like a no brainer, with current ZNN price I see no issue with the max allocation. @devs maybe you can provide some insight?

I have 2 questions @Chace for my own curiosity:

  • I assume progress will be tracked on github?
  • Can you clarify how 90% compatibility would be measured?

I think you’ve done a good job explaining the benefits here :+1:

5 Likes

Sure, I can track the progress on Github and I listed 90% compatibility since I’m not sure 100% compatibility will be possible on first release, without sacrificing too much time. We can measure 90% compatibility based on the total amount of API endpoints. Assuming there are 48 API endpoints, 90% compatibility would be 43-44 of the endpoints being functional.

The scope for each SDK will be similar to what is outlined in the Rust SDK Proposal.

5 Likes

awesome, thank you for clarifying! I’m sure others will pop up with some questions but the benefit of having this discussion now is that when you submit officially via A-Z it should get through no issues

2 Likes

Remember that the rpc endpoints are not all that’s needed for the sdk to be complete. You wouldn’t have any wallet functionality then (i.e., look at the aBi too; no send/receive functionality possible else). Would that be included in your targeted 90 or 100%?
Otherwise, great proposal and well worth it, even if the typescript sdk fails.

4 Likes

Yes, I was planning on supporting all wallet functionality, which I can add to the phase requirements.

7 Likes

Sir, saw your note on TG. Pillars can take a little time to vote, so please hang tight. It could take a few more days, but I’m confident you will get approved.

I am surprised to see one no vote. Curious to hear from that Pillar why they said no.

Thanks again for your submission!!

3 Likes

Nice proposal @Chace ! Have any other friends that code kek

1 Like

image

3 Likes

@Chace Congrats!!! Look forward to seeing what you can do. Let us know if there is anything we can do to support you. I can’t code, but I can meme!!!

1 Like

Hi,
Good new for this community to have a good plugin support to our project.
Keep up the incentive mood. Be happy and great !!!
Thank you.

1 Like

@Chace if time permits I’d love to hear your thoughts on what tools/apps/projects you’ve seen built with Capacitor that have been successful on other crypto networks - might give some members ideas for other A-Z projects

1 Like

pumped about this one – great to have more dev’s in ecosystem… not only does this bring the person building the capacitor plugin, but sets us up for more devs on go-forward

3 Likes

AFAIK, this will be the first blockchain - another revolutionary feature for Zenon. And as far as ideas go, this will enable any existing or new blockchain zApp to run on web and as mobile apps (android, iOS).

4 Likes

One of the very anticipated proposal as for me. Not a technie but sounds like it capacitor plugin will help bringing zApps to mobile devices which is even the most lacking part on classical blockchain projects at the moment.

Thank you for your propsal

2 Likes

@Chace did you submit another proposal for Phase I? Was that an accident? I approved it, but the correct way would be to request funding for Phase I under the already approved proposal. I think you will need to complete the work under Phase I for the funding to be approved.

Are you asking for prefunding for Phase I?

Yes, I accidentally submitted the phase. I was unaware that voting would commence immediately after creating the phase. I do not need pre-funding. I will most likely just re-submit the phase whenever it is actually completed.

2 Likes