Oliver and I talked about the possibility of splitting the Hub into several parts. So I just started modularizing the API:
Core: This could be released as Open Source one day, it includes the authorization layer + document replication API (endpoint for RemoteStore).
Publications: That's substance.io specific and could live in a separate module one day. Also because replication and publication are decoupled. People should be able to implement their own publication workflows by just implemented a service that conforms to our Publications API spec (networks, publications, versions)
Current layout (to be discussed and improved)
routes/api/user_api.js - all authentication related stuff
routes/api/document_api.js - Document API (should basically be a HTTP endpoint for the Substance.Store API, used by Substance.RemoteStore) - should not include services that are outside of the Store API scope.
routes/api/publication_api.js - all publication related stuff (networks, publications, versions)
routes/api/maintenance_api.js - Maintenance-related stuff such as seeding goes here.
@oliver---- next step would be pulling out parts from lib/documents.js into lib/hub_store.js which exposes the store api but considering authentication/collaborators etc.
Oliver and I talked about the possibility of splitting the Hub into several parts. So I just started modularizing the API:
Core: This could be released as Open Source one day, it includes the authorization layer + document replication API (endpoint for RemoteStore).
Publications: That's substance.io specific and could live in a separate module one day. Also because replication and publication are decoupled. People should be able to implement their own publication workflows by just implemented a service that conforms to our Publications API spec (networks, publications, versions)
Current layout (to be discussed and improved)
routes/api/user_api.js
- all authentication related stuffroutes/api/document_api.js
- Document API (should basically be a HTTP endpoint for the Substance.Store API, used by Substance.RemoteStore) - should not include services that are outside of the Store API scope.routes/api/publication_api.js
- all publication related stuff (networks, publications, versions)routes/api/maintenance_api.js
- Maintenance-related stuff such as seeding goes here.@oliver---- next step would be pulling out parts from lib/documents.js into lib/hub_store.js which exposes the store api but considering authentication/collaborators etc.