Put it online
Publish the dashboard on Vercel, on any server that runs Node.js, or as a Docker image.
Before you deploy
The sign-in that ships is a placeholder: the account is in the app's code and is checked in the browser, so anyone can read it and sign in. Connect the sign-in to your own API before real users or real data reach the dashboard.
Sign-inNothing has to be set to deploy: there is no database, no secret and no required variable.
- Replace the sample figures, cards and transactions with your own data, or with data from your API.
- Leave
NEXT_PUBLIC_DEMO_MODEoff, unless the deployment is a public demo.
Vercel
Put the folder in a private Git repository
Push the
dashboard-template-1folder to a private repository on GitHub, GitLab or Bitbucket. Your licence does not allow sharing the source code publicly. The download already has a.gitignorethat keeps outnode_modules, the build and your.envfiles.Import it in Vercel
In Vercel, add a new project from that repository. It detects Next.js; keep the default build settings.
Add the environment variables
Under the project's Environment Variables, add
ENABLE_EXPERIMENTAL_COREPACKwith the value1so Vercel installs with the Yarn version thatpackage.jsonpins. AddNEXT_PUBLIC_DEMO_MODEonly if you want demo mode.Deploy
Start the deployment, then add your domain in the project's Domains settings.
Expected result: Your domain with
/en/loginopens the sign-in page.
After you change a variable, deploy again: the running app keeps the values it was built with.
Any server with Node.js
On a server with Node.js 20.9 or newer, copy the folder, then install, build and start:
dashboard-template-1corepack enable
yarn install
yarn build
yarn startThe dashboard answers on port 3030. Put a web server such as Nginx or Caddy in front of it for your domain and HTTPS, and keep yarn start running with a process manager or a system service.
Hosts that choose the port
yarn start always listens on 3030, even when the host sets a PORT variable. On a host that gives you a port, make the start command yarn start -p $PORT.
A Docker image
The Dockerfile builds a small image that serves the dashboard with Node.js on port 3030, as a user without admin rights. Build it, then run it in the background so it restarts with the server:
dashboard-template-1docker build -t financial-dashboard .
docker run -d --restart unless-stopped -p 3030:3030 financial-dashboardAny host that runs a Dockerfile can build it as it is. Put a web server in front of port 3030 for your domain and HTTPS, as for Node.js.
After it is online
- Open your address with
/en/loginand/ar/loginand check both languages. - Every page tells search engines not to index it, because a signed-in dashboard does not belong in search results. The setting is
robotsinsrc/app/[locale]/layout.tsx.