Docs
Getting Started
Project Structure

Rasengan.js Project Structure

This page provides an overview of how a Rasengan.js project is structured. We will go through the top-level directories and files, and also the configuration files that are used to set up the project and some conventions that are used in the project.

Top-level Directories

A Rasengan.js project has the following top-level directories:

DirectoryDescription
publicContains the static files of the project.
srcContains the source code of the project.

Top-level Files

A Rasengan.js project has the following top-level files:

FileDescription
rasengan.config.jsConfiguration file for Rasengan.js project
package.jsonProject dependencies, scripts and others
.envEnvironment variables
.env.exampleExample of environment variables
.gitignoreFiles and directories that should be ignored by git
README.mdProject documentation
rasengan-env.d.tsTypeScript declaration file for Rasengan.js
tsconfig.jsonTypeScript configuration file
jsconfig.jsonJavaScript configuration file

Src folder

Inside the src you have the following folders and files

Folders

DirectoryDescription
appContains the pages of the project.required
componentsContains the components of the project.optional
assetsContains the assets of the project.optional

Files

FileExtensionDescription
main.jsx .tsxEntry point of the project.required
template.jsx .tsxHTML template.required

app folder

The app folder contains the pages of the project. But also, we can have routers and layouts files inside the app folder.

FileExtensionDescriptionExample
[name].page.js .jsx .ts .tsxA page filehome.page
[name].router.js .tsA router fileapp.router
[name].layout.js .jsx .ts .tsxA layout fileapp.layout

You can organize the pages, routers and layouts as you want in subfolders, but please, keep the convention of the file name.

The app.router file is required for defining routing into your app and should be present in the app folder.

Next Steps

Routing Base Concepts
Logo Image