Open zackarychapple opened 2 years ago
We will need to revisit the requirements in https://github.com/valor-software/valor-launchpad/issues/176 after we resolve this one.
@YeomanWang I added another option to the first step, the user should be able to either do a npx create-valor-admin
command that would also create the nx workspace. If they are in an existing workspace they can do the nx add valor-admin
the additional steps would be the same.
@YeomanWang You can leave comment below about your question.
After discussion, We have some conclusions: Pre-requirement:
a little part of Valor Admin Panel
& Licensed User can view(also build) x
percentage of VAP
Valor Admin Panel
based on command line(also use command line to input their license)Simple architecture/ work flow:
command generator interface
for client side and will be published to NPM for downloading.command generator interface
will include prompt
feature like Licensed Key input
& Feature & Module select
for user.command generator interface
will not include any source code.code generator
work online.command generator
will send a request to code generator service
with key and asked feature, and the service will run some logic then return the required code pkg
.(get code from repo + customized it + zip it)command generator interface
receive the code pkg
, it will release it and make it a reality workspace.Discussion:
I know this is more like the Yeoman
way to do the work, rather than using nx generator style
. But considering, we should fully control the access right for source code
, There is no way we put the code into file folder
like angular schematic did.
After discussion, We have some conclusions: Pre-requirement:
- We have Normal User and Licensed User, Which Normal user can only view(also build)
a little part of Valor Admin Panel
& Licensed User can view(also build)x
percentage ofVAP
- For every user, there is no-way for them to get the full content of source code, except they pay for the source code.
- Users can choose what they want to include in
Valor Admin Panel
based on command line(also use command line to input their license)Simple architecture/ work flow:
- A
command generator interface
for client side and will be published to NPM for downloading.- This
command generator interface
will includeprompt
feature likeLicensed Key input
&Feature & Module select
for user.- This
command generator interface
will not include any source code.- A backend service will take over the
code generator
work online.command generator
will send a request tocode generator service
with key and asked feature, and the service will run some logic then return the requiredcode pkg
.(get code from repo + customized it + zip it)- while
command generator interface
receive thecode pkg
, it will release it and make it a reality workspace.Discussion: I know this is more like the
Yeoman
way to do the work, rather than usingnx generator style
. But considering, we should fully control the access right forsource code
, There is no way we put the code intofile folder
like angular schematic did.
Based on the discussion with @zackarychapple & @YeomanWang, there is a better solution for us to implement our feature which also meet our code security
requirement.
This solution includes three parts:
nx generator
, which is interactive command line tool using for user input Lincense
and select required feature & Module.Different codebase release version based on license on GitHub
, We should create several branches based on my License support feature
, make sure these code base workable and prepared for production, then release them to GitHub.Gumroad
take the responsibility for License verify
and code base dispatching
, nx generator
mentioned above, send license to Gumroad
and Gumroad
will return the codebase pair to licence
to client.
When a new project is being created to use valor-launchpad we should be able to use schematics in a similar fashion to how nx does for creating a workspace. Using a sequence similar to the one below
nx add valor-admin
ornpx create-valor-admin
License key verification will need to check their against gumroad. If they do not have a valid license they should be prompted to either try for free or go the website to purchase.