
Product
Introducing Scala and Kotlin Support in Socket
Socket now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.
files-structure-generator
Advanced tools
A utility to generate a predefined file and folder structure from a JSON configuration.
JSON Template Files
A collection of JSON templates to streamline your project setup!
Each template offers a well-structured mix of files and folders commonly used in various project types.
template1.json
){
"src": {},
"hello": {},
"hii": {}
}
src
: Main source code directory.hello
: Example directory.hii
: Example directory.template2.json
){
"app": {
"main.js": "file",
"config": {
"config.js": "file"
}
},
"components": {
"header.js": "file",
"footer.js": "file"
},
"services": {
"api.js": "file"
}
}
app
: Main application directory with main.js
and config.js
.components
: Reusable components (e.g., header.js
, footer.js
).services
: Service layer for APIs with api.js
.template3.json
){
"assets": {
"images": {},
"fonts": {}
},
"styles": {
"main.css": "file",
"theme.css": "file"
},
"scripts": {
"app.js": "file",
"utils.js": "file"
}
}
assets
: Directory for images and fonts.styles
: CSS/SCSS files (main.css
, theme.css
).scripts
: JavaScript files for app logic (app.js
, utils.js
).template4.json
){
"config": {
"default.json": "file",
"production.json": "file"
},
"env": {
".env": "file",
".env.example": "file"
},
"logs": {
"app.log": "file",
"error.log": "file"
}
}
config
: Configuration files (default.json
, production.json
).env
: Environment files (.env
, .env.example
).logs
: Log files (app.log
, error.log
).template5.json
){
"public": {
"index.html": "file",
"favicon.ico": "file"
},
"views": {
"home.html": "file",
"about.html": "file"
},
"routes": {
"index.js": "file",
"api.js": "file"
}
}
public
: Public assets (index.html
, favicon.ico
).views
: HTML templates (home.html
, about.html
).routes
: JavaScript route files (index.js
, api.js
).template6.json
){
"models": {
"user.js": "file",
"product.js": "file"
},
"controllers": {
"userController.js": "file",
"productController.js": "file"
},
"middlewares": {
"auth.js": "file",
"errorHandler.js": "file"
}
}
models
: Database models (user.js
, product.js
).controllers
: Controllers (userController.js
, productController.js
).middlewares
: Middleware functions (auth.js
, errorHandler.js
).template7.json
){
"tests": {
"unit": {
"user.test.js": "file",
"product.test.js": "file"
},
"integration": {
"userIntegration.test.js": "file",
"productIntegration.test.js": "file"
}
}
}
tests
: Main testing directory.
unit
: Unit tests (user.test.js
, product.test.js
).integration
: Integration tests (userIntegration.test.js
, productIntegration.test.js
).structure.json
: Copy the structure of the template you chose into your structure.json
file.npm run files
This command will create files and folders based on your structure.json
configuration.This project is licensed under the MIT License - see the LICENSE.txt file for details.
Note: Feel free to modify these templates to suit your specific project requirements.
FAQs
A utility to generate a predefined file and folder structure from a JSON configuration.
The npm package files-structure-generator receives a total of 17 weekly downloads. As such, files-structure-generator popularity was classified as not popular.
We found that files-structure-generator demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.
Application Security
/Security News
Socket CEO Feross Aboukhadijeh and a16z partner Joel de la Garza discuss vibe coding, AI-driven software development, and how the rise of LLMs, despite their risks, still points toward a more secure and innovative future.
Research
/Security News
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.