Skip to main content

Create Django projects and apps with layered architecture.

Project description

Django Layered Start

Django Layered Start is a powerful CLI tool that helps you kickstart your Django projects by automatically creating a clean, SOLIDโ€‘compliant layered architecture. This package sets up your Django project and apps with separate layers for presentation, application, domain, and infrastructure, providing you with an organized and scalable foundation for your development.


๐Ÿš€ Features

  • Automated Project Setup: Instantly generate a new Django project using django-admin.
  • Layered App Creation: Create Django apps with a predefined folder structure:
    • Presentation: Contains view logic and URL configurations.
    • Application: Houses business logic and service layers.
    • Domain: Includes domainโ€‘specific utilities, selectors, and validators.
    • Infrastructure: Manages models and integration with external systems.
  • SOLID Principles: Ensures your code remains clean, maintainable, and scalable by following core SOLID design principles.
  • Interactive CLI Interface: A guided commandโ€‘line experience for setting up your project and apps without hassle.

๐Ÿ›  Installation

To install the package from PyPI, run:

pip install django-layered-start

Then start the CLI tool:

django-layered-start

๐Ÿ’ป Creating the Project & Apps

Follow the interactive prompts to scaffold your project:

๐Ÿ“ฆ Project name: myproject
โœ… Django project "myproject" created!

๐Ÿงฑ App name (or N to stop): accounts
๐Ÿ“‚ App "accounts" created with layered structure.

โ“ Do you want to add another app? (Y/N): Y
๐Ÿงฑ App name (or N to stop): products
๐Ÿ“‚ App "products" created with layered structure.

โ“ Do you want to add another app? (Y/N): N

๐Ÿ“ Project Structure

After running the CLI, your directory tree will look like this:

myproject/
โ”œโ”€โ”€ manage.py
โ”œโ”€โ”€ myproject/
โ”‚   โ””โ”€โ”€ settings.py
โ”œโ”€โ”€ accounts/
โ”‚   โ”œโ”€โ”€ presentation/
โ”‚   โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”‚   โ”œโ”€โ”€ views.py
โ”‚   โ”‚   โ””โ”€โ”€ urls.py
โ”‚   โ”œโ”€โ”€ application/
โ”‚   โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”‚   โ””โ”€โ”€ services.py
โ”‚   โ”œโ”€โ”€ domain/
โ”‚   โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”‚   โ”œโ”€โ”€ validators.py
โ”‚   โ”‚   โ”œโ”€โ”€ selectors.py
โ”‚   โ”‚   โ””โ”€โ”€ utilities.py
โ”‚   โ””โ”€โ”€ infrastructure/
โ”‚       โ”œโ”€โ”€ __init__.py
โ”‚       โ””โ”€โ”€ models.py
โ””โ”€โ”€ products/
    โ”œโ”€โ”€ presentation/
    โ”‚   โ”œโ”€โ”€ __init__.py
    โ”‚   โ”œโ”€โ”€ views.py
    โ”‚   โ””โ”€โ”€ urls.py
    โ”œโ”€โ”€ application/
    โ”‚   โ”œโ”€โ”€ __init__.py
    โ”‚   โ””โ”€โ”€ services.py
    โ”œโ”€โ”€ domain/
    โ”‚   โ”œโ”€โ”€ __init__.py
    โ”‚   โ”œโ”€โ”€ validators.py
    โ”‚   โ”œโ”€โ”€ selectors.py
    โ”‚   โ””โ”€โ”€ utilities.py
    โ””โ”€โ”€ infrastructure/
        โ”œโ”€โ”€ __init__.py
        โ””โ”€โ”€ models.py

Django Layered Start gives you a robust, SOLIDโ€‘driven foundation from day one โ€” saving time and enforcing best practices in every app you build.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_layered_start-1.1.2.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_layered_start-1.1.2-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file django_layered_start-1.1.2.tar.gz.

File metadata

  • Download URL: django_layered_start-1.1.2.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for django_layered_start-1.1.2.tar.gz
Algorithm Hash digest
SHA256 1c978e88b91c6032a8b4d1455277cff9f64bf5d44318e3cbc98a56a04f218aaf
MD5 bd652e1cc75795435c5af5d1cbdcdf55
BLAKE2b-256 c7dcfa7a0f9788eba6c518175fe59dc3279587166bf33116ae46316d3593f4be

See more details on using hashes here.

File details

Details for the file django_layered_start-1.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for django_layered_start-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 029c69b7684ca297cf64df31a5c9bb345901b0b84756b20711a047cf212d9cff
MD5 fb0808779eb45da839b17f8054809768
BLAKE2b-256 f3bc98a332634a83246c164573a5be69d6b8b8856a30b1e7ba4dc31c24bac10f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page