How to enable Spartacus SSR on SAP Commerce Cloud in the Public - server-side-rendering

We've tasted Spartacus SSR recently. It works on-prem according to the Spartacus documentation but when it's deployed on SAP Commerce Cloud in the Public it continues using client-side rendering.
Is there any special configuration on how to tell Cloud deployment to use SSR or it should guess it automatically?
Any help is appreciated. Thank you.

There is an "enableSSR": true option that you need to set in your manifest.json - see https://help.sap.com/viewer/1be46286b36a4aa48205be5a96240672/SHIP/en-US/cd5b94c25a68456ba5840f942f33f68b.html

Related

Production security for .json private keys in Google Cloud Platform and FireBase

We're developing a full-stack platform deployed on GCP via AppEngine and with Firebase (Firestore + RealTimeDb) as noSql Db Module.
We're going live but I've a doubt. Now we're using the Firebase private-key.json to interface our software to Firebase and it is saved to a folder in the project like src/firebase and it is bound to our code through:
admin.credential.cert(require(path))
The API key and the path are saved to the .env file.
We're using the same technique to use the GCP client libraries (for example like Logging system).
I've also see that for GCP client libraries Google advises to use environment variables, but also indicates that they're active only during the session.
Anyway, to respect and to optimize security of our system: we should go live with these configurations or we have to change them? Please, do you have any advice to not expose the credentials and to don't have a vulnerable system?
Thanks guys
Posting John Hanley's, guillaume blaquiere's, al-dann's and Alex L's comments as a Community Wiki for visibility.
App Engine and Firebase are different services. There is a difference between their configuration files.
App Engine does not require a service-account.json file. Use Application Default Credentials (ADC).
Deploying a service-accout.json file inside your application source code is NOT SECURE.
The AppEngine service has the permission to use Firebase product (Firestore, Firebase functions) which should be sufficient. This means that you don't really need an API Key and a Firebase private key in your Node.js back-end.
App Engine runs under a service account. It may be possible to grant relevant IAM roles to that account (i.e. roles/datastore.user), so it can work with the Firestore service. If you would like - you can keep them in different projects.
You can refer to the Node.js quickstart for guidance in this scenario.

SAP COMMERCE Spartacus - documentation for SSR

Is there any good and up to date documentation for SSR with Spartacus (1.5) for SAP COMMERCE?
I know this:
https://sap.github.io/cloud-commerce-spartacus-storefront-docs/server-side-rendering-in-spartacus/
https://enable.cx.sap.com/media/SpartacusA+SSR+Deep+Dive+-+SAP+Commerce+Cloud/1_6jbx5p6e
But maybe not everything is up to date in this documentation for current Spartacus release 1.5.
What could be wrong or missing if there is at least something generated with SSR but still things like
<header class=""><cx-page-layout section="header" class="header"><!----><!----><!----></cx-page-layout><cx-page-layout section="navigation" class="navigation"><!----><!----><!----></cx-page-layout></header>
are in DOM that are not rendering without java script?
Based on our experience, we are using these sources of information and technical approaches during project implementation:
Theory
https://angular.io/guide/universal (you can feel free to use Angular official documentation as a primary source, cuz Spartacus uses Angular OOTB features to make it works)
https://sap.github.io/spartacus-docs/server-side-rendering-in-spartacus/
https://enable.cx.sap.com/tag/tagid/spartacus (SSR related videos)
Practical approaches
You should observe and analyze console output during starting your application in Node.js
You can use SSR configuration from example Storefront application (https://github.com/SAP/spartacus/tree/develop/projects/storefrontapp) like a starting point, cuz OOTB SSR works like a charm

vuejs nativescript firebase webapp to android/ios app

I am new with NativeScript, Vue.js, and Firebase.
I have a built web app using Vue.js and Firebase, but now I don't know how to integrate the code to NativeScript using the same code of Vue.js.
Is there a way to do this? And how can I start it?
I worked with #jlooper over the last couple of weekends to get a definitive answer for this because there wasn't one anywhere previously:
https://medium.com/#groksrc/how-to-set-up-nativescript-vue-js-and-firebase-465354d4296b
There are instructions on Eddy's plugin README are mostly complete, but there are a few gotchas that I point out in my blog post that you need to be aware of. Also, the readme isn't specific to vue so it's not immediately clear where to put the Firebase files. Those are all explained in the blog post as well as a couple of links to other small projects from Jen that will get you started.

Do I still need a backend like RoR or Django if I use Firebase?

I am a Front-end developer with limited backend knowledge.
My question is do I need other backend frameworks like Django or Ruby on Rails if I use Firebase as a backend? In other words, can I solely depend on Firebase as a backend and build a single page web application or Mobile application without writing a single line of backend code?
Thanks for your time viewing the question.
I was also looking for a platform to minimize server code and I found that firebase can help a lot.
You will get plenty of docs on net. You can start at angular fire + firebase doc
https://www.firebase.com/docs/web/libraries/angular/quickstart.html
Following document was helpful for me to design my app, which requires some amount of off-line processing too.
https://firebase.googleblog.com/2013/03/where-does-firebase-fit-in-your-app.html

Firebase client library for ROBOVM

I am developing a mobile app with Robovm for ios.
I need to use Firebase in my app.
Is there any way to use Firebase in Robovm?
Update: we have added Firebase Analytics to our Robovm app and documented how to do that at https://www.squins.com/knowledge/adding-firebase-analytics-to-a-robovm-ios-app/
Original reply:
You will have to create bindings manually.
Some instructions to get started: https://github.com/MobiDevelop/robovm/wiki/How-are-bindings-to-existing-native-frameworks-generated%3F
On their Gitter chat-room, another libgdx developer is trying to achieve exactly that and he is being helped out by the maintainers of Robovm :-).
https://gitter.im/MobiDevelop/robovm?at=58d043dab809ca5f4a654424

Resources