PowerShell Scripts
This directory contains PowerShell scripts used by the setup-gui app to help set up and run projects in the FoodTruckNerds workspace. These scripts are typically used for projects like ftn-site-vercel and other workspace projects that the setup-gui app helps bootstrap.
setup.ps1 — Initial Setup
Sets up the development environment for the project.
Usage:
.\setup.ps1 [options]
Options:
-
-SkipNodeCheck— Skip Node.js version check -
-SkipCorepack— Skip Corepack setup -
-SkipDependencies— Skip dependency installation -
-SkipConvex— Skip Convex setup instructions -
-CreateEnvFiles— Create template environment files
What it does:
-
Checks Node.js version (requires 22+)
-
Enables Corepack
-
Installs pnpm via Corepack
-
Installs project dependencies
-
Provides Convex setup instructions
-
Optionally creates template environment files
run.ps1 — Development Server
Starts the development server and handles various tasks.
Usage:
.\run.ps1 [options]
Options:
-
-Build— Build the project for production -
-Production— Start the production server -
-Lint— Run ESLint -
-Format— Format code with Prettier -
-Help— Show help message
Examples:
.\run.ps1 # Start development server
.\run.ps1 -Build # Build for production
.\run.ps1 -Production # Start production server
.\run.ps1 -Lint # Run linting
.\run.ps1 -Format # Format code
Quick Start
-
First time setup:
.\setup.ps1 -CreateEnvFiles
-
Configure environment variables:
-
Edit
.env.localwith your API keys -
See the docs for required services
-
-
Start Convex dev server (in separate terminal):
npx convex dev
-
Start the Next.js development server:
.\run.ps1
-
Open your browser at
http://localhost:3000
Required Services
Before running the app, you’ll need accounts for:
-
Square Developer — https://developer.squareup.com/us/en
-
Radar SDK — https://docs.radar.com/sdk
-
Convex — https://convex.dev
Troubleshooting
Execution policy:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Node.js version:
node --version
Corepack issues: try running PowerShell as Administrator.
Missing dependencies:
.\setup.ps1 -SkipNodeCheck -SkipCorepack
Environment variables to configure in .env.local:
-
Radar SDK keys
-
Convex deployment URL
-
Square API credentials
-
NextAuth secret
-
Encryption key
Notes
-
These scripts are helper scripts used by the setup-gui app when setting up workspace projects
-
Scripts are designed to be run from project directories (e.g.,
ftn-site-vercel) -
Keep the Convex dev server running while developing (for projects that use Convex)
-
The development server uses Turbopack (for Next.js projects)
-
All scripts include error checking and helpful messages