Skip to content

Add Next.js web dashboard foundation - #44

Merged
egrexsec merged 4 commits into
mainfrom
feature/web-dashboard
May 29, 2026
Merged

egrexsec merged 4 commits into
mainfrom
feature/web-dashboard

Conversation

@egrexsec

Copy link
Copy Markdown
Owner

Summary

Implements a modern Next.js dashboard foundation for DetLab.

Changes

  • Added Next.js frontend structure
  • Added dashboard homepage
  • Added API connectivity foundation
  • Added Docker Compose stack
  • Added frontend documentation
  • Added platform visualization groundwork

Example

docker compose up --build

@egrexsec
egrexsec merged commit ac13d97 into main May 29, 2026
1 check failed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 07404f5b69

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docker-compose.yml
services:
api:
build: .
command: uvicorn detlab.api:app --host 0.0.0.0 --port 8000

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Run uvicorn outside the CLI entrypoint

When the documented Docker Compose stack is used, this service builds the existing root Dockerfile, whose ENTRYPOINT is ['detlab'] and whose install step does not include requirements-api.txt. The Compose command is therefore passed as arguments to the detlab CLI instead of replacing the entrypoint, so the API container starts as detlab uvicorn ... and exits before /health is available. Use an API-specific image/install path and override entrypoint (or change the Dockerfile entrypoint) before relying on this stack.

Useful? React with 👍 / 👎.

Comment thread docker-compose.yml
- '8000:8000'

web:
build: ./web

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Add a Dockerfile for the web build context

With the documented docker compose up --build flow, build: ./web makes web/ the build context and Compose expects a Dockerfile there unless one is specified. I checked the new web tree and it only contains package.json and app/page.tsx, so the web service build fails before the dashboard can start. Add web/Dockerfile, point dockerfile: at an existing file, or use a prebuilt image.

Useful? React with 👍 / 👎.

Comment thread web/app/page.tsx
@@ -0,0 +1,39 @@
async function getHealth() {
try {
const response = await fetch('http://localhost:8000/health', {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Point the server-side fetch at the Compose service

In the Compose deployment, this page is rendered on the Next.js server inside the web container, so localhost:8000 refers to the web container rather than the api service. Once the containers build, the dashboard will still report the API as offline under the documented Docker Compose stack even while the API container is healthy. Use the Compose service name such as http://api:8000 or an environment-configured base URL for server-side fetches.

Useful? React with 👍 / 👎.

Comment thread web/app/page.tsx
}
}

export default async function HomePage() {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Provide the required App Router root layout

This adds an App Router page under web/app, but the app has no web/app/layout.tsx. Next.js 14 requires a root layout in the app directory that defines the document shell, so npm run dev/npm run build for the new dashboard fails before serving this page. Add a minimal root layout with <html> and <body> around children.

Useful? React with 👍 / 👎.

@egrexsec
egrexsec deleted the feature/web-dashboard branch June 16, 2026 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant