DjangoForge

Logo

Official documentation for the DjangoForge project.

View the Project on GitHub leoBitto/DjangoForge

DjangoForge Base Project

Back to index

The Base Project is the foundation of the DjangoForge ecosystem, providing core functionalities and common applications that are essential for the entire platform. This document will guide you through the different components of the Base Project, including their purpose, structure, and how they can be extended.

Table of Contents

  1. Overview
  2. Project Structure
  3. Backoffice App
  4. Base App
  5. Gold BI App
  6. Logging App
  7. Website App
  8. Extending the Base Project

Overview

The Base Project contains several essential Django apps that provide core functionalities such as administration, business intelligence, logging, and website management.

Project Structure

src
├── backoffice
├── base
├── gold_bi
├── logging_app
└── website

Backoffice App

Purpose

The Backoffice App provides the tools and interfaces necessary for backend management and data visualization. It serves as the administrative hub where users can manage various aspects of the platform, such as user roles, content, and reports.

Structure

Key Features

Base App

Purpose

The Base App contains the core settings and configurations that are shared across all other applications in DjangoForge. It serves as the foundation upon which the entire ecosystem is built.

Structure

├── base
│   ├── asgi.py
│   ├── __init__.py
│   ├── settings.py
│   ├── urls.py
│   └── wsgi.py

Key Configurations in settings.py

PWA Configuration

DjangoForge is designed to support Progressive Web Apps (PWAs), allowing your application to function like a native app on mobile devices. The following settings configure the PWA features:

These settings enable your DjangoForge app to provide a consistent and native-like experience on mobile devices, improving user engagement.

WebPush Configuration

WebPush notifications allow you to send real-time notifications to users even when they are not actively using the app. The following settings configure WebPush with VAPID keys:

These settings are critical for enabling push notifications in DjangoForge, allowing you to keep users informed with timely updates.

Gold BI App

Purpose

The Gold BI App is responsible for providing basic models that should be extended, they provide the base for temporal aggregations. provide the forms used by other apps to choose the report temporal aggregations. More importantly it must be used to schedule the tasks provided by the tier 1 and tier 2 apps.

Structure

├── gold_bi
│   ├── apps.py
│   ├── docs
│   ├── models.py
│   ├── signals.py
│   ├── tasks_scheduler.py
│   ├── templates
│   └── tests.py

Key Features

Development Protocol

  1. Create the models inside the tier 1 and tier 2 apps: they should be inside the aggregated file inside models folder.
  2. Create the views inside tier 1 and tier 2: they should be inside the aggregated file inside the views folde, they provide the data extraction and creation of the report. every report type should handle all the relative temporal aggregation. every report type should have a view associated.
  3. Create the templates for the report: create the report template to create the dashboard.
  4. Create the tasks: Create the task reading from the deault db, and wrte in the gold db.
  5. Schedule Tasks: Create the task schedulation, one for every temporal aggregation

Q_CLUSTER Configuration

The Gold BI App uses Django Q for managing task scheduling, which is crucial for handling ETL operations. The following settings configure Django Q:

This configuration ensures that the Gold BI App can efficiently manage task execution, handling everything from data processing to report generation.

Logging App

Purpose

The Logging App is designed to track and aggregate logs related to HTTP requests and errors. It is crucial for monitoring application health and troubleshooting issues.

Structure

├── logging_app
│   ├── admin.py
│   ├── apps.py
│   ├── forms.py
│   ├── middleware.py
│   ├── models
│   ├── tasks
│   ├── templates
│   ├── tests.py
│   ├── urls.py
│   └── views

Key Features

LOGGING Configuration

The LOGGING settings in settings.py control how log data is captured and stored. DjangoForge uses these settings to ensure that logs are properly categorized and easily accessible:

These configurations ensure that logs are systematically stored and can be easily monitored, providing a clear overview of the system’s operations.

Integration with Gold BI

the read logs tab is used to read the various log files:

Website App

Purpose

The Website App manages the front-end of the DjangoForge site.

Structure

└── website
    ├── admin.py
    ├── apps.py
    ├── forms.py
    ├── models.py
    ├── static
    ├── templates
    ├── tests.py
    ├── urls.py
    └── views.py

Key Features

Extending the Base Project

The Base Project is designed to be extended and customized according to your specific business needs. You can add new applications, modify existing ones, or create custom modules that integrate seamlessly with the existing structure. Refer to the Advanced Topics section for detailed guidance on how to extend and customize DjangoForge.