Commands
Contributing to Poveroh, developing and best practices.
This document provides a comprehensive overview of the available project commands for building, developing, setting up, cleaning, formatting, Docker integration, Prisma, and management tasks.
Build
All
Builds all packages and applications in the project.
npm run buildInternal Packages
Builds all internal packages, including:
typesprismautils
npm run build:packagesIndividual Packages
Builds the types package.
npm run build:typesBuilds the prisma package.
npm run build:prismaBuilds the utils package.
npm run build:utilsIndividual Applications
Builds the Storybook documentation.
npm run build:storybookBuilds the backend API.
npm run build:apiBuilds the frontend application.
npm run build:appDevelopment
Start Development Servers
Starts dev servers for the API and the frontend app.
npm run devStarts dev servers for all projects: API, app, Storybook, etc.
npm run dev:allStart Individual Dev Servers
Runs Storybook in development mode.
npm run dev:storybookStarts the backend API in dev mode.
npm run dev:apiStarts the frontend application in dev mode.
npm run dev:appUI
Adds new UI components from the app.
npm run ui:addSetup
Runs all setup tasks, including DB and CDN setup.
npm run setupDatabase Setup
Initializes and sets up the database.
npm run setup:dbCDN Setup
Sets up the CDN services required by the project.
npm run setup:cdnEnvironment Setup
Creates and configures environment variable files (.env).
npm run setup:envSeed Database
Seeds the database with sample data.
npm run setup:dataGenerates sample transactions and inserts them into the database.
npm run setup:generate-transactionsClean
Removes all node_modules and build artifacts.
npm run cleanClean Specific Artifacts
Removes .next, dist, .turbo, and storybook-static.
npm run clean:buildCleans the TurboRepo cache only.
npm run clean:turboRemoves all .env files.
npm run clean:envCleans the database of all seeded sample data.
npm run clean:dataFormatting & Linting
Formats all code files (TypeScript, Markdown, TSX) using Prettier.
Make sure code is formatted and linted before committing.
npm run formatRuns lint checks using TurboRepo.
npm run lintDocker
Network Setup
Creates a Docker network if it doesn't already exist.
npm run docker:create-networkStart Individual Dev Containers
Starts the database container.
npm run docker-dev:dbStarts the API container.
npm run docker-dev:apiStarts the frontend app container.
npm run docker-dev:appOpens Prisma Studio inside a Docker container.
npm run docker-dev:studioStarts the CDN container.
npm run docker-dev:cdnStart All Containers
Starts all development containers.
npm run docker-devStarts all production containers.
It runs a script that download the latest Docker images and starts the containers.
npm run dockerPrisma
Generates the Prisma client based on schema.
npm run prisma:generateApplies Prisma database migrations.
npm run prisma:migrateOpens Prisma Studio to inspect and edit the database.
npm run prisma:studioManagement
Publishes Storybook to Chromatic.
npm run chromatic