overengineeringstudio / overengineeringstudio/effect-utils

feat: vercelJson genie generator

Open
#172 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type:agent-tooling
Dominant language
TypeScript
Stars
82
Forks
2
Avg merge
1d 8h
Merged PRs (30d)
121

Description

Summary

Provide a vercelJson() genie helper in effect-utils that generates vercel.json with the correct megarepo-aware installCommand baked in.

Motivation

Consumer repos currently maintain vercel.json files manually with a boilerplate installCommand pattern:

{
  "installCommand": "cd ../.. && bash scripts/vercel-install.sh && cd - && pnpm install --no-frozen-lockfile"
}

This pattern is the same across all packages that deploy to Vercel and could be generated.

Proposed API

// packages/app/vercel.json.genie.ts
import { vercelJson } from '../../repos/effect-utils/genie/external.ts'

export default vercelJson({
  framework: 'nextjs',
  buildCommand: 'pnpm build',
  outputDirectory: '.next',
})

The generator would:

  • Auto-generate the installCommand with the cd ../.. / cd - dance relative to the package location
  • Accept standard Vercel config fields (framework, buildCommand, outputDirectory, rewrites, etc.) as passthrough
  • Reference the consumer's install script (e.g. scripts/vercel-install.sh) in the generated command

Optional: install script generator

A megarepoInstallScript() genie helper that generates the CI install script from megarepo.lock:

// scripts/vercel-install.sh.genie.ts
import { megarepoInstallScript } from '../repos/effect-utils/genie/external.ts'
export default megarepoInstallScript()

This might be better kept in user land since:

  • The script is simple and stable (rarely changes)
  • Each repo may have specific cloning needs or extra setup steps
  • Keeping it in the consumer gives more flexibility without much maintenance cost

Context

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the existing genie helpers in repos/effect-utils/genie/external.ts and the proposed packages/app/vercel.json.genie.ts usage. Compare the requested Vercel passthrough fields and installCommand path behavior with the CI deployment pattern documented in pull request 170. Done means a vercelJson() helper can generate the megarepo-aware vercel.json configuration; assess the optional scripts/vercel-install.sh.genie.ts separately.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
devops
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.