Search code examples
architecture

How to propose web application demo with data to user?


I am working on a web application (interface with forms etc. - Server - db). I use AngularJS, NodeJS and MongoDB. The application is on the net but I still do not offer demo for users. I would offer them a login and password ("demo", "demo") or just a "Demo" button to access the demo version. On the public interface, there is a brief presentation, a contact form etc.

There are many internal interfaces. Once the registered user is authenticated, he's redirected to an interface according to its role. So I would propose a button or a list of roles to choose (interfaces depending on the role of the user). The user chooses the role he wants to see and open the demo.

So, how to organize this demo version technically? knowing that users connecting on a demo may not have the same data! should I create an empty database with the same structure as the "real" and destroy it once the user logs out? In this case, how to know if the user is offline? should i create a batch that removes db at night? Or I use the same bd but with different users? but how to handle it at the interface if I have a user: "demo", "demo" or redirecting button to the demo?

How are the apps on the web?


Solution

  • You could make a separate database for your demo environment, which gets reset every day. This demo environment might need a bit of extra code to auto authenticate users, or prevent the user from deleting the user account or whatever. You might start ending up with spam issues, but I would worry about that once it happens. If it happens, maybe use a captcha on the login page for the demo environment.

    I don't know much about your application, so use your judgement here.