|
| 1 | +# [Jinja Template](https://appseed.us/jinja-template) - **[Atlantis Lite](https://appseed.us/admin-dashboards/flask-dashboard-atlantis-dark)** |
| 2 | + |
| 3 | +> Seed project coded in Flask/Jinja on top of Atlantis Lite (free version) - Features: |
| 4 | +
|
| 5 | +<br /> |
| 6 | + |
| 7 | +- UI Kit: **[Atlantis Lite](https://appseed.us/admin-dashboards/flask-dashboard-atlantis-dark)** (Free Version) by **ThemeKita** |
| 8 | +- Render Engine: [Jinja2](https://jinja.palletsprojects.com/) |
| 9 | +- Framework: Flask (no database, no hard dependencies) |
| 10 | +- Free support via **Github** and [Discord](https://discord.gg/fZC6hup). |
| 11 | + |
| 12 | +<br /> |
| 13 | + |
| 14 | +> Links |
| 15 | +
|
| 16 | +- [Jinja Atlantis Dark](https://appseed.us/jinja-template/jinja-template-atlantis-dark) - Product page |
| 17 | +- [Jinja Atlantis Dark - Demo](https://jinja-atlantis-dark.appseed-srv1.com/) - LIVE Demo |
| 18 | +- [Atlantis Lite - UI Docs](https://atlantis-lite.appseed.us/) - how to customize the UI |
| 19 | + |
| 20 | +<br /> |
| 21 | + |
| 22 | +## **[Atlantis Lite](https://appseed.us/admin-dashboards/flask-dashboard-atlantis-dark)** |
| 23 | + |
| 24 | +**Atlantis Lite** is a free bootstrap 4 admin dashboard that is beautifully and elegantly designed to display various metrics, numbers or data visualization. Atlantis Lite admin dashboard has 2 layouts, many plugins and UI components to help developers create dashboards quickly and effectively so they can save development time and also help users to make the right and fast decisions based on existing data. |
| 25 | + |
| 26 | +<br /> |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | +<br /> |
| 31 | + |
| 32 | +## Build from sources |
| 33 | + |
| 34 | +```bash |
| 35 | +$ # Clone the sources |
| 36 | +$ git clone https://github.com/app-generator/jinja-template-atlantis-dark.git |
| 37 | +$ cd jinja-template-atlantis-dark |
| 38 | +$ |
| 39 | +$ # Virtualenv modules installation (Unix based systems) |
| 40 | +$ virtualenv env |
| 41 | +$ source env/bin/activate |
| 42 | +$ |
| 43 | +$ # Virtualenv modules installation (Windows based systems) |
| 44 | +$ # virtualenv env |
| 45 | +$ # .\env\Scripts\activate |
| 46 | +$ |
| 47 | +$ # Install requirements |
| 48 | +$ pip3 install -r requirements.txt |
| 49 | +$ |
| 50 | +$ # Set the FLASK_APP environment variable |
| 51 | +$ (Unix/Mac) export FLASK_APP=run.py |
| 52 | +$ (Windows) set FLASK_APP=run.py |
| 53 | +$ (Powershell) $env:FLASK_APP = ".\run.py" |
| 54 | +$ |
| 55 | +$ # Set up the DEBUG environment |
| 56 | +$ # (Unix/Mac) export FLASK_ENV=development |
| 57 | +$ # (Windows) set FLASK_ENV=development |
| 58 | +$ # (Powershell) $env:FLASK_ENV = "development" |
| 59 | +$ |
| 60 | +$ # Run the Jinja Template |
| 61 | +$ # --host=0.0.0.0 - expose the app on all network interfaces (default 127.0.0.1) |
| 62 | +$ # --port=5000 - specify the app port (default 5000) |
| 63 | +$ flask run --host=0.0.0.0 --port=5000 |
| 64 | +$ |
| 65 | +$ # Access the UI in browser: http://127.0.0.1:5000/ |
| 66 | +``` |
| 67 | + |
| 68 | +<br /> |
| 69 | + |
| 70 | +## Code-base structure |
| 71 | + |
| 72 | +The project has a simple structure, represented as bellow: |
| 73 | + |
| 74 | +```bash |
| 75 | +< PROJECT ROOT > |
| 76 | + | |
| 77 | + |-- app/__init__.py |
| 78 | + |-- app/ |
| 79 | + | |-- static/ |
| 80 | + | | |-- <css, JS, images> # CSS files, Javascripts files |
| 81 | + | | |
| 82 | + | |-- templates/ |
| 83 | + | | | |
| 84 | + | | |-- includes/ # Page chunks, components |
| 85 | + | | | | |
| 86 | + | | | |-- navigation.html # Top bar |
| 87 | + | | | |-- sidebar.html # Left sidebar |
| 88 | + | | | |-- scripts.html # JS scripts common to all pages |
| 89 | + | | | |-- footer.html # The common footer |
| 90 | + | | | |
| 91 | + | | |-- layouts/ # App Layouts (the master pages) |
| 92 | + | | | | |
| 93 | + | | | |-- base.html # Used by common pages like index, UI |
| 94 | + | | | |-- base-fullscreen.html # Used by auth pages (login, register) |
| 95 | + | | | |
| 96 | + | | index.html # The default page |
| 97 | + | | login.html # Auth Login Page |
| 98 | + | | register.html # Auth Registration Page |
| 99 | + | | page-404.html # Error 404 page (page not found) |
| 100 | + | | page-500.html # Error 500 page (server error) |
| 101 | + | | *.html # All other pages provided by the UI Kit |
| 102 | + | |
| 103 | + |-- requirements.txt |
| 104 | + | |
| 105 | + |-- run.py |
| 106 | + | |
| 107 | + |-- ************************************************************************ |
| 108 | +``` |
| 109 | + |
| 110 | +<br /> |
| 111 | + |
| 112 | +## Deployment |
| 113 | + |
| 114 | +The project comes with a basic configuration for [Docker](https://www.docker.com/), [Gunicorn](https://gunicorn.org/), and [Waitress](https://docs.pylonsproject.org/projects/waitress/en/stable/). |
| 115 | + |
| 116 | +<br /> |
| 117 | + |
| 118 | +### [Docker](https://www.docker.com/) execution |
| 119 | +--- |
| 120 | + |
| 121 | +The steps to start the template using Docker: |
| 122 | + |
| 123 | +> Get the code |
| 124 | +
|
| 125 | +```bash |
| 126 | +$ git clone https://github.com/app-generator/jinja-template-atlantis-dark.git |
| 127 | +$ cd jinja-template-atlantis-dark |
| 128 | +``` |
| 129 | + |
| 130 | +> Start the app in Docker |
| 131 | +
|
| 132 | +```bash |
| 133 | +$ sudo docker-compose pull && sudo docker-compose build && sudo docker-compose up -d |
| 134 | +``` |
| 135 | + |
| 136 | +Visit `http://localhost:5005` in your browser. The app should be up & running. |
| 137 | + |
| 138 | +<br /> |
| 139 | + |
| 140 | +### [Gunicorn](https://gunicorn.org/) |
| 141 | +--- |
| 142 | + |
| 143 | +Gunicorn 'Green Unicorn' is a Python WSGI HTTP Server for UNIX. |
| 144 | + |
| 145 | +> Install using pip |
| 146 | +
|
| 147 | +```bash |
| 148 | +$ pip install gunicorn |
| 149 | +``` |
| 150 | +> Start the app using gunicorn binary |
| 151 | +
|
| 152 | +```bash |
| 153 | +$ gunicorn --bind 0.0.0.0:8001 run:app |
| 154 | +Serving on http://localhost:8001 |
| 155 | +``` |
| 156 | + |
| 157 | +Visit `http://localhost:8001` in your browser. The app should be up & running. |
| 158 | + |
| 159 | +<br /> |
| 160 | + |
| 161 | +### [Waitress](https://docs.pylonsproject.org/projects/waitress/en/stable/) |
| 162 | +--- |
| 163 | + |
| 164 | +Waitress (Gunicorn equivalent for Windows) is meant to be a production-quality pure-Python WSGI server with very acceptable performance. It has no dependencies except ones that live in the Python standard library. |
| 165 | + |
| 166 | +> Install using pip |
| 167 | +
|
| 168 | +```bash |
| 169 | +$ pip install waitress |
| 170 | +``` |
| 171 | +> Start the app using [waitress-serve](https://docs.pylonsproject.org/projects/waitress/en/stable/runner.html) |
| 172 | +
|
| 173 | +```bash |
| 174 | +$ waitress-serve --port=8001 run:app |
| 175 | +Serving on http://localhost:8001 |
| 176 | +``` |
| 177 | + |
| 178 | +Visit `http://localhost:8001` in your browser. The app should be up & running. |
| 179 | + |
| 180 | +<br /> |
| 181 | + |
| 182 | +## Credits & Links |
| 183 | + |
| 184 | +- [Flask Framework](https://www.palletsprojects.com/p/flask/) - The official website |
| 185 | + |
| 186 | +<br /> |
| 187 | + |
| 188 | +--- |
| 189 | +[Jinja Template](https://appseed.us/jinja-template) **[Atlantis Lite](https://appseed.us/admin-dashboards/flask-dashboard-atlantis-dark)** - Provided by **AppSeed** [Web App Generator](https://appseed.us/app-generator). |
0 commit comments