Commit Graph
270 Commits
Author SHA1 Message Date
sankalp b8564f7780 feat(examples): expand test suiteand improve error handling
New Features
- Added extensive test configurations for Docker, React, Vue, Tailwind, pytest, and various combinations.
- Introduced new scenarios such as docker_react, docker_vue, docker_react_htmx, all_postgres, all_mysql, and unified structures.

Enhancements
- Added missing comma in metadata dictionary for valid syntax.
- Enhanced exception handling to print traceback on errors.
- Updated path formatting to use consistent double‑quoted strings.
- Improved cleanup of test directories and imports.

Bug Fixes
- Fixed syntax error in metadata dict that caused runtime failure.
- Corrected path construction to use forward slashes for cross‑platform compatibility.
2026-05-11 00:50:56 +05:45
sankalp b1c1ea9b15 feat(src/djinit): add Vue scaffolding supportNew Features
- Added `use_vue` flag to enable Vue generation and introduced `create_vue_files()` method that scaffolds Vite/Vue frontend files (vite.config.js, package.json, index.html, App.vue, style.css, main.js).
- Extended context dictionaries in `FileCreator`, utility classes, and Django helper to include `use_vue`.

Enhancements
- Integrated Vue file creation into the setup pipeline via `_create_vue_files()` with success messaging.
- Propagated `use_vue` configuration through serialization and UI feedback.

Bug Fixes
- (none)
2026-05-11 00:30:19 +05:45
sankalp 6baa751543 feat(templates): add Vue.js scaffolding and related template files
Add Vue.js frontend scaffolding to djinit, generating necessary Vue/Vite templates and updating conditionals for use_vue support.

- New Features
  - Add Vue.js template files: index-vue.html-tpl, App.vue-tpl, main.js-tpl, style.css-tpl.
  - Generate package-vue.json-tpl with Vite + Vue dependencies.
  - Create vite-vue.config.js-tpl for Vite configuration.
- Enhancements
  - Update base.py-tpl to conditionally load django-vite when use_vite | use_vue.
  - Add django-vite dependency in requirements-tpl under use_vue.
- Bug Fixes  - None.
2026-05-11 00:30:11 +05:45
sankalp 81830d981b feat(ui): add Vue selection support
Add Vue integration via Vite and update UI prompts and metadata- New Features
  - Introduce `use_vue` flag and corresponding UI confirmation
  - Expose `get_vue_choice()` method and propagate selection through metadata
  - Add console output for Vue confirmation in final summary

- Enhancements
  - Update step ordering and comments to reflect Vue/Vite handling
  - Adjust data flow in code to include Vue option consistently

- Bug Fixes
  - None
2026-05-11 00:30:04 +05:45
sankalp 8e0c014953 feat(root): extend frontendintegration with Vue and add testing framework
Add pytest testing framework and update checklist to include Vue.

New Features
- Add pytest, pytest-django, pytest-cov as testing framework
- Include Vue in Frontend Integration description

Enhancements
- Update checklist entry to reflect Vue inclusion

Bug Fixes
- None
2026-05-11 00:30:01 +05:45
sankalp 2d1b292991 feat(examples): add comprehensive test suite covering all djinit features
New Features
- Added extensive test file examples/test_all.py with full coverage of setup creator scenarios

Enhancements
- None

Bug Fixes
- None
2026-05-11 00:29:56 +05:45
sankalp 500d7469db feat(src/djinit): add pytest integration support
New Features:
- Generate pytest configuration files (pytest.ini, conftest.py) when `use_pytest` is enabled.
- Introduce UI prompt to optionally include pytest.

Enhancements:
- Update metadata and context dictionaries to propagate `use_pytest`.
- Register pytest file creation in the project setup pipeline.
- Reflect pytest inclusion in UI success messages.

Bug Fixes: None.
2026-05-11 00:17:40 +05:45
sankalp 1bb3443237 feat(src/djinit/templates): scaffold pytest fixtures and configuration templates- New Features
- Added conftest.py template with Django test database, API client, and test user fixtures.
  - Added pytest.ini template configuring settings, test discovery, and custom markers.
  - Integrated pytest and coverage requirements into the project requirements template.

- Enhancements
  - None

- Bug Fixes
  - None
2026-05-11 00:17:32 +05:45
sankalp 37d53e7737 feat(src/djinit/utils): add use_pytest flag to DjangoHelper context
Add a boolean `use_pytest` option that is populated from the project metadata and included in the generated Django assistant context. This allows projects to explicitly opt‑in to pytest integration when using djinitx.

- New Feature: Introduce `use_pytest` configuration key in the Django helper metadata dictionary.
- Enhancement: Expand context preparation to support additional project preferences.
2026-05-11 00:17:29 +05:45
sankalp 1b1d038ccd feat(examples): enhance bug_checkand full_test with detailed verification and summary
- New Features:
  - Added comprehensive test runner that cleans up temporary directories, verifies generated files, and prints a pass/fail summary.
  - Introduced specific validation for pytest configuration, Vite integration, and Dockerfile dependencies based on selected metadata.
  - Implemented clear pass/fail reporting with overall success metrics.

- Enhancements:
  - Refactored bug_check.py to use explicit data structures and consistent double‑quote quoting for path construction.
  - Improved formatting and readability of metadata definitions and context preparation.
  - Fixed Windows‑specific path handling regression by switching to double‑quoted string interpolation.

- Bug Fixes:
  - Corrected path building to use double‑quoted strings, preventing potential path parsing issues on Windows.
2026-05-11 00:17:26 +05:45
sankalp 5c05f246b1 feat(root): add Vite+React frontend integration, Vue.js option, and full testing setup
- New Features
  - Add Vite + React frontend integration (updates TODO checklist)
  - Introduce Vue.js as an optional frontend template
  - Enable complete testing framework with pytest, pytest-django, and pytest-cov
- Enhancements
  - Expand project structure templates (Standard, Predefined, Unified, Single)
  - Add interactive configuration wizard
  - Strengthen structure detection and bug fixes
- Bug Fixes
  - Resolve incomplete testing dependencies to ensure full coverage integration
2026-05-11 00:17:20 +05:45
sankalp 16cd1ed510 feat(src/djinit): add Vite and React front‑end scaffolding
The CLI now scaffolds a Vite‑powered frontend when the `use_vite` flag is enabled, providing React entry files, configuration, and basic styling.

- New Features  - Create `vite.config.js`, `package.json`, and core React source files (`main.jsx`, `App.jsx`, `index.jsx`, `index.css`).
  - Add helper methods `_create_vite_files` and `create_vite_files` integrated into project setup.
  - Generate frontend directories and `__init__.py` placeholders automatically.
- Enhancements
  - Propagate `use_vite` context to templates for `requirements.txt`, CI/CD pipelines, and Docker files.
  - Emit success message after Vite files are created.
  - Include Vite‑related checks in setup step list.
- Bug Fixes
  - None reported.
2026-05-10 23:58:28 +05:45
sankalp ad58694206 feat(src/djinit/templates): introduceVite‑powered React frontend scaffold and django‑vite integration
Add a minimal React frontend template (index.html, App.jsx, index.css, main.jsx) and configure static asset handling.
Update Docker Compose to populate DATABASE_URL according to the selected database type.
Include django‑vite in the template requirements and settings.

- New Features
  - Scaffold `frontend` directory with React components and Vite entry point.
  - Configure static URLs, root, and alias via `STATIC_URL`, `STATIC_ROOT`, and `DJANGO_VITE_ASSET_SRC`.
- Enhancements
  - Dynamically set `DATABASE_URL` in `docker-compose.yml` for PostgreSQL or MySQL.
  - Add `django-vite` to `THIRD_PARTY_APPS` and `requirements-tpl`.
- Bug Fixes
  - None.
2026-05-10 23:58:24 +05:45
sankalp 9104b1bd79 feat(root): add new project structures and enhance Docker/frontend support
Summary: Introduced additional project structure templates and expanded Docker, frontend, and Tailwind integrations while fixing bugs.

New Features:
- Docker Support: Auto‑generates Dockerfile, docker-compose.yml, and .dockerignore
- Frontend Integration: Vite/React scaffold via django‑vite (frontend/, vite.config.js, package.json)
- Tailwind CSS: Integrated via django‑tailwind-cli
- HTMX: Integrated via django‑htmx

Enhancements:
- Added more project structure templates (Standard, Predefined, Unified, Single)
- Added interactive configuration wizard
- Improved structure detection
- Fixed bugs (all tests passing, verified issue‑free)
2026-05-10 23:58:17 +05:45
sankalp 0032934ace feat(src/djinit/ui): add Vite/React selection support
- Add `UIFormatter.get_vite_choice()` to prompt inclusion of Vite/React via django‑vite
- Introduce `use_vite` flag in `StructureOptions`, store it in metadata, and propagate to scaffolding templates
- Update CLI prompts and final project summary to display Vite/React confirmation
- Extend usage of the flag throughout app generation to honor the selected frontend stack
2026-05-10 23:58:14 +05:45
sankalp a43e35e925 feat(examples): add bug detection script for djinit templates
This script validates template consistency and metadata usage, ensuring generated configurations are correct across all use‑case combinations. It provides automated checks to catch missing variable replacements, unused metadata fields, and mis‑configured requirements.

- New Features
  - Introduce `check_template_consistency` to detect unreplaced `[[` variables in all templates.
  - Implement `check_metadata_usage` to verify that all metadata flags are correctly applied.
  - Iterate through all feature combinations to test requirements and settings rendering.

- Enhancements  - Added structured console output sections for each generated example file.
  - Integrated explicit error reporting for template rendering failures.

- Bug Fixes
  - (none)
2026-05-10 23:58:12 +05:45
sankalp 8f47506ead feat(src/djinit/core): adduse_docker and use_vite configuration flags
Add `use_docker` and `use_vite` boolean fields to `ProjectMetadata` and include them in the metadata dictionary serialization.

- New feature: expose Docker and Vite enable flags.
- Enhancement: extend metadata output to reflect the new configuration options.
2026-05-10 23:26:43 +05:45
sankalp 6e41e121f0 feat(src/djinit/ui): add docker and vite selection options
This release extends the UI to let users opt‑in to Docker support and Vite integration when generating a Django project.

- New Features
  - Add `use_docker` and `use_vite` fields to `StructureOptions`
  - Implement `get_docker_choice` method with a confirmation prompt- Enhancements
  - Propagate Docker and Vite selections through metadata and CLI prompts  - Include Dockerfile and docker‑compose when Docker is enabled
- Bug Fixes  - (none)
2026-05-10 23:26:41 +05:45
sankalp 7b8d7422a5 feat(root):finalize Docker Support implementation 2026-05-10 23:26:36 +05:45
sankalp 6726298fd8 feat(src/djinit/templates/project): add Dockerfile, docker-compose.yml, and .dockerignore templates
The new templates provide a ready‑to‑use Docker environment for Django projects, including system dependencies, container orchestration, and build‑context exclusions.

New Features
- Dockerfile template with Python 3.13‑slim base, environment variables, apt dependencies, and Gunicorn command.
- docker-compose.yml template with web service and conditional database services (PostgreSQL or MySQL).
- .dockerignore template to exclude irrelevant files and speed up Docker builds.

Enhancements
- Updated .gitignore with Docker‑specific entries to keep repositories clean.

No Bug Fixes.
2026-05-10 23:26:30 +05:45
sankalp 98fe8c7987 feat(src/djinit/creators): add conditional Docker file generation to project scaffolding
Adds creation of Dockerfile, docker-compose.yml, and .dockerignore when `use_docker` metadata is true, integrates the step into the setup pipeline, and registers the task in `SetupCreator`. Enables out‑of‑the‑box Docker support for generated Django projects.

