Create a new project from a JSON
Creating folders and files for your project architectures may be very boring, so what about generating a whole new project from a JSON template? Well, now you can!
Create your JSON file
Create a file at some location in you computer:
{
"planguage": "typescript",
"area": "frontend | backend | mobile",
"type": "webapp",
"projectName": "",
"projectDescription": "",
"projectUrl": "your github or gitlab url",
"framework": "react",
"packageManager": "npm",
"dependencies": [
"react-router-dom"
],
"devDependencies": [
"cypress",
"@cypress/react"
],
"structure": {
"main.ts": "",
"src": {
"index.ts": "",
"components": {
"index.tsx": "",
"component1.tsx": "",
"component2.tsx": "",
"component3.tsx": "",
"component4.tsx": "",
"component5.tsx": "",
"component6.tsx": "",
"component7.tsx": "",
"component8.tsx": "",
"damm": {}
},
"pages": {
"index.ts": "",
"login": {
"index.tsx": "",
"styles.module.css": ""
},
"register": {
"index.tsx": "",
"styles.module.css": ""
}
}
},
"tests": {
"units": {},
"integration": {}
}
}
}
Calm down, let's explain the organization of the JSON file. The first lines are the metadata section, which is used to customize the project, for example: the name of the project, the description, the URL of the project etc. The second part is the structure section, which is where are the files and folders which will be created in your project.
For more information about the Architecture JSON file, please visit the Architecture file reference.
Create your Project based on the JSON
Run the following command in your shell:
luby-cli load architecture.json
Done! Your project was successfully created. You can check the project in your computer through the File Explorer or by your IDE.