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

Common Core Framework #48

Open
dashcraft opened this issue Apr 25, 2022 · 4 comments
Open

Common Core Framework #48

dashcraft opened this issue Apr 25, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@dashcraft
Copy link

Something I've been doing recently with the company I cofounded, is creating a common core application that runs our primary code. It handles initial server setup, ble wifi credential setting (improv-wifi spec), barebones/basic MQTT connection to home assistant, ota updates, etc. I wonder if it doesn't potentially make sense to create a stripped-down version to offer users to build from in xs-dev, that gives them some core features pre-programmed, an interface to interact with, and some compartments/mod options to extend the core app?

I imagine there are some common use cases (wifi onboarding was one for us) that pop up, some devs might like a framework with prebuilt features to start from.

@HipsterBrown
Copy link
Owner

There are probably a few ways to go about this idea. The common core could be installed as a third-party module (see this new proposal #49) and instantiated by the project. Or it could be part of a starter template, similar to how Moddable examples can be used to initialize new projects.

The first option makes it easy to provide upgrades to consumers of this common core feature set, while the latter gets them up and running quicker through a pre-configured host with separate project main.

How would you think about distributing such a thing without bundling it directly into xs-dev?

@dashcraft
Copy link
Author

Good question, maybe a framework vs a starter template.

@dashcraft
Copy link
Author

I've narrowed it down to a handful of things i think most users may want.

  1. A way to "register" sensor readings and values, to sync with mqtt/home assistant out of the box
  2. A simple HTTP server that registers a local domain, serves a simple visualization to send HTML page, probably served via cdn
  3. A simple way of onboarding wifi credentials (esp32 i have ble implementation using improv-wifi) out of the box
  4. Out of the box OTA support, UI

Numbers 1-3, i have a good working knowledge of how to solve and expose via a common host file, number 4 is upcoming on a project of mine but i haven't dug into it a ton.

@HipsterBrown
Copy link
Owner

I definitely agree with 1 & 3 as great default features. For the second point, I like the local domain but would want to avoid a reliance on an external service, like a CDN, to avoid complexity and make the core project more resilient to Internet issues.

OTA support would be awesome but definitely a large task and could be a separate concern altogether. Not sure how "pluggable" you've imagined this core framework to be.

@HipsterBrown HipsterBrown added the enhancement New feature or request label Dec 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants