Find more info on the website: https://kubejs.latvian.dev/
Directory information:
assets - Acts as a resource pack, you can put any client resources in here, like textures, models, etc. Example: assets/kubejs/textures/item/test_item.png
data - Acts as a datapack, you can put any server resources in here, like loot tables, functions, etc. Example: data/kubejs/loot_tables/blocks/test_block.json
startup_scripts - Scripts that get loaded once during game startup - Used for adding items and other things
server_scripts - Scripts that get loaded every time server resources reload - Used for modifying recipes, tags, and handling server events
client_scripts - Scripts that get loaded every time client resources reload - Used for JEI events, tooltips and other client side things
config - KubeJS config storage. This is also the only directory that scripts can access other than world directory
exported - Data dumps like texture atlases end up here