Overview

Understanding the Fuwafuwa Framework's structure is essential for effective application development.

Application Structure

Understanding the architecture of Fuwafuwa Framework is the foundation of effective application development. The framework's directory structure is carefully designed to promote organization, maintainability, and scalability, allowing you to focus on building features rather than managing complex file systems.

Fuwafuwa follows a modular approach where different aspects of your application are logically separated. This separation of concerns makes it easier to locate files, understand their purpose, and modify them without affecting other parts of the system.

Application Folders

The core application files and folders are organized in a clean, intuitive structure:

app/
├── configs/           # Configuration files
├── controllers/       # Controllers
│   ├── systems/      # Core controllers
│   └── user/         # User-coded controllers
│       ├── ajax/     # Ajax controllers
│       └── api/      # API controllers
├── db/               # SQLite database
├── i18n/             # Internationalization files
└── views/            # View files
    ├── system/       # Core views
    └── user/         # User created views

css/                  # Stylesheet files
themes/               # Theme files (Tailwind theme)
images/               # Static images
js/                   # JavaScript libraries
media/                # User uploaded resources
tmp/                  # Compiled PHP, cache
vendor/               # PHP libraries

Most of your development work will be in the app/ folder, which contains three main subdirectories: controllers/, views/, and configs/.

📁 Key Directory Roles
  • app/controllers/ - Handles request processing and application logic
  • app/views/ - Contains template files for rendering HTML responses
  • app/configs/ - Stores configuration files for the application and framework
  • app/db/ - Contains the SQLite database file and migrations
  • app/i18n/ - Stores translation files for multi-language support

The separation between system/ and user/ directories within both controllers/ and views/ is particularly important. This design allows the framework's core files to remain intact during updates, while your custom code is safely isolated in the user/ directory.

By following this structure, you'll find that your application becomes more maintainable over time, and collaboration with other developers becomes more straightforward.

Configuration Folder

FilePurpose
config.ini Core application settings. Typically requires minimal modification.
rbac_permission.json Defines user authorization rules. See Authorization section.
db.ini Database connection parameters
mail.ini Mail server settings
license.ini License key storage

By understanding this structure, developers can efficiently manage application components and customize settings to meet specific project requirements.

MVC Pattern

Fuwafuwa Framework follows the Model-View-Controller (MVC) architectural pattern:

📦 Models

Handle data logic and database interactions. Located in app/controllers/user/model/

Learn more →

🎨 Views

Present data to users via templates. Located in app/views/

Learn more →

⚙️ Controllers

Handle requests and coordinate models/views. Located in app/controllers/

Learn more →