[DevOps] HMW DESIGN AN ARCHITECTURE ALLOW USER SELFT-HOST OURS OPEN-SOURCE
HMW DESIGN AN ARCHITECTURE ALLOW USER SELFT-HOST OURS OPEN-SOURCE
Base on the discussion we're having ours (architecture)solution will enable user self-host ours open source architecture with an GCP
Requirements
- Mobile app able to find the self-host backend. (Links, QR)
- Backend are able to located the Mobile app wanted to connect to it.
- Backend provide device access key (device-id) for mobile app.
- (One device-id per mobile app)
- Open-source(web, backend) in the picture down bellow are able to be provision in their gcp account. via terraform
=> After Mobile app successful find the backend self-host, and establish with backend device access key (device-id). The mobile app(device) will belong to the backend self-hosted (organization).
Img

Mobile app able to find the self-host backend. (Links, QR)
Nice with those diagram we could solve those (correct me if i wrong)
Requirements
- [x] Mobile app able to find the self-host backend. (Links, QR)
- [x] Backend are able to located the Mobile app wanted to connect to it.
- [x] Backend provide device access key (device-id) for mobile app.
- [ ] (One device-id per mobile app)
- [ ] Open-source(web, backend) in the picture down bellow are able to be provision in their gcp account. via terraform
@DangCao1999 @Zeroska @Kaigagi Checkout this solution we're having guys, we are solving 2 dot on top, and these dot bellow still not clear
- [x] Backend provide device access key (device-id) for mobile app.
- [x] (One device-id per mobile app)
I have a write down in #12, in there it has a section say "How device claim work" I think it could be resolve those dot.
I suggest using a node package called keygenerator ( here is the reference: https://www.npmjs.com/package/keygenerator ) to generate a key. Then we can check whether or not it is unique later by using some comparison.
Or we just use numbers to organize it ? - It easier to compare.
I suggest using a node package called keygenerator ( here is the reference: https://www.npmjs.com/package/keygenerator ) to generate a key. Then we can check whether or not it is unique later by using some comparison.
Or we just use numbers to organize it ? - It easier to compare.
"some comparison" you mean like we has to query the db for it right. Yes we could use that package for generate key and do comparison. Recommend this lib over your https://www.npmjs.com/package/shortid. Or we could use auto-generated id by database
Sum up

Device Model: Device id with uuid generate default by firestore. Access key generate by package https://www.npmjs.com/package/shortid.
Sum up
Device Model:
Device id with uuid generate default by firestore.
Access key generate by package https://www.npmjs.com/package/shortid.
Okiee @Kaigagi you take note and add those library in package log and make those to our backend dependency.