feat(config-doctor): add Config Doctor - multi-platform .env converter with AI security analysis #139
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
feat: Add Config Doctor - .env to Deployment Config Converter with AI Security Analysis
Summary
This PR introduces Config Doctor, a new utility that converts
.envfiles to platform-specific deployment configurations (Netlify, Vercel, Cloudflare Pages) with built-in security analysis and AI-powered explanations.Screen.Recording.2026-01-24.at.16.00.38.mov
Key highlights:
.envfileDemo
Paste your
.envfile → Select platform → Get converted config + security warningsArchitecture
flowchart TB subgraph ui [User Interface] Input[".env Input"] Platform["Platform Selector"] Output["Config Output"] Warnings["Security Panel"] end subgraph utils [Core Logic] Parser["parseEnvFile()"] Analyzer["analyzeSecurityRisks()"] Converters["Platform Converters"] end subgraph ai [AI Layer - Optional] WebLLM["WebLLM Engine"] Prompts["Security Prompts"] end Input --> Parser Parser --> Analyzer Parser --> Converters Platform --> Converters Analyzer --> Warnings Warnings -.->|"User clicks 'Explain'"| WebLLM WebLLM -.-> Warnings Converters --> OutputFeatures
1. Multi-Platform Support
netlify.toml[context.production.environment]vercel.json@secret-namereference syntaxwrangler.toml[vars], secrets via CLI instructions2. Security Pattern Detection
Recognizes and flags:
*_API_KEY,*_SECRET,OPENAI_*,STRIPE_*AWS_*,AZURE_*,GCP_*,GOOGLE_*DATABASE_URL,MONGODB_*,REDIS_*,POSTGRES_*JWT_SECRET,*_TOKEN,SESSION_SECRETNEXT_PUBLIC_*,VITE_*,REACT_APP_*(marked safe)3. AI-Powered Security Explanations
Files Changed
New Files
pages/utilities/config-doctor.tsxcomponents/utils/config-doctor.utils.tscomponents/utils/config-doctor.utils.test.tscomponents/config-doctor/PlatformSelector.tsxcomponents/config-doctor/SecurityWarnings.tsxcomponents/config-doctor/AIExplainer.tsxcomponents/seo/ConfigDoctorSEO.tsxModified Files
components/utils/tools-list.tsREADME.mdpackage.json@mlc-ai/web-llmdependencyTechnical Decisions
Why WebLLM?
Why these platforms?
Netlify, Vercel, and Cloudflare Pages are the most popular deployment targets for modern web apps, and each has different config formats that developers frequently need to convert.
Testing
Unit Tests
Covers:
.envparsing (comments, quotes, multiline, edge cases)Manual Testing Checklist
.envfiles and verify parsingScreenshots
[Add screenshots after running locally]
Related
Checklist
npm run lint)npm run format)Note: This is my first contribution to jam-dev-utilities. I'm excited about what Jam is building for developer debugging workflows and wanted to contribute a tool that combines practical utility with AI capabilities. Happy to iterate based on feedback!