Hi everyone,
I maintain a Shopify-based site that includes a growing collection of interactive calculators and personalized tools.
I am evaluating Opalstack for a separate application layer, but I have not deployed this architecture on Opalstack yet.
The intended structure would be:
- the main storefront and checkout remain on Shopify;
- the root domain and
www continue pointing to Shopify;
- a subdomain such as
tools.example.com points to Opalstack;
- the interactive tools run as a Next.js or Node.js application;
- scheduled data updates and background jobs run on Opalstack;
- PostgreSQL may be added later for saved results, application data and internal analytics.
Some tools are simple client-side calculators, while others may eventually require server-side calculations, API routes, scheduled data updates and more reliable application logging.
I have read the Node.js documentation and the recent Next.js discussion mentioning the dashboard installer, start and stop scripts, and the cron configuration used to keep the application running.
Before building the prototype, I am trying to decide between two approaches:
- Run the complete Next.js project as a long-running Node.js application.
- Export the user interface as static files and run only the calculation and API layer as a separate Node.js application.
For this kind of hybrid Shopify and Opalstack setup, which approach has proved more reliable in practice?
I am particularly interested in the differences regarding application restarts, memory usage, deployment updates, logs, scheduled jobs and communication between the Shopify storefront and the Opalstack subdomain.
For context, this is one of my current user-facing tools: [link removed].
The linked page is my own site and is included only to demonstrate the present use case. It is not currently hosted on Opalstack.
I will test the recommended structure and add the resulting configuration and any issues I encounter to this thread.