Quick Start

This guide will help you get started with Django Volt Dashboard

Compile the product

To compile the product and use it locally, Python3 should br installed and accessible via the terminal. The source code can be downloaded from the official respository or downloaded in ZIP format from the product page.

Download the sources and unzip the archive

cd django-dashboard-volt

Create a virtual environment

virtualenv env
$ source env/bin/activate

Install modules

pip3 install -r requirements.txt

Create the tables by running a Django migration

python manage.py makemigrations
$ python manage.py migrate

Start the application

python manage.py runserver

If all goes well, we can access Django Volt in browser http://127.0.0.1:8000/.

Note: To use the app, please access the registration page and create a new user. After authentication, the app will unlock the private pages.

Django Volt - Open-source seed project provided by Themesberg and AppSeed.

Codebase structure

The project is coded using a simple and intuitive structure presented bellow:

< PROJECT ROOT >
   |
   |-- core/                        # Implements app logic and serve the static assets
   |    |-- settings.py         # Django app bootstrapper
   |    |-- static/
   |    |-- templates/          # Templates used to render pages
   |         |-- includes/        # HTML chunks and components
   |         |-- layouts/         # Master pages
   |         |-- accounts/      # Authentication pages
   |         |
   |      index.html             # The default page
   |       *.html                    # All other HTML pages
   |
   |-- authentication/       # Handles auth routes (login and register)
   |-- app/                         # A simple app that serve HTML files
   |
   |-- requirements.txt     # Development modules - SQLite storage
   |-- .env                          # Inject Configuration via Environment
   |-- manage.py              # Start the app - Django default start script
   |
   |-- ************************************************************************

The bootstrap flow

  • Django bootstrapper manage.py uses core/settings.py as the main configuration file
  • core/settings.py loads the app magic from .env file
  • Redirect the guest users to Login page
  • Unlock the pages served by app node for authenticated users

Deployment

The app is provided with a basic configuration to be executed in Docker, a popular virtualization software. To start the project inside a Docker container, please type following commands:

1# - UNZIP the archive and change the curent directory

cd django-dashboard-volt

2# - Download the required packages

sudo docker-compose pull

3# - Build the Docker packages

sudo docker-compose build

4# - Start the dokerized application

sudo docker-compose up

By visiting http://localhost:5005 in the browser we should see the app running.