Quick Start
-
Initialize a new PageZERO project:
Terminal window bunx pagezero@latest init -
Navigate to your project directory:
Terminal window cd <your-project-name> -
Start the development server:
Terminal window bun dev -
Open
http://localhost:3000in your browser to see your app in action. That’s it! 🎉
Node and Bun setup
Section titled “Node and Bun setup”If you’re in a rush, already have Node.js installed, and want to quickly set up Bun:
npm install -g bunFor a more robust setup, the recommendation in PageZERO is to use the asdf runtime version manager.
After installing asdf, run the following commands to install Node.js and Bun:
asdf plugin add nodejsasdf plugin add buncd <your-project-name>asdf installThis will read the .tool-versions file from your project root and automatically install the recommended versions of Node.js and Bun.
Project structure
Section titled “Project structure”PageZERO follows an integrated monorepo approach. Unlike typical monorepos,
package linking happens through TypeScript’s path resolver (via tsconfig.json paths) rather
than workspaces. This allows for a simpler yet modular setup.
Directoryapps
Directorycore/
- …
Directorycontent/ (extended in paid edition)
- …
Directoryauth/ (paid edition)
- …
Directorypayments/ (paid edition)
- …
Directorypermissions/ (paid edition)
- …
Directoryuser/ (paid edition)
- …
Directoryemail/ (paid edition)
- …
Directorypackages/
Directorydb/
- …
Directorygenerate/
- …
Directorytypes/
- …
Directoryui/ (extended in paid edition)
- …
Directoryconfig/ (paid edition)
- …
Directorycrypto/ (paid edition)
- …
Directoryui-lite/ (paid edition)
- …
Directorye2e/
- …
Directoryworkers/
- …
- package.json
An app is a module that owns routes, DB schema or components specific to the app domain.
A package is a module that owns utilities or UI components shared across multiple apps or other packages.
Essential scripts
Section titled “Essential scripts”bun run setup- performs bun install, sets up basic env vars, database and Playwright browser driversbun run dev- boots the development serverbun run dev:email- boots the email development server PowerUPbun run preview- builds the app and boots the compiled versionbun run test- executes unit testsbun run test:watch- run unit tests in watch modebun run test:e2e:ui- executes browser tests in UI mode, perfect for developmentbun run check- code quality check (linting and formatting)bun run check:types- TypeScript types checkbun run check:fix- fix linting and formatting issuesbun run storybook- boots Storybookbun run doctor- runs all basic sanity checks: format, lint, types check and unit tests