A common question we get about Cleavr features is, “What’s the difference between site and web app?”
Admittedly, the current documented explanation probably doesn’t do a whole lot to clarify the differences, plus the terminology we use, “site” and “web app”, I’m sure also contributes to the point of confusion. But, don’t worry! We’re currently working on making this more intuitive and straightforward in our next release.
In the meantime, here are some notes on the differences. I hope these help clarify and even give you more insights into the flexibility and power of Cleavr.
- Think of sites mainly in terms of the domain/url used for your web app
- When you add a site, Cleavr configures the domain with the NGINX web server, applies SSL, configures cache, and installs any additional environmental and configuration dependencies required for your base app (such as databases, frameworks, etc)
- This is also where you can enable site level authentication, manage redirects, etc
- Adding a site also defines a directory system within the server that is unique to the site
- Think of web apps as the main production architecture and deployment engine
- For many use cases, you may only need 1 server for your website/app; but, there can be a one-to-many relationship between a web app and servers; such as, you can point a web app to a server hosting the site, another server that hosts the apps database, and another that hosts the app’s queues and handle all of these with multi-server deployments
- You can even create multiple web apps that point to the same site. This comes in handy when you have a site divided between a backend and a frontend that use different stacks. Such as, a Strapi headless CMS backend and a NuxtJS frontend. You may even have these both bundled in the same Git repo. In these instances, it may be more preferable to have the frontend and backend separated into separate web apps to make deployments more manageable and efficient.
I hope these bullet points help provide more clarity into the differences.