MeasureTent is a config-driven tent size calculator and event layout platform for rental companies, planners, and integrators. It combines a pure TypeScript calculation engine, a Fastify API, shared Zod contracts, and a React frontend.
MeasureTent calculates tent dimensions, seating tables/chairs, and add-on space requirements from a single request:
- Input: guest count, seating style, tent type, add-ons
- Output: required square footage, recommended tent size, geometry, table/chair counts
Primary endpoint:
POST /v1/calculate
See QUICKSTART.md for local setup in under 5 minutes.
- Node.js 20+
- pnpm 9+
- Git
git clone https://github.com/248Tech/MeasureTent.git
cd MeasureTentpnpm installThis installs all workspace dependencies, including:
- Root/tooling:
typescript,tsx,@types/node,prisma,@prisma/client - API:
fastify,@fastify/swagger,@fastify/swagger-ui,@fastify/sensible - Shared validation:
zod - Web:
react,react-dom,@tanstack/react-query,vite,tailwindcss,postcss,autoprefixer
The API works with defaults out of the box. Optional environment variables:
PORT(default:3001)HOST(default:0.0.0.0)TENT_CONFIG_DIR(directory for tenant override JSON files)
Example local override (bash):
export PORT=3001
export HOST=0.0.0.0For Prisma commands, set DATABASE_URL (see .env.example) and run:
pnpm prisma:generatepnpm dev:apiAPI endpoints:
http://localhost:3001/healthhttp://localhost:3001/docshttp://localhost:3001/v1/calculate
Open another terminal:
pnpm dev:webWeb app:
http://localhost:5173
The web dev server proxies /v1/* to http://localhost:3001.
curl -X POST http://localhost:3001/v1/calculate \
-H "Content-Type: application/json" \
-d '{
"guestCount": 120,
"seatingStyle": "banquet",
"tentType": "pole",
"addOns": ["stage", "bar"]
}'Expected response fields:
requiredSqFtrecommendedTentSizetableschairsgeometry
pnpm typecheck
pnpm buildTo typecheck, build, and package all publishable workspace packages into ./artifacts:
pnpm package:allPackaged tarballs include:
@measurtent/shared@measurtent/config@measurtent/engine@measurtent/api@measurtent/sdk
- Monorepo (
pnpmworkspace) - Strict TypeScript across packages
- Config-driven calculation rules (JSON today, DB-ready interface)
- Shared runtime validation via Zod
- Fastify API + Swagger docs
- React + Tailwind + React Query frontend scaffold
packages/engine- Pure TypeScript calculator (framework-agnostic)packages/config- Config provider layer + defaultspackages/shared- Schemas and shared domain typespackages/api- Fastify routes/plugins/serverapps/web- Vite React client
GET /health->{ "status": "ok" }POST /v1/calculate->CalculationResult- Docs available at
/docs
MeasureTent is optimized around discovery terms like:
- tent size calculator
- event rental calculator
- wedding tent calculator
- party seating calculator
- Fastify TypeScript API for event planning
Current release: v0.0.1
See CHANGELOG.md for release notes.
MeasureTent is designed to be merged into, or mounted alongside, Badshuffle in a phased approach:
- Phase A - API Contract Stability
- Keep
/v1/calculatestable and versioned.
- Keep
- Phase B - Shared Auth/Tenant Context
- Align JWT claims and tenant isolation with Badshuffle middleware.
- Phase C - UI Embedding
- Embed calculator UI in Badshuffle dashboards as a feature module.
- Phase D - Unified Project Storage
- Merge project/snapshot persistence into Badshuffle data models.
Detailed execution plan: docs/BADSHUFFLE_INTEGRATION_PLAN.md
MIT - see LICENSE