Skip to content

feat: add Next.js 16 frontend for Secure App#2

Merged
vercel[bot] merged 2 commits intomainfrom
v0/xitaisong109-4278-b243b2f5
Feb 10, 2026
Merged

feat: add Next.js 16 frontend for Secure App#2
vercel[bot] merged 2 commits intomainfrom
v0/xitaisong109-4278-b243b2f5

Conversation

@SX110903
Copy link
Owner

This PR introduces a Next.js 16 frontend for the Secure App and resolves environment-specific integration issues.

Problem/Issue/Goal:

  • Need for a modern, secure frontend framework to replace or augment the existing interface
  • Integration conflicts between the Next.js directory structure and the existing PHP project environment

Fix/Solution:

  • Implemented a new frontend architecture using Next.js 16
  • Resolved directory discovery issues to ensure compatibility within the PHP project structure

Chat link: https://v0.app/chat/G0fL0JaJ1cf

v0 bot and others added 2 commits February 10, 2026 19:25
Co-authored-by: SX1109 <109422266+SX110903@users.noreply.github.com>
Update Next.js config format and touch app files for re-detection.

Co-authored-by: SX1109 <109422266+SX110903@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 10, 2026 19:28
@vercel
Copy link
Contributor

vercel bot commented Feb 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
php-project-web Error Error Feb 10, 2026 7:28pm

@vercel vercel bot merged commit 23364f2 into main Feb 10, 2026
1 of 2 checks passed
@vercel vercel bot deleted the v0/xitaisong109-4278-b243b2f5 branch February 10, 2026 19:28
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a Next.js 16 frontend configuration to the Secure App repo and introduces a small diagnostics script intended to help debug directory discovery/integration issues when colocated with the existing PHP project.

Changes:

  • Added a Node diagnostics script to print cwd and directory contents for troubleshooting.
  • Updated next.config.ts to use TypeScript typing (NextConfig) instead of JSDoc typing.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
scripts/check-dirs.mjs New diagnostics script that inspects working directory and app/ presence/contents.
next.config.ts Converts config typing to TypeScript import/type annotation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +5 to +12
console.log("[v0] Current working directory:", cwd);
console.log("[v0] app dir exists:", existsSync(resolve(cwd, 'app')));
console.log("[v0] app is directory:", existsSync(resolve(cwd, 'app')) && statSync(resolve(cwd, 'app')).isDirectory());

if (existsSync(resolve(cwd, 'app'))) {
console.log("[v0] app dir contents:", readdirSync(resolve(cwd, 'app')));
}

Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

statSync() can throw (e.g., permission issues or a race where the path disappears between existsSync and statSync). Consider storing the resolved path once and wrapping the statSync call in a try/catch (or use a single try { ... } block) so this diagnostic script doesn’t fail unexpectedly.

Suggested change
console.log("[v0] Current working directory:", cwd);
console.log("[v0] app dir exists:", existsSync(resolve(cwd, 'app')));
console.log("[v0] app is directory:", existsSync(resolve(cwd, 'app')) && statSync(resolve(cwd, 'app')).isDirectory());
if (existsSync(resolve(cwd, 'app'))) {
console.log("[v0] app dir contents:", readdirSync(resolve(cwd, 'app')));
}
const appDir = resolve(cwd, 'app');
const appDirExists = existsSync(appDir);
console.log("[v0] Current working directory:", cwd);
console.log("[v0] app dir exists:", appDirExists);
let appIsDirectory = false;
if (appDirExists) {
try {
appIsDirectory = statSync(appDir).isDirectory();
} catch (err) {
console.error("[v0] Error checking if app is directory:", err);
}
}
console.log("[v0] app is directory:", appIsDirectory);
if (appDirExists) {
console.log("[v0] app dir contents:", readdirSync(appDir));
}

Copilot uses AI. Check for mistakes.
Comment on lines +9 to +13
if (existsSync(resolve(cwd, 'app'))) {
console.log("[v0] app dir contents:", readdirSync(resolve(cwd, 'app')));
}

console.log("[v0] Root dir contents:", readdirSync(cwd).filter(f => !f.startsWith('.')));
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

readdirSync() can throw (missing permissions, transient filesystem issues). Since this appears to be a diagnostics script, it would be more robust to catch and log errors instead of crashing, especially if it’s ever run in CI.

Copilot uses AI. Check for mistakes.
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.

2 participants