Scaffoldrite

Project Configuration


Scaffoldrite uses a project configuration file to store metadata about your project.
This helps your team understand frameworks, language choices, conventions, and architectural decisions.


1. The project.json File

When you run:

sr init

Scaffoldrite creates:

.scaffoldrite/project.json

This file contains:

{
  "framework": "",
  "language": "",
  "version": "1.0.0",
  "author": "",
  "conventions": {
    "description": "",
    "folderStructure": [],
    "namingRules": [],
    "folderDepthLimits": [],
    "userNotes": []
  },
  "additionalInfo": {
    "stateManagement": "",
    "styling": "",
    "testing": "",
    "routing": "",
    "apiClient": ""
  }
}

2. Fields Explained

Basic Metadata

FieldDescriptionExample
frameworkMain framework used"React"
languageProgramming language"TypeScript"
versionProject version"1.0.0"
authorProject author or team"Isaac Anasonye"

Conventions

FieldDescriptionExample
descriptionShort summary of project structure"Monorepo with shared components"
folderStructureKey folders used["src", "components", "utils"]
namingRulesNaming conventions["PascalCase for components", "camelCase for utils"]
folderDepthLimitsMax depth rules per folder[{"src": 4}]
userNotesAny team notes about structure["API folder contains REST endpoints"]

Additional Info

FieldDescriptionExample
stateManagementState library or approach"Redux Toolkit"
stylingCSS or styling approach"Tailwind CSS"
testingTest framework"Jest + React Testing Library"
routingRouting approach"Next.js file-based routing"
apiClientAPI client used"Axios"

3. Benefits

  • Document your architecture: Everyone on the team knows the tech stack and conventions.
  • Consistency: Reduces confusion on naming, folder depth, and file organization.
  • Integration with Scaffoldrite: Helps Scaffoldrite generate and validate structure according to project-specific rules.

4. Example Usage

{
  "framework": "React",
  "language": "TypeScript",
  "version": "2.1.0",
  "author": "Team Scaffold",
  "conventions": {
    "description": "React monorepo with shared components and utils",
    "folderStructure": ["src", "components", "hooks", "utils"],
    "namingRules": ["PascalCase for components", "camelCase for hooks"],
    "folderDepthLimits": [{"src": 4}],
    "userNotes": ["All API calls in src/api", "Tests under src/__tests__"]
  },
  "additionalInfo": {
    "stateManagement": "Redux Toolkit",
    "styling": "Tailwind CSS",
    "testing": "Jest + RTL",
    "routing": "React Router",
    "apiClient": "Axios"
  }
}

Teams can edit project.json anytime to update conventions or document new decisions. Scaffoldrite reads this during generate and validate to ensure the project follows defined standards.


Next up: Filesystem & Content Handling

On this page