Install project dependencies:
npm installCreate a local environment file by copying the example:
cp .env.local.example .env.localStart the application in development mode:
npm run devUseful for viewing and debugging UI components:
# Start Storybook with documentation only
npm run sb:dev:docs
# Start Storybook with documentation and stories
npm run sb:dev
# Build Storybook for deployment
npm run sb:build
# Preview the built Storybook app
npm run sb:previewRun linting checks to maintain code quality:
# Show style errors and warnings
npm run lint
# Automatically fix style issues
npm run lint:fix
# Run linter in CI mode (fails on warnings and errors)
npm run lint:ciRun automated unit tests:
npm run test:unitPrepare the app for production:
# Create the production environment file
cp .env.example .env
# Replace environment placeholders with actual values
sed -i "s|{{DOMAIN}}|$FE_URL|g" .env # Set VITE_DOMAIN
sed -i "s|{{API_DOMAIN}}|$API_URL|g" .env # Set VITE_API_DOMAIN
# Build the app
npm run build
# Copy the built files to the deployment directory
cp -r dist/. $DEPLOY_PATHStart the built app from the /dist directory:
npm run previewKeep the Browserslist DB up to date:
npx browserslist@latest --update-db