Skip to content

Conversation

@aspects19
Copy link

This pull request adds initial support for the PERN stack (Postgres, Express, React, Node.js) to the project, including both JavaScript client and server templates. The changes introduce new template files, configuration, and scripts for quickly scaffolding a PERN application, and update the stack selection logic to include PERN as an option. Additionally, development dependencies are updated for improved Node.js type support.

PERN Stack Integration

  • Added PERN as a selectable stack option in the interactive stack selection prompt in index.js, enabling users to generate a Postgres + Express + React + Node.js project.
  • Introduced a new JavaScript client template for PERN, including React + Vite setup, ESLint configuration, example code (src/App.jsx), and documentation. [[1]]

Development Environment Improvements

  • Updated root package.json to include @types/node in devDependencies for improved Node.js type support during development.

Copilot AI review requested due to automatic review settings October 4, 2025 19:16
Copy link
Contributor

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

This pull request adds comprehensive PERN stack support to enable users to quickly scaffold Postgres + Express + React + Node.js applications. The implementation includes complete template files for both JavaScript and TypeScript variants along with proper project setup and configuration.

  • Added PERN as a selectable stack option in the interactive CLI prompt
  • Created comprehensive templates for both JavaScript and TypeScript PERN stacks including client/server structure
  • Updated template manager to handle PERN stack file copying with fallback to MERN client templates when needed

Reviewed Changes

Copilot reviewed 36 out of 47 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
index.js Added PERN option to the stack selection prompt
utils/templateManager.js Added PERN stack template copying logic with MERN fallback for client
utils/project.js Added PERN-specific development server instructions and Postgres configuration notes
templates/pern/typescript/* Complete TypeScript PERN stack templates including client and server configurations
templates/pern/javascript/* Complete JavaScript PERN stack templates including client and server configurations
package.json Added Node.js type definitions for improved development support
Files not reviewed (1)
  • templates/pern/javascript/client/package-lock.json: Language not supported

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

app.listen(port, () => console.log(`Server running without DB on port ${port}`));
} else {
const client = new Client({
user: env.process.env.PG_USER,
Copy link

Copilot AI Oct 4, 2025

Choose a reason for hiding this comment

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

Incorrect variable reference - should be process.env.PG_USER instead of env.process.env.PG_USER.

Suggested change
user: env.process.env.PG_USER,
user: process.env.PG_USER,

Copilot uses AI. Check for mistakes.
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
import tseslint from 'typescript-eslint'
import { globalIgnores } from 'eslint/config'
Copy link

Copilot AI Oct 4, 2025

Choose a reason for hiding this comment

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

The import path 'eslint/config' is incorrect. The globalIgnores function should be imported from 'typescript-eslint' or defined locally.

Suggested change
import { globalIgnores } from 'eslint/config'
import { globalIgnores } from 'typescript-eslint'

Copilot uses AI. Check for mistakes.
Comment on lines +5 to +29
import { defineConfig, globalIgnores } from 'eslint/config'

export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{js,jsx}'],
extends: [
js.configs.recommended,
reactHooks.configs['recommended-latest'],
reactRefresh.configs.vite,
],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
parserOptions: {
ecmaVersion: 'latest',
ecmaFeatures: { jsx: true },
sourceType: 'module',
},
},
rules: {
'no-unused-vars': ['error', { varsIgnorePattern: '^[A-Z_]' }],
},
},
])
Copy link

Copilot AI Oct 4, 2025

Choose a reason for hiding this comment

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

The import path 'eslint/config' is incorrect. ESLint does not export these functions from this path. Consider using the standard configuration approach without these imports.

Suggested change
import { defineConfig, globalIgnores } from 'eslint/config'
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{js,jsx}'],
extends: [
js.configs.recommended,
reactHooks.configs['recommended-latest'],
reactRefresh.configs.vite,
],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
parserOptions: {
ecmaVersion: 'latest',
ecmaFeatures: { jsx: true },
sourceType: 'module',
},
},
rules: {
'no-unused-vars': ['error', { varsIgnorePattern: '^[A-Z_]' }],
},
},
])
export default {
ignorePatterns: ['dist'],
overrides: [
{
files: ['**/*.{js,jsx}'],
extends: [
js.configs.recommended,
reactHooks.configs['recommended-latest'],
reactRefresh.configs.vite,
],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
parserOptions: {
ecmaVersion: 'latest',
ecmaFeatures: { jsx: true },
sourceType: 'module',
},
},
rules: {
'no-unused-vars': ['error', { varsIgnorePattern: '^[A-Z_]' }],
},
},
],
};

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.

1 participant