File Structure

Each Noventa project is made up of different folders which are necessary for the framework to work. Understanding this structure is key to developing your application efficiently.

/components

This is where the components for your web application live. Components are reusable, self-contained pieces of UI with their own logic. Each component has its own folder containing:

  • [component_name]_template.html: Jinja template (required)
  • [component_name]_logic.py: Python logic handler (optional)
  • [component_name]_models.py: SQLAlchemy models (optional)

Component folders can be nested for subcomponents, and the framework automatically discovers all components.

/functions

The functions directory contains reusable Python functions that are not tied to specific components. This promotes code reuse across your application. Functions here can be imported and used in any component's _logic.py file.

/layouts

Layouts are HTML templates that define the common structure of your site. Pages extend layouts to inherit headers, footers, and navigation. Layouts use Jinja blocks that pages can override.

/pages

This directory contains all HTML templates that become accessible URLs. Each .html file creates a route. Special cases:

  • index.html files create / routes (not /index)
  • Files in subfolders create nested routes
  • Bracketed names [] create dynamic routes

/migrations

This folder contains database migration scripts generated by Alembic. Includes:

  • alembic.ini: Main configuration
  • versions/: Individual migration files
  • seed/: Python scripts for populating initial data

/models

This directory is for SQLAlchemy models that are not tied to a component and coould be reused across many components.

Root Files

  • config.yaml: Application configuration (database, sessions, etc.)
  • requirements.txt: Python dependencies
  • AGENTS.md: Framework documentation