Reference
create-olgax-site
CLI reference for create-olgax-site, the command that scaffolds a complete Olgax DXP project with Payload CMS, Next.js and the Puck page builder.
npx create-olgax-site <project-name>Also works with pnpm dlx create-olgax-site <project-name>.
Requirements
- Node.js 20.9 or newer
- pnpm
What it does
- Converts
<project-name>to a folder name (lowercase, hyphens) and refuses to continue if that folder exists and is not empty. - Copies the project template.
- Renames the template's
gitignoreto.gitignoreand sets the package name. - Creates
.envfrom.env.examplewith a freshly generated randomPAYLOAD_SECRET. - Runs
pnpm install. - Runs
pnpm seedto create an admin user, a publishedhomepage and a reusablecta-bannersection. - Prints the next steps.
If step 5 or 6 fails, the CLI tells you which command to run yourself.
After the CLI finishes
cd my-site
pnpm dev| What | Where |
|---|---|
| Site | http://localhost:3000 |
| Page builder | http://localhost:3000/home/edit |
| Dashboard | http://localhost:3000/dashboard |
| Admin | http://localhost:3000/admin |
| Login | [email protected] and ChangeMe123!. Change the password. |
Scripts in the generated project
| Script | Purpose |
|---|---|
pnpm dev | Start the dev server |
pnpm build and pnpm start | Build and run for production |
pnpm lint | Lint the project |
pnpm seed | Create the admin user and demo content |
pnpm new:component Name | Generate a custom block. See Custom components. |
pnpm migrate:create, pnpm migrate, pnpm migrate:status | Database migrations. See Production. |
pnpm generate:types | Regenerate Payload's TypeScript types |
pnpm generate:importmap | Regenerate Payload's admin import map |
pnpm payload | Run the Payload CLI |
Links
- npm: create-olgax-site
- Community: Discord
- Docs: dxp.olgax.com
Questions, ideas or something not working?
Ask in our official Discord, open an issue on GitHub, or edit this page.
Troubleshooting
Fix common Olgax DXP problems - a stale page editor, a busy port, missing homepage, login issues, failed installs and Windows quirks.
@olgax.com/sdk
API reference for @olgax.com/sdk - registerComponent, getRegisteredComponents, color override helpers and visitor visibility helpers for Puck components.