This project is licensed under the Apache License 2.0 — see the LICENSE.txt file for details.
PNinja is a Yeoman generator that allows you to build an entire stack application:
All based on JDL files describing your domain!
Install Yeoman and PNinja:
npm install -g yo generator-pninja
Generate the base application structure (server + client without entities):
yo pninja
Answer a few prompts ... and you're ready ⚡
Create your entity definition file using JDL:
touch entities.jdl # or any other name of your choice
and edit it using this guide: https://www.jhipster.tech/jdl/intro/
Run the entities generator:
yo pninja:entities entities.jdl
You can run this command multiple times with different JDL files:
yo pninja:entities core-entities.jdl
yo pninja:entities additional-entities.jdl
For incremental development or to modify entities individually, use the entity sub-generator:
yo pninja:entity [EntityName]
This interactive command allows you to:
All entity configurations are stored in .pninja/<EntityName>.json files.
my-app/ ├── client/ # React + Vite app ├── docker/ # Docker compose ├── server/ # Laravel project ├── package.json # With commands └── README.md
Fully wired together: auth, routing, forms, CRUD, migrations.
deleted_at timestamps (use @softDelete annotation in JDL)
@softDelete
entity MyEntity {
name String required
description String
}
migrate, rollback, migrate:fresh and check migrate:status without the command lineelastic:migrate, migrate:reset, migrate:refresh) and Meilisearch (scout:sync-index-settings)@icon annotation in JDL
@icon("star")
entity MyEntity {
name String required
description String
}
The source code for generator-pninja is hosted on GitHub. You can access the official repository at the following link:
Generator PNinja GitHub Repository
Contributions are welcome! Feel free to open issues or pull requests on the GitHub repository.
For issues, questions, or feature requests, please use the GitHub Issues page.
# Dockerfile
FROM php:8.2-fpm
RUN apt-get update && apt-get install -y \
vim \
curl \
unzip \
git \
libonig-dev \
&& rm -rf /var/lib/apt/lists/*
RUN docker-php-ext-install mbstring
RUN curl -sS https://getcomposer.org/installer | php && \
mv composer.phar /usr/local/bin/composer
RUN useradd -ms /bin/bash developer
USER developer
WORKDIR /home/developer
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash && \
bash -c "source ~/.nvm/nvm.sh && \
nvm install node && \
npm install -g yo pninja"