Project Skeleton

The basic skeleton of a simple Aurora project with a single child app called app_name is like this:

/_migrations
/controllers
    /app_name
        _controllers.py
        ControllerName.py
/models
    _models.py
    Users.py
/statics
    /app_name
        main.css
        main.js
/views
    /app_name
        layout.html
        index.html
_apps.py
app.py
config.py
manage.py
  • The _migrations/ is a system directory controlled by the framework used for database migrations and will be discussed in the following of this documentation.
  • The controllers/ directory contains all the controller packages for child apps of the root app. Here we have a package called app_name for a child app with the same name. The _controllers.py is a system module created with Aurora, which contains the controller routers. Here ControllerName.py is a controller class for the current app.

Every child app has its own controller package and classes inside the controllers/ directory.

Important Note:

All modules start with a single _ are system modules created by Aurora. Please do not change them until you fully understand the framework structure and how it works.

In general, you don't need to change them, because you can simply manage them with the framework itself.

  • The models/ directory, contains all the models of your project in which is used for managing the database of the root app and all its child apps. The _models.py is a system module, that contains a list of all available model names. Here it contains the name of a single model class called Users.py, which is created by the framework.
  • The statics/ directory, contains all static files of your child apps, that you can show to the public.

Danger!

Do not put any sensitive data in the statics/ directory, because they are visible for the public.

  • The views/ directory, contains all view files of your child apps, that you want to be rendered and sent back to the browser by a controller class. They may contain static files from the statics/ directory.

Aurora uses Jinja2 templating engine for rendering the view files.

  • The _apps.py module, is a system module that contains a collection of all available app routers for your project.
  • The app.py module, is the primary module of your project. In general, you don't need to do anything with this file. It just instantiates the Aurora class of the Aurora framework to serve the root app of your project.

The root app is an instance of the Flask class.

The root app is responsible to serve the child apps controllers. To put it simply, it connects each route with a specific controller class. It also is responsible to run the server for your apps.

  • The config.py module is the configuration module of your Aurora project. You will learn about this module in a separate section.
  • The manage.py module is the CLI application for managing your project. You will learn about this module in a separate section.

Important Notes:

Please do not change or remove lines with #do-not-change-me flag in the system modules of Aurora framework, otherwise it stops working as expected.

Please do not change the __init__.py modules of Aurora framework, otherwise it stops working as expected.