A modern, customizable and modular dashboard built with Next.js, deployable in one click using Docker or Ansible.
- Modular interface — Add, move, resize and configure your "boxes" (widgets) directly from the backoffice.
- Drag & Drop & Resize — Reorganize your dashboard with your mouse.
- Dynamic props — Add custom properties to each box for tailored displays.
- React components & HTML support — Use your own React components or HTML tags as box content.
- NASA APOD integration — Show NASA's Astronomy Picture of the Day.
- Iframe & video support — Embed external or multimedia content easily.
- Real-time synchronization — Backoffice updates are immediately visible on the front via Server-Sent Events (SSE).
- Automated deployment — Docker & Ansible for simple setup and updates.
- Microsoft Entra ID authentication — Integrated authentication using Microsoft Entra ID (formerly Azure AD).
docker run -d yourdockerhubusername/yourimagename:latest
Then open: http://localhost:3000
git clone https://github.com/Jch4ipas/DashboardNextjsDockerAnsible.git
cd DashboardNextjsDockerAnsible/nextjs
npm install
npm run dev
App will be available at http://localhost:3000
- Edit
inventory/prod.ymlto add your server address. - Run the playbook:
./dashboardsible
Replace
yourdockerhubusername/yourimagenamewith the image name/tag you want.
docker buildx build --no-cache --platform linux/amd64 -f Docker/Dockerfile -t yourdockerhubusername/yourimagename:latest --load nextjs/
docker buildx build --no-cache --platform linux/amd64,linux/arm64,linux/arm/v7 -f Docker/Dockerfile -t yourdockerhubusername/yourimagename:latest --push nextjs/
- These commands must be run from the root of the repository.
- The Dockerfile used is
Docker/Dockerfileand the build context is thenextjs/directory. - Change the image tag to whatever you prefer (Docker Hub, GitHub Container Registry, etc.).
Create a .env file in the nextjs/ directory and set the following variables:
# NASA API
NASA_API_KEY= # Your NASA API Key
# EWS (Exchange Web Services) credentials
AUTH_EWS_CREDENTIALS_USERNAME= # EWS credentials username
AUTH_EWS_CREDENTIALS_PASSWORD= # EWS credentials password
AUTH_EWS_SERVICE_ENDPOINT= # EWS service endpoint
# General auth
AUTH_SECRET= # Application auth secret (random string)
# Microsoft Entra ID (Azure AD)
AUTH_MICROSOFT_ENTRA_ID_ID= # Entra (Client) ID
AUTH_MICROSOFT_ENTRA_ID_SECRET= # Entra (Client) Secret
AUTH_MICROSOFT_ENTRA_ID_ISSUER= # Issuer / Tenant ID or issuer URL
These variables are required for API integrations and authentication. Ensure the .env file is never committed to public repositories.
- Go to the Azure Portal → Azure Active Directory (Entra) → App registrations → New registration.
- Set a name, and add a Redirect URI pointing to your app callback, for example:
(or
https://your-domain.example.com/api/auth/callbackhttp://localhost:3000/api/auth/callbackfor local dev) - Note your Client (Application) ID and Directory (Tenant) ID. Create a Client secret and copy it.
- Configure the required scopes (typically
openid,profile,email) and any additional API permissions you need. - Populate your
.envwithAUTH_MICROSOFT_ENTRA_ID_ID,AUTH_MICROSOFT_ENTRA_ID_SECRET, andAUTH_MICROSOFT_ENTRA_ID_ISSUER(tenant or issuer URL). - Ensure your Next.js auth handler (or library) is configured to use the OAuth2 Authorization Code flow with PKCE for secure production use.
/nextjs → Dashboard source code (Front & Backoffice)
/Ansible → Configs for automated deployment
/Docker → Dockerfiles & compose (note: Dockerfile referenced at Docker/Dockerfile)
Visit /admin to:
- Create / delete / edit containers (dashboards)
- Add, move, resize and configure boxes
- Choose content type (React component, HTML, iframe, etc.)
- Add custom props for each box
- The dashboard updates in real-time based on the backoffice configuration
- Dashboards can auto-rotate according to the
durationDisplaysetting
Find other projects on GitHub.
Pull requests and suggestions are welcome! Open an issue for questions or improvements.
This project is released under the BoardFSDash Internal Non-Commercial License v1.0 — see license.md for details.