sap-commerce-tools / ccv2-project-template

Opinionated starter template for any CCv2 project
48 stars 28 forks source link

Update Versions #30

Open fibsifan opened 1 year ago

fibsifan commented 1 year ago

Backend:

Frontend:

intended to fix #29

Out of scope for this PR: since the versions of Frontend, Commerce Cloud and Integrations package are now coupled, find a way to parameterize all of them,

mpern commented 1 year ago

You rock! 🤘

mpern commented 1 year ago

BTW, if you have any questions/need help, just ask here or find me on LinkedIn

fibsifan commented 1 year ago

Sure, thanks.

Currently I'm fighting with my IDE and gradle-script support there, but I think i've got a working version of the commerce part.

Since the commerce accelerator is deprecated, I wonder if the template should still provide the accelerator storefront by default, or whether this should be behind a feature toggle?

mpern commented 1 year ago

Let's hide it behind a toogle. Default should be new OCC APIs only + Spartacus

fibsifan commented 1 year ago

I'm afraid toggling the acceleratorstorefront is not as easy as I thought, because the current process uses modulegen. Yacceleratorstorefront is still part of the accelerator module template, despite being deprecated. Would it be better to switch to extgen? Or should we rather stick with modulegen and still have the yacceleratorstorefront?

Also: I'm uneasy with uploading the cloudhotfolder extensions since I'm not licensed to do that. Wouldn't it be better to have them as dependency in the dependencies folder?

mpern commented 1 year ago

Or should we rather stick with modulegen and still have the yacceleratorstorefront?

Still use modulegen but delete *storefront afterwards?

fibsifan commented 1 year ago

That's what I went for, I hope I caught every trace of the storefront.

Should the cloudhotfolders be optional too? As far as I understand it, we could instead provide an alternative hotfolder configuration (plain folder, without azure) in the dev config for testing. Then the azure cloud hotfolders will only be loaded in the cloud.

If someone wants to test azurecloudhotfolder specifics they still could put them in the dependencies folder and unpack them?

Then I wouldn't need to commit copyrighted Code into Github ;-)

mpern commented 1 year ago

we could instead provide an alternative hotfolder configuration (plain folder, without azure) in the dev config for testing

Unfortunately not, the cloud hotfolder logic is different enough from the stuff in acceleratorservices to cause issues if not properly tested.

Let's add a note/step to download the extensions from the SAP Note 2817992, to avoid having the code in the template.

Plus a flag to optionally disable cloud hotfolders, if it isn't too much to ask.

fibsifan commented 5 months ago

Man, this keeps dragging on...

I updated the description with the current version and TODOs

The part of making the azurecloudhotfolders optional is easy I think, just haven't found the time to do it yet.

But with the Storefront It feels like a lot has changed. The environment.ts files have disappeared so the patches - at least partly - don't match anymore. I currently have no idea what a storefront configuration could look like that works locally but also lets you configure the endpoints and the CCv2 Base url in the cloud like described in the documentation

Any ideas?

mpern commented 5 months ago

thank you for keeping at it!

re. composable storefront: I think the patches are already obsolete. It has been I while since a set up a new storefront project from scratch, but it should just work ootb now. e.g.OCC_BACKEND_BASE_URL_VALUE is included by default in index.html etc.

fibsifan commented 4 months ago

Let's add a note/step to download the extensions from the SAP Note 2817992, to avoid having the code in the template.

Plus a flag to optionally disable cloud hotfolders, if it isn't too much to ask.

The flag was too complicated on first glance, I found no nice way to persist the initial decision whether it is needed so I just put it in the Readme.md for the user to handle it. They can either download the zip file or remove the dependency on bootstrapping it from the build.gradle.kts.

Apart from that I think I'm done for now. There is still a lot room for improvement, but I think it's definitely better than before.