milesmcc / shynet

Modern, privacy-friendly, and detailed web analytics that works without cookies or JS.
Apache License 2.0
2.9k stars 185 forks source link

Progressive web app #209

Closed haaavk closed 2 years ago

haaavk commented 2 years ago

I created PWA for shynet which displays dashboard overview. You can get it from https://napcode.gitlab.io/shypwa/. Unfortunately api isn't merged yet but You can pull shynet image with api from ghcr.io/haaavk/shynet:latest. Shynet personal API token is placed in 'Security' tab.

kringo commented 2 years ago

@haaavk Great work on the product, API and PWA app, a couple of questions:

  1. The api used in pwa returns stats, is there also api for creating user, service & token so that when a new external dashboard is built (by us) its safe that ppl can't access others service?
  2. Looks like this was done in May, when are we expecting to merge this in to the master?

thanks in advance

haaavk commented 2 years ago
  1. This is first attempt to API. Right now you can only get stats. If it's what community wants I can add full API but It's not my decision. People can access only their own services or services they are collaborating.
        services = Service.objects.filter(
            Q(owner=request.user) | Q(collaborators__in=[request.user])
        ).distinct()
  2. I hope any time soon.
milesmcc commented 2 years ago

The API is very close to being merged :)

kringo commented 2 years ago

Thanks @haaavk @milesmcc Looking forward to the API 🙏

kringo commented 1 year ago

Hi @haaavk @milesmcc,

Followed instructions "Basic Installation with Docker Compose " from https://github.com/milesmcc/shynet/blob/master/GUIDE.md#installation, cloned the latest repo and docker compose'd, after running it I still see version 0.12.0 and NO API plus don't see the screen for API Token.

Wondering how can i get to the latest build with API and API token configuration?

Documentation here says API is available, may be i'm missing something?

Appreciate your help,

Thanks.

haaavk commented 1 year ago

I believe docker pull milesmcc/shynet:edge is the fastest way to get recent changes.

kringo commented 1 year ago

Thank you @haaavk, I wasn't aware of that image, i'll try and get back, thanks.

kringo commented 1 year ago

Hi @haaavk, as advised pulled this image milesmcc/shynet:edge and found the api token under the Security menu, tried the dashboard api and it was returning results, nice work!

Follow up question, Is there an API to create a service?

The idea is, if there is a API to create/update a service along with the dashboard api, we should be able to create a service/site and pull analytics data from external application, thoughts?

Our use case is to create a service per domain and report data per domain.

haaavk commented 1 year ago

Right now there is no API to create/update a service. I have plans to add full API this year but I don't know when exactly it will happen.

Creating service per domain is possible right now but pulling analytics data from external app may be impossible.

I really want to use shynet not only for web but also for apps and games. The key for that are custom events but they aren't implemented yet. It will probably take a while to add both API and custom events.

kringo commented 1 year ago

Thanks for your quick and honest response @haaavk, appreciate it.

We like the simplicity of the shynet app, wish there was an easy way via API to create user, service and later pull analytics data (only api that exists) we could have integrated into a marketplace product right away.

May be we'll revisit when the above api's are ready, right now we're thinking of integrating with OWA for now since it offers all the above 3 api's.

If anything changes please let me know but we're in a time crunch.

All the best.