seed4j/seed4j
À propos
Seed4J est un générateur de code modulaire doté d’une architecture propre.
Développement web et applicatifProgression mesurée des étoiles
- in 24h
- 0
- in 7 days
- +1
- in 15 days
- +2
- in 1 month
- Historique en cours
Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.
README.md
OriginalSeed4J
Description
Seed4J is a development platform to quickly generate, develop & deploy modern web applications & microservice architectures.
Seed4J will help you to start your project by generating step by step only what you need.
- The generated code uses Hexagonal Architecture
- The technical code is separated from your business code
- You will only generate the code you want, no additional unused code
- The best quality as possible: 💯% coverage, 0 code smell, no duplication 😎
This is a sample application created with Seed4J.
Designed to be used locally
[!IMPORTANT] Seed4J is designed to run on your machine, next to your project: run it locally (see Quick Start or Docker/Podman Quickstart).
Seed4J applies the modules directly to a folder of the machine it runs on, and keeps track of them in its .seed4j/modules folder. Running it locally lets you:
- generate your project in your own folder, step by step, and only what you need;
- come back later and apply new modules to the same project, as it grows.
The online instance, start.seed4j.com, is only meant to try Seed4J: the projects are generated in a temporary folder of the server, you can only get them back as a zip file, and you can't apply new modules to your existing project with it.
Quick Start
You need to clone this project and go into the folder:
git clone https://github.com/seed4j/seed4j
cd seed4j
Run the project:
./mvnw
Then, you can navigate to http://localhost:1339 in your browser and apply your first modules.
Some videos
- What is JHipster Lite and why should you care? by Julien Dubois
- Simple WebServices with JHipster Lite by Colin Damon
- JHipster vs JHipster Lite by Julien Dubois
Upgrading an existing generated project
If you have an existing project generated with Seed4J, you can handle breaking changes in latest versions by running the following command:
mvn -U org.openrewrite.maven:rewrite-maven-plugin:run -Drewrite.recipeArtifactCoordinates=org.openrewrite.recipe:rewrite-spring:RELEASE,com.seed4j:seed4j:RELEASE -Drewrite.activeRecipes=com.seed4j.UpgradeSeed4J
The main interest is for seed4j-extension instances, but it can also be useful if some modules have been renamed: it will update your .seed4j/modules/history.json file to use the new module names.
Prerequisites
Java
You need to have Java 25:
Node.js and NPM
- Node.js: we use Node to run a development web server and build the project. Depending on your system, you can install Node either from source or as a pre-packaged bundle.
After installing Node, you should be able to run the following command to install development tools.
npm ci
You will only need to run this command when dependencies change in package.json.
npm install
Test the project
To launch tests:
./mvnw clean test
To launch tests and integration tests:
./mvnw clean verify
GraalVM Native Support
This project has been configured to let you generate either a lightweight container or a native executable. It is also possible to run your tests in a native image. Lightweight Container with Cloud Native Buildpacks
If you're already familiar with Spring Boot container images support, this is the easiest way to get started. Docker should be installed and configured on your machine prior to creating the image.
To create the image, run the following goal:
./mvnw -pl seed4j-server spring-boot:build-image -Pnative
Then, you can run the app like any other container:
docker run -p 1339:1339 --rm docker.io/library/seed4j:<VERSION>
Executable with Native Build Tools
Use this option if you want to explore more options such as running your tests in a native image. The GraalVM native-image compiler should be installed and configured on your machine.
NOTE: GraalVM for JDK 25+ is required.
To create the executable, run the following goal:
./mvnw -pl seed4j-server native:compile -Pnative -DskipTests
Then, you can run the app as follows:
./seed4j-server/target/seed4j
You can also run your existing tests suite in a native image. This is an efficient way to validate the compatibility of your application.
To run your existing tests in a native image, run the following goal:
./mvnw -pl seed4j-server test -PnativeTest
Lint
We use multiple linters check and lint your code:
- Oxlint for JavaScript/TypeScript
- Prettier for the format
- prettier-java for Java
- Stylelint for style
- stylelint-scss for SCSS
To check:
npm run lint:ci
To lint and fix all code:
npm run lint
Sonar Analysis
To launch local Sonar Analysis:
docker compose -f seed4j-server/src/main/docker/sonar.yml up -d
You need to wait for Sonar to be up before getting the Sonar token:
docker logs -f sonar-token && SONAR_TOKEN=$(docker logs sonar-token)
Then:
./mvnw clean verify sonar:sonar -Dsonar.token=$SONAR_TOKEN
You can use a single command:
docker compose -f seed4j-server/src/main/docker/sonar.yml up -d \
&& docker logs -f sonar-token && SONAR_TOKEN=$(docker logs sonar-token) \
&& ./mvnw clean verify sonar:sonar -Dsonar.token=$SONAR_TOKEN
So you can check the result at http://localhost:9001
Run the project
You can run the project using Maven, as spring-boot:run is the default target:
./mvnw
Or, first, you can package as jar:
./mvnw package
Then, run:
java -jar seed4j-server/target/*.jar
So you can navigate to http://localhost:1339 in your browser.
These following profiles are available, and you can use it to only display the frameworks you want:
- angular
- react
- vue
For example, you can run:
./mvnw -Dspring-boot.run.profiles=vue
or
java -jar seed4j-server/target/*.jar --spring.profiles.active=vue
Docker/Podman Quickstart
To start a local instance of Seed4J, go to your desired application folder and run:
docker run --rm --pull=always -p 1339:1339 -v $(pwd):/tmp/seed4j/:Z -it seed4j/seed4j:latest
Or with podman:
podman run --rm --pull=always -p 1339:1339 -v $(pwd):/tmp/seed4j/:Z -u root -it seed4j/seed4j:latest
Then, go to http://localhost:1339
e2e tests
You need to run the project first and to install the Playwright browser once (npm run test:install-browser --workspace seed4j-server). Then, you can run the end-to-end tests:
npm run e2e --workspace seed4j-server
Or in headless mode:
npm run e2e:headless --workspace seed4j-server
Generate your project
Once started, go to http://localhost:1339, select your option and generate the code you want, step by step, and only what you need.
See Applying modules for a complete guide: first project, adding modules to an existing project, REST API and troubleshooting.
Contributing
We are honored by any contributions you may have small or large. Please refer to our contribution guidelines and instructions document for any information about contributing to the project.
Fork
This project is a fork of the original JHipster Lite, now maintained under the Seed4J organization. It will be developed and maintained by the original authors of JHipster Lite project.
Explorer des projets similaires
Chargement…