New Features
- Generate Dockerfile, docker-compose.yml, and .dockerignore from templates upon project creation.
- Register Docker file creation step in the setup pipeline and execute only when `use_docker=True`.
- Extend metadata config with `use_docker` flag to control Docker file inclusion.

Enhancements
- Streamline Docker file generation through templated rendering, ensuring a consistent project structure.

Bug Fixes
- None.
2026-05-10 23:26:24 +05:45
sankalp 175592f82a Merge pull request #47 from S4NKALP/dependabot/pip/main/pre-commit-4.6.0 2026-05-04 09:53:37 +05:45
dependabot[bot] 221a5d7d03 chore(deps): bump pre-commit from 4.5.1 to 4.6.0
Bumps [pre-commit](https://github.com/pre-commit/pre-commit) from 4.5.1 to 4.6.0.
- [Release notes](https://github.com/pre-commit/pre-commit/releases)
- [Changelog](https://github.com/pre-commit/pre-commit/blob/main/CHANGELOG.md)
- [Commits](https://github.com/pre-commit/pre-commit/compare/v4.5.1...v4.6.0)

---
updated-dependencies:
- dependency-name: pre-commit
  dependency-version: 4.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-04 04:08:22 +00:00
sankalp fde8c0b5e2 Merge pull request #46 from S4NKALP/dependabot/pip/main/ruff-0.15.12 2026-05-04 09:52:12 +05:45
dependabot[bot] fb48a7bd17 chore(deps): bump ruff from 0.15.11 to 0.15.12
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.15.11 to 0.15.12.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/0.15.11...0.15.12)

---
updated-dependencies:
- dependency-name: ruff
  dependency-version: 0.15.12
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-27 02:30:21 +00:00
sankalp 2b1f562649 bump to 0.3.4 0.3.4 2026-04-22 19:27:55 +05:45
sankalp 0ce6342ca7 Merge branch 'main' of github.com:S4NKALP/djinit 2026-04-22 19:22:43 +05:45
sankalp 0c7b007729 feat(src/djinit/templates/project): update frontend URL to HTTPS and add www subdomain
Enhancements
- Replace http://frontend.your-domain.com with https://frontend.your-domain.com,www.frontend.your-domain.com in env_sample-tpl to reflect modern HTTPS usage.
2026-04-22 19:22:10 +05:45
sankalp eaddc4576d Merge pull request #45 from S4NKALP/dev 2026-04-20 14:54:57 +05:45
sankalp d741249644 feat(templates): add Tailwind and HTMX integration and fix static/media URLs
Introduce Tailwind and HTMX support with conditional placeholders and correct static/media URL prefixes.

- New Features
  - Add django_tailwind_cli and django_htmx when enabled
  - Add HtmxMiddleware to middleware stack
  - Pin Tailwind CLI version and set distribution CSS path in production
  - Configure Tailwind theme and daisyui settings
- Enhancements
  - Prefix STATIC_URL and MEDIA_URL with '/' for proper URL handling
  - Update requirements templates with new optional dependencies
  - Expand pyproject.toml metadata and dependency groups
- Bug Fixes
  - Fix missing leading slash in STATIC_URL and MEDIA_URL
  - Pin Tailwind CLI version to avoid unexpected upgrades
2026-04-20 14:44:10 +05:45
sankalp dee852efb9 feat(src/djinit/core): add Tailwind and HTMX configuration flags to ProjectMetadata
**New Features**
- Add `use_tailwind` and `use_htmx` boolean fields to `ProjectMetadata` with defaults set to `False`.
- Update `ProjectMetadata.__init__` mapping to include these new attributes, ensuring they are persisted in project metadata.
2026-04-20 14:44:06 +05:45
sankalp fc93a54430 feat(src/djinit/creators): add Tailwind and HTMX toggles to generated settings
Add configurable `use_tailwind` and `use_htmx` flags to the Django starter project context, allowing users to optionally include Tailwind CSS and HTMX JavaScript libraries.

- New Features:
  - Introduce `use_tailwind` and `use_htmx` metadata flags in `base_settings_context`.
  - Propagate these flags to `requirements.txt`, generated `settings.py`, and CI configuration templates.
- Enhancements:
  - Ensure the flags are consistently available across all templated files.
- Bug Fixes: None.
2026-04-20 14:44:04 +05:45
sankalp 04c911c3d9 feat(src/djinit/utils): add use_tailwind and use_htmx configuration flags
New Features:
- Add `use_tailwind` metadata option (default False) for Tailwind CSS support.
- Add `use_htmx` metadata option (default False) for HTMX support.

Enhancements:
- Extend DjangoHelper context to include the new flags in generated settings.
2026-04-20 14:43:59 +05:45
sankalp 8bb81a1a38 feat(src/djinit/ui): addTailwind CSS and HTMX selection support
- New Features:
  - Add `use_tailwind` and `use_htmx` fields to `StructureOptions` and expose confirmation prompts via `get_tailwind_choice` and `get_htmx_choice`.
  - Persist these selections in the generated metadata and pass them through the initialization flow.
- Enhancements:
  - Include `use_tailwind` and `use_htmx` values when constructing the metadata dictionary.
  - Display Tailwind CSS and HTMX choices in the final confirmation output.
- Bug Fixes: none
2026-04-20 14:43:54 +05:45
sankalp 5013c1a31a feat(src/djinit/templates/config/settings): introduce explicit storage configuration
* New Features
  * Replace the singular `STATICFILES_STORAGE` assignment with a `STORAGES` dictionary defining `default` and `staticfiles` backends.

* Enhancements
  * Add `DEFAULT_AUTO_FIELD` setting for consistency with recent Django recommendations.
  * Make storage backend definitions clearer and more extensible.

* Bug Fixes
  * None.
2026-04-20 14:28:09 +05:45
sankalp d79698cfb4 feat(src/djinit/templates/project): bump target-version to py313
Why: enable support for Python 3.13.

New Features
- Updated pyproject.toml template to target Python 3.13, allowing builds with newer interpreters.

Enhancements
- Improves compatibility with upcoming Python releases.
2026-04-20 14:28:05 +05:45
sankalp e5f77143bf feat(src/djinit/utils): add get_full_app_config_path static method to compute full AppConfig pathAdd a static method get_full_app_config_path that builds the full path to an AppConfig class, handling nested app structures and module resolution. Improves reliability of AppConfig path calculation.
- New Features
  - Added `get_full_app_config_path` method to generate full AppConfig paths.
- Enhancements
  - Centralized AppConfig path calculation logic using existing `calculate_app_module_path`.
- Bug Fixes
  - None
2026-04-20 14:27:59 +05:45
sankalp 7d91c037ca feat(src/djinit/creators): add unified URL registration and AppConfig path handling
- New Features: Automatically include app URLs in project urls.py and api/v1/urls.py; Generate full AppConfig paths using a unified utility
- Enhancements: Improved nested-app detection and path resolution across predefined, standard, single, and unified structures; Refined context transformation for base settings; Updated URL template rendering
- Bug Fixes: Fixed duplicate include‑statement handling; Corrected URL update error paths and exception safety
2026-04-20 14:27:53 +05:45
sankalp ee0b22f2ae feat(src/djinit/creators): add API v1 URL integration for predefined structures and enhance context variables
- Add conditional logic to `_add_to_api_v1_urls` when `structure_type` is `"predefined"`
- Include `module_name` in contexts for `justfile` and `Procfile` templates
- Clarify `module_name` usage in `.env.sample` generation comment
2026-04-20 14:24:38 +05:45
sankalp 4c40dd21fd fix(src/djinit/templates/project): update template placeholders and dependency references
New Features
- Replace double‑curly placeholder syntax with direct variable usage in justfile and procfile templates.

Enhancements
- Change psycopg2-binary to psycopg[binary] in pyproject.toml template.
- Update ruff.isort known‑first‑party from project_name to module_name.
- Adjust server commands to reference module_name placeholder and use variable syntax directly.

Bug Fixes- Fix placeholder expansion in dev‑server, makemigrations, install, and remove commands.
- Correct requirements generation script to handle missing pyproject.toml gracefully.
- Resolve incorrect variable substitution in gunicorn bind commands and worker count references.
2026-04-20 14:24:27 +05:45
sankalp 09fa597215 fix(ci): correct Python version and Django settings variable interpolation
- Bug Fixes:
  - Fixed Jinja syntax in GitHub Actions workflow (removed extraneous {{ }} around matrix.python-version).
  - Updated DJANGO_SETTINGS_MODULE placeholder from [[ project_name ]] to [[ module_name ]] in GitLab CI template.
2026-04-20 14:24:20 +05:45
sankalp 123141bd32 feat(src/djinit/creators): add use_database_url flag for pyproject.toml
Why: expose ability to toggle usage of DATABASE_URL in generated configuration.

New Features
- Add configurable `use_database_url` parameter to control inclusion of DATABASE_URL in generated pyproject.toml.

Enhancements
- Increase flexibility of database configuration for generated Django projects.

Bug Fixes
- (none)
2026-04-20 14:12:12 +05:45
sankalp 72fc023fd3 feat(src/djinit/templates/config/settings): add DATABASE_URL support via dj_database_url
Add conditional import of `dj_database_url` and a directive comment for `use_database_url` to enable automatic database configuration when the `use_database_url` flag is set, improving flexibility of the production settings template.

- New Features: Introduce support for reading `DATABASE_URL` to configure Django databases automatically.
- Enhancements: Conditional import improves template modularity and reduces unnecessary dependencies.
- Bug Fixes: None.
2026-04-20 14:12:07 +05:45
sankalp c4f66d607b feat(src/djinit/templates/project): update env template placeholder and add optional database URL dependency
New Features
- Add optional `dj-database-url` dependency for database URL support.

Enhancements
- Replace `{{ project_name }}` with `[[ project_name ]]` in the env template for clearer interpolation.

Bug Fixes
- None
2026-04-20 14:12:05 +05:45
sankalp 0a4aa2c39a Merge pull request #43 from S4NKALP/dependabot/pip/main/ruff-0.15.11 2026-04-20 14:06:23 +05:45
dependabot[bot] aba0a8f6f7 chore(deps): bump ruff from 0.15.10 to 0.15.11
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.15.10 to 0.15.11.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/0.15.10...0.15.11)

---
updated-dependencies:
- dependency-name: ruff
  dependency-version: 0.15.11
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-20 02:29:03 +00:00
sankalp 415a7c2ea5 Merge pull request #42 from S4NKALP/dependabot/pip/main/rich-15.0.0 2026-04-13 12:04:37 +05:45
sankalp 2895635c99 Merge pull request #41 from S4NKALP/dependabot/pip/main/ruff-0.15.10 2026-04-13 12:04:26 +05:45
dependabot[bot] 55a20639de chore(deps): bump rich from 14.3.3 to 15.0.0
Bumps [rich](https://github.com/Textualize/rich) from 14.3.3 to 15.0.0.
- [Release notes](https://github.com/Textualize/rich/releases)
- [Changelog](https://github.com/Textualize/rich/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Textualize/rich/compare/v14.3.3...v15.0.0)

---
updated-dependencies:
- dependency-name: rich
  dependency-version: 15.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-13 02:28:18 +00:00
dependabot[bot] 6668365df4 chore(deps): bump ruff from 0.15.9 to 0.15.10
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.15.9 to 0.15.10.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/0.15.9...0.15.10)

---
updated-dependencies:
- dependency-name: ruff
  dependency-version: 0.15.10
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-13 02:28:13 +00:00