Getting Started
How to set up and run the NapX PMS monorepo locally.
Getting Started
Prerequisites
- Node.js 22+
- pnpm 9+
- Docker (for local PostgreSQL and Redis)
Installation
git clone https://github.com/napyork/napx-pms.git
cd napx-pms
pnpm install
Environment variables
Copy .env.example in each app and fill in the required values:
| Variable | Description | Required |
|---|---|---|
DATABASE_URL | PostgreSQL connection string | Yes |
BETTER_AUTH_SECRET | BetterAuth signing secret | Yes |
BETTER_AUTH_URL | BetterAuth base URL | Yes |
API_URL | NestJS API URL (e.g. http://localhost:7000) | Yes |
REDIS_URL | Redis connection URL | Yes |
NODE_ENV | development / production / test | No |
Start dev servers
# Start all apps
pnpm run dev
# Or start individually
pnpm run dev:api # → http://localhost:7000
pnpm run dev:web # → http://localhost:3000
pnpm run dev:admin # → http://localhost:4000
pnpm run dev:docs # → http://localhost:3001
Quick health checks for local API:
http://localhost:7000/healthhttp://localhost:7000/v1/health
Operator portal layout
The web portal at http://localhost:3000 uses a desktop shell built from the native shadcn NavigationMenu and Sidebar primitives.
On large screens, the layout is:
- top navbar spanning the full width
- collapsible sidebar in the left column
- page content in the right column
The top bar keeps the global search and action buttons visible, while the sidebar holds the primary page navigation and sign-out action.
Database
# Generate Prisma client
pnpm --filter @repo/database run db:generate
# Run migrations
pnpm --filter @repo/database run db:migrate