This is an in-development version. Grow with us! 🎉

Project Structure

Introduction

After running the init command, a new project will be generated in the current directory. This documentation outlines the structure of the generated project and provides an explanation of the purpose of each file and folder.

Project Structure Overview

The project structure is as follows:

.
├── .fustak
│   ├── Fustak.toml
│   ├── .history
│   └── .token
├── public
│   ├── css
│   │   ├── normalize.css
│   │   ├── reset.css
│   │   └── styles.css
│   ├── favicon
│   │   ├── android-chrome-192x192.png
│   │   ├── android-chrome-512x512.png
│   │   ├── apple-touch-icon.png
│   │   ├── favicon-16x16.png
│   │   ├── favicon-32x32.png
│   │   └── favicon.ico
│   ├── img
│   │   └── dog.jpg
│   ├── js
│   │   └── script.js
│   └── robots.txt
└── src
    ├── apis
    │   ├── _default.api.toml
    │   └── counter
    │       ├── counter.add.api.js
    │       └── counter.add.api.toml
    ├── migrations
    │   ├── create_counter_table_down.db
    │   └── create_counter_table_up.db
    └── pages
        ├── components
        │   ├── box.jsx
        │   ├── text.jsx
        │   └── title.jsx
        ├── _default.page.html
        ├── _default.page.toml
        └── index
            ├── components
            │    └── counter.jsx
            ├── index-content.jsx
            ├── index.page.js
            ├── index.page.toml
            └── islands
                └── counter.island.jsx

File and Folder Descriptions

  • − .fustak: This folder contains configuration files and history related to the Fustak framework.
    • − Fustak.toml: The main configuration file for the Fustak framework.
    • − .history: A file or folder containing the history of changes made to the project (e.g., deployment history).
    • − .token: A file containing the access token for authentication purposes.
  • − public: This folder contains public assets and files that will be served directly by the server.
    • − css: The folder for CSS files, including normalize.css, reset.css, and styles.css.
    • − favicon: The folder for favicon images in different sizes and formats.
    • − img: The folder for images, which includes the dog.jpg file.
    • − js: The folder for JavaScript files, which includes the script.js file.
    • − robots.txt: A file used to provide instructions to web robots and crawlers.
  • − src: This folder contains the source code and configurations for the project.
    • − apis: The folder for API configurations and scripts.
      • − _default.api.toml: The default API configuration file.
      • − counter: An example folder for a specific API called "counter".
        • − counter.add.api.js: The JavaScript file defining the logic for the "add" API endpoint.
        • − counter.add.api.toml: The configuration file for the "add" API endpoint.
    • − migrations: The folder for database migration files.
      • − create_counter_table_down.db: The migration file for reverting the creation of the "counter" table.
      • − create_counter_table_up.db: The migration file for creating the "counter" table.
    • − pages: The folder for page configurations and components.
      • − components: The folder for reusable components used across different pages.
        • − box.jsx: An example component file for a box.
        • − text.jsx: An example component file for text.
        • − title.jsx: An example component file for a title.
      • − _default.page.html: The default HTML template for pages.
      • − _default.page.toml: The default page configuration file.
      • − index: An example folder for the "index" page.
        • − components: The folder for components specific to the "index" page.
          • − counter.jsx: An example component file for a counter.
        • − index-content.jsx: The JavaScript file defining the content of the "index" page.
        • − index.page.js: The JavaScript file defining the behavior of the "index" page.
        • − index.page.toml: The configuration file for the "index" page.
        • − islands: The folder for reusable island components used within the "index" page.
          • − counter.island.jsx: An example island component file for the counter component.

The project structure is designed to organize different aspects of the Fustak project, including assets, APIs, migrations, and page configurations. Understanding this structure will help you navigate and manage your project effectively.