EU-focused metal calculator with:
- A Next.js web app for full weight/price workflows.
- A shared
@ferroscale/metal-corepackage for formulas, datasets, validation, and quick parser logic. - A Raycast extension for one-line quick weight calculations.
src/: main web app (Next.js App Router).packages/metal-core/: shared calculator and parser package.raycast-extension/: Raycast command implementation.
- Node.js 20+
- npm 10+
- For Raycast development: Raycast app (macOS) and
rayCLI available via npm scripts.
npm installnpm run devOpen:
http://localhost:3000(redirects by locale)http://localhost:3000/en(direct English route)
# Web tests
npm run test
# Shared core tests
npm run test:core
# Web + core tests
npm run test:all
# Web production build
npm run buildExtension sources are in raycast-extension/.
- Open
raycast-extension/package.json. - Set
"author"to your real Raycast handle.
# Start extension in development mode
npm run dev --workspace raycast-extension
# Build extension
npm run build --workspace raycast-extension
# Validate extension
npm run lint --workspace raycast-extensionManual profiles:
<alias> <dimensions>x<length> [flags]
EN standard profiles:
<alias> <size>x<length> [flags]
Examples:
shs 40x40x2x4500mmrhs 120x80x4x6000 qty=2ipe 200x6000 mat=s355chs 60.3x3.2x3000 dens=8000
Flags:
qty=<number>default1mat=<grade|alias>defaultsteel-s235jrdens=<kg/m3>optional custom density overrideunit=<mm|cm|m|in|ft>fallback unit when input has no inline unit
Main exports from @ferroscale/metal-core:
- Calculator engine:
calculateMetal,validateCalculationInput,resolveAreaMm2 - Quick APIs:
parseQuickQuery,calculateQuickWeight,calculateQuickFromQuery - Datasets: profile/material definitions and helpers
- Locale routing config:
src/i18n/routing.ts - Messages:
messages/en.json,messages/bs.json - Missing locale keys fallback to English.
Add a new language:
- Add
messages/<locale>.json. - Register locale in
src/i18n/routing.ts. - Translate keys.
- Run
npm run i18n:check.
NEXT_PUBLIC_SITE_URL: public base URL used by sitemap/robots metadata.
GET /api/healthGET /api/captchaPOST /api/contact
- If
ray lintreports invalid author, updateraycast-extension/package.jsonwith your Raycast username. - Root
npm run lintcurrently reports existing lint issues in the repository; use it as a baseline check, not a strict green gate. - If extension assets fail validation, verify
raycast-extension/assets/icon.pngexists and command icon paths match.
docs/PROJECT_TRACKER.mddocs/FEATURE_IMPROVEMENTS.md