How to offer a demo version of web applications with data to a user?

I am working on a web application (frontend with forms, etc - Server - db). I am using AngularJS, NodeJS and MongoDB. The app is online, but I still don't offer a demo to users. I would offer them a username and password ("demo", "demo") or just the "Demo" button to access the demo. The public interface has a short presentation, contact form, etc.

There are many internal interfaces. Once the logged in user is authenticated, they are redirected to the interface according to their role. So I would suggest a button or a list of roles to choose from (interfaces depending on the user's role). The user selects the role he wants to see and opens the demo.

So how do you technically organize this demo? knowing that users connecting to the demo may not have the same data! should I create an empty database with the same structure as the "real" one and destroy it after the user logs out? In this case, how do you know if a user is offline? should i create a package that deletes the db at night? Or am I using the same bd, but with different users? but how to handle it on the frontend if i have a user: "demo", "demo" or button redirect to demo?

How are applications on the Internet?

+3


source to share


2 answers


You can create a separate database for your demo environment that gets reset every day. This demo environment might require a bit of extra code to automatically authenticate users or prevent a user from deleting a user account or whatever. You can start with spam problems, but I'll worry about that when it does. If this happens, perhaps use the trial version on the demo login page.



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

+1


source


One simple solution would be to generate a userId in the node code and navigate to the page as a variable. Then if the user is logged into your demo and that id doesn't exist in the db, start a new user.

Can use cookie or localStorage to track the user if they log in again



Then duplicate your db using a cron task from time to time

+1


source







All Articles