You'll only need the following to get started:
MongoDB
We use the simplest most popular document database to store data, and yes, it'll be good enough for your needs.
Hosting
You can host it anywhere you want - we have a container image for you to use, a Kubernetes deployment template, or you can host it on Heroku, or you can host it on your own server. It's up to you.
1. Create a MongoDB database
The easiest way to start is to get a free database from MongoDB Atlas. They have a generous free tier which comes with 512MB of storage. And you can get one an overview of their managed services and get started here.
2. Deploy storywise
You can choose from a whole host of options to deploy storywise. Some easy options are:
not guaranteed free, since it entirely depends on how you use the free tiers of various cloud services.
Live demo:
https://demo.joinstorywise.com/admin
Github repository:
https://github.com/dotmethodme/storywise
Docker image:
https://hub.docker.com/r/mihainueleanu/storywise
Kubernetes deployment template:
/kubernetes/everything.yaml
Helm chart/charts
Docker-compose template:
/docker-compose.yaml
Name | Description |
---|---|
DATABASE_NAME required | The name of the database to be used (regardless of database type) |
MONGODB_URI | The connection string to your MongoDB database. |
POSTGRES_URL | The connection string to your Postgres database. |
TIMESCALEDB_URL | The connection string to your TimescaleDB database. |
LIBSQL_URL | The connection string to your Libsql database. |
STORYWISE_USERNAME required | The username you want to use to log in to the admin panel. |
STORYWISE_PASSWORD required | The password you want to use to log in to the admin panel. |
API_BASE_URL required | The base URL of your API. This is used to produce the right URLs for the tracking scripts. |
NODE_ENV | The environment you're running the app in. If the environment is local , the app will be able to preserve certain features such as Hot Module Reloading. |
ALLOWED_ORIGIN | The origin that browsers are allowed to send requests from. This is in effect used as a CORS policy for the API which receives user activity events. Default: * |
One of the simpler ways to deploy storywise is via docker-compose. This could be especially useful to try it out locally.
Start by cloning the repository:
git clone [email protected]:dotmethodme/storywise.git
cd storywise
Make sure to update the environment variables in the docker-compose file with new values relevant for your setup:
Then run:
docker-compose up
You can deploy Storywise on Kubernetes using the following helm chart:
helm repo add storywise https://dotmethodme.github.io/storywise
helm repo update
helm install my-storywise storywise/storywise \
--set host=example.joinstorywise.com \
--set configMapData.DATABASE_NAME=demo \
--set secretData.MONGODB_URI="mongodb://example.com:27017/" \
--set secretData.USERNAME=admin \
--set secretData.PASSWORD=mysecretpassword
You can deploy Storywise on Kubernetes using the following template: storywise/blob/main/kubernetes/everything.yaml
Start by cloning the repository:
git clone g[email protected]:dotmethodme/storywise.git
cd storywise/kubernetes
Make sure to update the ConfigMap and Secret with new values relevant for your setup:
Another thing to update is the ingress address: here you want to configure the domain name that you've already setup to point to your Kubernetes cluster.
Note: if you wish to deploy in a namespace other than default
, make sure to update that as well, everywhere in the yaml file
Once that's done, apply the yaml file:
kubectl apply -f everything.yaml
And that's all. The admin panel of Storywise is available at https://your.address.example.com/admin
, and you can login using the credentials you configured in the steps above (USERNAME, and PASSWORD).
Instructions to embed the analytics script into your website are available under the info tab inside the storywise admin (step above): https://your.address.example.com/admin
However, generally speaking the tracking script is available at the following address:
https://your.address.example.com/js/script.js
The project is going through active development, and obviously, as you might be able to judge by the questionable quality of this article, the documentation can also be improved.
If you enjoy Storywise, and would like to help, please consider giving back to the project and contributing to either the documentation, or the core project itself.
For any queries, please contact [email protected].
Thank you!
Storywise is built using the following very simple and accessible technologies:
For hosting, I prefer to use Kubernetes, but you can use whatever you want. I've also included a docker-compose file, and a deployment template for Kubernetes. And I welcome any contributions for other hosting options.