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

FlipStore - v0.1 #527

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Conversation

jblanked
Copy link
Contributor

Application Submission

  • Download Flipper Zero apps directly to your Flipper Zero using WiFi.

Extra Requirements

Author Checklist (Fill this out)

  • I've read the contribution guidelines and my PR follows them
  • I own the code I'm submitting or have code owner's permission to submit it
  • I have validated the manifest file(s) with python3 tools/bundle.py --nolint applications/CATEGORY/APPID/manifest.yml bundle.zip

Reviewer Checklist (Don't fill this out)

  • Bundle is valid
  • There are no obvious issues with the source code
  • I've ran this application and verified its functionality

@doomwastaken doomwastaken added app (new) QA pending To be reviewed by QA labels Oct 15, 2024
@jblanked jblanked closed this Oct 17, 2024
@jblanked jblanked reopened this Oct 19, 2024
@jblanked
Copy link
Contributor Author

jblanked commented Oct 19, 2024

#530 referencing these questions from: #530 (comment)

It is using https://catalog.flipperzero.one/api/v0/0/application?limit=500&is_latest_release_version=true&offset=0&sort_by=updated_at&sort_order=-1 to get the list of available apps, then it parses a simpler JSON format to send back to the Flipper.

For downloading apps, it sends a request to https://catalog.flipperzero.one/api/v0/application/version/{app_data["current_version"]["_id"]}/bundle to download the bundle.zip. Then it uses UFBT to compile the code located in the code folder. Then afterwards, it sends back the bytes of the .fap file to the Flipper

It's using the latest version always (well I assume those links will produce the latest versions each time).

It does currently save the apps to a custom folder within the apps called "FlipStore". I did my development on Unleashed and based off your comment, I'm assuming custom folders cannot be created in the apps directory on Official? If that's the case, I'll need to integrate the different app categories much much sooner than I planned.

Thank you again for taking the time to review the apps and provide feedback. I do plan on open-sourcing flipsocial.net and am more than happy to share/explain any code.

@jblanked jblanked mentioned this pull request Oct 19, 2024
6 tasks
@skotopes
Copy link
Member

I see.

Let me start with small excurse: from the beginning of the catalog development we realized it is going to be quite difficult child. Nature of the platform doesn't allow us to maintain stable API and we were forced to design it around idea that everything changes and often in major way. So we've made system that continuously builds apps against constantly changing set of SDKs and archives artifacts in a way that we can deliver apps to as many different firmware as possible. That plus installation manifests became catalog we know now. Taking in account all the complexity and in order to keep behavior among the companions consistent we intentionally left API private.

And that brings us to the present moment: in order for us to accept this PR you must implement everything that we did in companions. Otherwise you'll bring mess into their flow.

In general we can accept that and provide additional resources if needed.
But that's going to be quite difficult journey.

Also I think that if we going to pull it off then we'll have to update wifi board firmware to provide seamless socket/web API on the system level, so no custom wifi board firmware will be needed. To be honest we've been thinking about it for a while and it is in our task backlog.

PS: list of things that companion apps implements:

  • app group query based on firmware API version
  • app query based on firmware API version and group
  • app installation based on firmware API version and installation manifest creation
  • app update based on firmware API version and version from installation manifest
  • installation manifests(Flipper File Format) load, verify, maintain
  • various deployment related stuff: creating directory folders, consistent deployment of app and manifest at the same time and etc...

@jblanked
Copy link
Contributor Author

Thank you for providing such a detailed breakdown of the creation and maintenance of the API and SDK.

I agree that this is a challenging journey, and honestly, downloading apps was just the tip of the iceberg. By version 1.0, I aimed to facilitate downloading and updating system firmware.

If I'm permitted to proceed, I would greatly appreciate any help you can provide with this project, as well as any resources you could share. I hope that the FlipperHTTP flash is at least a step forward.

I'm open to making any changes or additions as needed.

I had a thought: if the API is maintained by your team, couldn't FlipStore continue to use it? Or, even simpler, just use UFBT to compile .faps from GitHub repositories?

Thanks again for your help, and I look forward to hopefully collaborating.

@jblanked jblanked closed this Oct 21, 2024
@jblanked jblanked deleted the flip_store_v0.1 branch October 21, 2024 01:35
@jblanked jblanked restored the flip_store_v0.1 branch October 21, 2024 01:35
@jblanked jblanked deleted the flip_store_v0.1 branch October 21, 2024 01:35
@jblanked jblanked restored the flip_store_v0.1 branch October 21, 2024 01:35
@jblanked jblanked reopened this Oct 21, 2024
@jblanked
Copy link
Contributor Author

My apologies, I didn't mean to close/delete the branch. I was doing some clean up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app (new) QA pending To be reviewed by QA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants