Skip to content

Separate package.json files for Frontend and Backend #45

@addynoven

Description

@addynoven

Overview

Currently, our project is set up with a single package.json file managing dependencies for both the frontend and backend. This setup can cause unnecessary complexity when managing dependencies that are only needed on one side of the stack (e.g., frontend-specific or backend-specific packages).

Action Items

  • Create a separate package.json for the frontend.
  • Create a separate package.json for the backend.
  • Update npm scripts and configurations accordingly.
  • Ensure compatibility with the existing MERN stack setup.

Instructions

  1. Create a package.json file for the frontend, including all frontend-related dependencies (e.g., React, Vite).
  2. Create a package.json file for the backend, including backend-related dependencies (e.g., Express, Mongoose).
  3. Adjust project folder structure if necessary to support separate package files.
  4. Test that both frontend and backend run correctly with their individual package.json configurations.

Checks

  • Frontend dependencies are isolated in their own package.json.
  • Backend dependencies are isolated in their own package.json.
  • Scripts for starting both frontend and backend work as expected.

Additional Information

I’m attaching a screenshot of the current package.json file, including the current dependencies and devDependencies, for reference.

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions