Skip to content

Migrating to v4

Filip Lauc edited this page Jun 27, 2021 · 7 revisions

Significant Changes

  • No longer storing modules in database, they are now just constants in source.
  • Defining module authorization rules directly in firestore.rules.
  • Using Firebase emulators by default in development.
  • The entire ModuleDefinitionModule has been removed. We weren't using it for a while now and decided to drop it all together.

Migration Guide

  • If your modules aren't already in source in setup they need to be migrated there.
  • The authorization property can be removed from all module. When authorization is different from {"read": ["admin", "user"], "write": ["admin"]} it will have to be added to firestore.rules, you can find instructions for adding them here.
  • setup/collections/settings.collection.ts is no longer a thing and the navigation (layout.navigation) has moved to client/src/environments/static-config.ts.
  • The setup script now by default updates the local firestore instance, if you have multiple projects you might need to extend this.
  • It's possible that automatically creating public/cms during production builds might not work because of a bug with the current angular version, you might need to add public/cms/.gitkeep to git tracking.

Side Notes

  • Navigation is no longer generated from modules by default so a navigation object in static-config.ts is required.
Clone this wiki locally