
Show HN: Dashboard – self-hosted accounts, orgs and subscriptions for web apps - benologist
https://github.com/userdashboard/dashboard
======
jitl
Why did you name this “Dashboard”? Very confusing since “dashboard” is such a
generic and well-used term in software engineering.

~~~
darekkay
I'm also working on a project called "Dashboard" [1]. But I agree - while the
name fits perfectly, it's way to generic to find it anywhere.

[1]
[https://github.com/darekkay/dashboard](https://github.com/darekkay/dashboard)

------
jmoore53
Project looks awesome, but I was a little confused. Is this a centralized user
management with payments proxy to many application backends?

[https://userdashboard.github.io/home](https://userdashboard.github.io/home)

The home page did a really good job explaining with images, but wanted to
confirm.

~~~
benologist
This is implemented now, you can add a "before" request handler [1] and
inspect the HOST header to check the domain and switch to an alternative
configuration for that request. Dashboard compiles a global.packageJSON [2]
holding your template, title, menu links etc and you can override that per-
request by setting an alternative req.packageJSON for more individualized site
settings too. Each of your application servers can serve a '/public/template-
additional.css' and '/public/content-additional.css' to override the
appearance as well.

    
    
        module.exports = {
            before: async (req) => {
                switch (req.host) {
                    case 'domain1.com':
                        req.dashboardServer = 'domain1.com'
                        req.applicationServer = 'http://localhost:7000'
                        req.applicationServerToken = 'shared secret'
                        break
                }
            }
        } 
    

This will work with per-site user accounts because the data was already
partitioned by the dashboard server address. I think for sharing accounts
across multiple websites you could just omit changing the req.dashboardServer.

[1] [https://userdashboard.github.io/request-
handlers](https://userdashboard.github.io/request-handlers)

[2] [https://userdashboard.github.io/package-
json](https://userdashboard.github.io/package-json)

------
CGamesPlay
This is pretty interesting. Is there any prior art for things like this? User
management that integrates with a specific target application, I mean, rather
than say a generic SSO solution.

