paralect/ship

Concept discussion: Ship Components

anorsich opened this issue · 0 comments

An idea: allow write standalone ship components which later could be automatically merged into main ship project on demand.
Example of such components:

  • avatar upload (with automatic image resizing based on size from config)
  • stripe based subscription management (subscribe, success emails, etc)
  • braintree based subscription management (subscribe, success emails, etc)
    We want to solve some typical developer tasks, but keep Ship as tiny as possible.

Raw concept

  • Define some ShipComponent template project, which can be used to start writing new component.
  • Use current Ship project as a convention (name of the folders, database schema definition, standard resources (user), routes file location, etc)
  • Implement ShipComponent merge tool which would allow merging any component into Ship on demand. Every ShipComponent merge should be done after main ship merge process and should result in the standalone commit.
  • Define some sort of file format with a list of things that need to be merged into Ship. ShipComponent merge tool should use this file to figure out what needs to be merged. Every ship component should define such a file.
  • Every merged component could become a separate resource in Ship and also a separate page on UI. We can add this component as a box on the main page of the generated app. When a user clicks that box we should redirect him to the page in UI which implements this functionality.