stackforge-cli 0.1.3__tar.gz → 0.1.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. {stackforge_cli-0.1.3 → stackforge_cli-0.1.5}/PKG-INFO +109 -107
  2. {stackforge_cli-0.1.3 → stackforge_cli-0.1.5}/README.md +92 -92
  3. {stackforge_cli-0.1.3 → stackforge_cli-0.1.5}/pyproject.toml +38 -27
  4. {stackforge_cli-0.1.3 → stackforge_cli-0.1.5}/setup.cfg +4 -4
  5. {stackforge_cli-0.1.3 → stackforge_cli-0.1.5}/src/stackforge/engines/dotnet/__init__.py +7 -7
  6. stackforge_cli-0.1.5/src/stackforge/engines/dotnet/api_generator.py +39 -0
  7. stackforge_cli-0.1.5/src/stackforge/engines/dotnet/config_generator.py +20 -0
  8. {stackforge_cli-0.1.3 → stackforge_cli-0.1.5}/src/stackforge/engines/dotnet/csproj_generator.py +82 -82
  9. stackforge_cli-0.1.5/src/stackforge/engines/dotnet/docker_generator.py +15 -0
  10. {stackforge_cli-0.1.3 → stackforge_cli-0.1.5}/src/stackforge/engines/dotnet/git_generator.py +77 -111
  11. stackforge_cli-0.1.5/src/stackforge/engines/dotnet/layers_generator.py +103 -0
  12. stackforge_cli-0.1.5/src/stackforge/engines/dotnet/program_generator.py +21 -0
  13. {stackforge_cli-0.1.3 → stackforge_cli-0.1.5}/src/stackforge/engines/dotnet/scaffolder.py +74 -74
  14. {stackforge_cli-0.1.3 → stackforge_cli-0.1.5}/src/stackforge/project_name.py +34 -34
  15. {stackforge_cli-0.1.3 → stackforge_cli-0.1.5}/src/stackforge/scaffold.py +90 -90
  16. stackforge_cli-0.1.5/src/stackforge/templates/dotnet/API/Configurations/Swagger/ApiRoles.cs.tmpl +9 -0
  17. stackforge_cli-0.1.5/src/stackforge/templates/dotnet/API/ConfigureServices.cs.tmpl +120 -0
  18. stackforge_cli-0.1.5/src/stackforge/templates/dotnet/API/Controllers/BaseApiController.cs.tmpl +24 -0
  19. stackforge_cli-0.1.5/src/stackforge/templates/dotnet/API/Controllers/Main/AccountController.cs.tmpl +68 -0
  20. stackforge_cli-0.1.5/src/stackforge/templates/dotnet/API/DTOs/AccountDTOs.cs.tmpl +23 -0
  21. stackforge_cli-0.1.5/src/stackforge/templates/dotnet/API/Interface/IJwtService.cs.tmpl +7 -0
  22. stackforge_cli-0.1.5/src/stackforge/templates/dotnet/API/Options/JwtOptions.cs.tmpl +10 -0
  23. stackforge_cli-0.1.5/src/stackforge/templates/dotnet/API/Program.cs.tmpl +45 -0
  24. stackforge_cli-0.1.5/src/stackforge/templates/dotnet/API/Properties/launchSettings.json.tmpl +31 -0
  25. stackforge_cli-0.1.5/src/stackforge/templates/dotnet/API/Services/JwtService.cs.tmpl +41 -0
  26. stackforge_cli-0.1.5/src/stackforge/templates/dotnet/API/Swagger/EnumMemberSchemaFilter.cs.tmpl +25 -0
  27. stackforge_cli-0.1.5/src/stackforge/templates/dotnet/API/appsettings.Development.json.tmpl +17 -0
  28. stackforge_cli-0.1.5/src/stackforge/templates/dotnet/API/appsettings.json.tmpl +18 -0
  29. stackforge_cli-0.1.5/src/stackforge/templates/dotnet/Application/Common/Behaviors/ValidationBehavior.cs.tmpl +29 -0
  30. stackforge_cli-0.1.5/src/stackforge/templates/dotnet/Application/Common/Constants/ErrorMessages.cs.tmpl +10 -0
  31. stackforge_cli-0.1.5/src/stackforge/templates/dotnet/Application/Common/Exceptions/AppExceptions.cs.tmpl +12 -0
  32. stackforge_cli-0.1.5/src/stackforge/templates/dotnet/Application/Common/Exceptions/NotFoundException.cs.tmpl +10 -0
  33. stackforge_cli-0.1.5/src/stackforge/templates/dotnet/Application/Common/Models/ApiResponse.cs.tmpl +15 -0
  34. stackforge_cli-0.1.5/src/stackforge/templates/dotnet/Application/Common/Models/PagedList.cs.tmpl +30 -0
  35. stackforge_cli-0.1.5/src/stackforge/templates/dotnet/Application/Common/Models/PagedResponse.cs.tmpl +13 -0
  36. stackforge_cli-0.1.5/src/stackforge/templates/dotnet/Application/Common/Models/PaginatedResult.cs.tmpl +13 -0
  37. stackforge_cli-0.1.5/src/stackforge/templates/dotnet/Application/Common/Models/PagingParams.cs.tmpl +8 -0
  38. stackforge_cli-0.1.5/src/stackforge/templates/dotnet/Application/Common/Models/Result.cs.tmpl +30 -0
  39. stackforge_cli-0.1.5/src/stackforge/templates/dotnet/Application/Common/Models/Serialization/IsoDateTime.cs.tmpl +14 -0
  40. stackforge_cli-0.1.5/src/stackforge/templates/dotnet/Application/ConfigureServices.cs.tmpl +22 -0
  41. stackforge_cli-0.1.5/src/stackforge/templates/dotnet/Dockerfile.tmpl +8 -0
  42. stackforge_cli-0.1.5/src/stackforge/templates/dotnet/Domain/Common/BaseEntity.cs.tmpl +9 -0
  43. stackforge_cli-0.1.5/src/stackforge/templates/dotnet/Domain/Common/EnumMemberExtensions.cs.tmpl +16 -0
  44. stackforge_cli-0.1.5/src/stackforge/templates/dotnet/Domain/Entities/Identity/Role.cs.tmpl +9 -0
  45. stackforge_cli-0.1.5/src/stackforge/templates/dotnet/Domain/Entities/Identity/User.cs.tmpl +13 -0
  46. stackforge_cli-0.1.5/src/stackforge/templates/dotnet/Domain/Entities/Identity/UserRole.cs.tmpl +10 -0
  47. stackforge_cli-0.1.5/src/stackforge/templates/dotnet/Domain/GlobalUsings.cs.tmpl +2 -0
  48. stackforge_cli-0.1.5/src/stackforge/templates/dotnet/Infrastructure/ConfigureServices.cs.tmpl +14 -0
  49. stackforge_cli-0.1.5/src/stackforge/templates/dotnet/Persistence/Configurations/UserRoleConfiguration.cs.tmpl +24 -0
  50. stackforge_cli-0.1.5/src/stackforge/templates/dotnet/Persistence/ConfigureServices.cs.tmpl +18 -0
  51. stackforge_cli-0.1.5/src/stackforge/templates/dotnet/Persistence/DataContext.cs.tmpl +36 -0
  52. stackforge_cli-0.1.5/src/stackforge/templates/dotnet/Persistence/Seeders/RoleSeeder.cs.tmpl +19 -0
  53. stackforge_cli-0.1.5/src/stackforge/templates/dotnet/Persistence/Seeders/UserSeeder.cs.tmpl +28 -0
  54. stackforge_cli-0.1.5/src/stackforge/templates/dotnet/docker-compose.yml.tmpl +36 -0
  55. stackforge_cli-0.1.5/src/stackforge/templates/dotnet/dot_env.tmpl +10 -0
  56. stackforge_cli-0.1.5/src/stackforge/templates/dotnet/dot_github/workflows/sync-branches.yml.tmpl +29 -0
  57. stackforge_cli-0.1.5/src/stackforge/templates/dotnet/dot_gitignore.tmpl +15 -0
  58. stackforge_cli-0.1.5/src/stackforge/templating.py +39 -0
  59. {stackforge_cli-0.1.3 → stackforge_cli-0.1.5}/src/stackforge/ui.py +72 -72
  60. {stackforge_cli-0.1.3 → stackforge_cli-0.1.5}/src/stackforge/version.py +48 -48
  61. {stackforge_cli-0.1.3 → stackforge_cli-0.1.5}/src/stackforge_cli.egg-info/PKG-INFO +109 -107
  62. stackforge_cli-0.1.5/src/stackforge_cli.egg-info/SOURCES.txt +68 -0
  63. stackforge_cli-0.1.5/src/stackforge_cli.egg-info/requires.txt +4 -0
  64. {stackforge_cli-0.1.3 → stackforge_cli-0.1.5}/src/stackforge_cli.egg-info/top_level.txt +0 -1
  65. stackforge_cli-0.1.5/tests/test_dotnet_scaffold.py +104 -0
  66. stackforge_cli-0.1.5/tests/test_project_name.py +31 -0
  67. stackforge_cli-0.1.5/tests/test_templating.py +27 -0
  68. stackforge_cli-0.1.3/src/stackforge/engines/dotnet/api_generator.py +0 -313
  69. stackforge_cli-0.1.3/src/stackforge/engines/dotnet/config_generator.py +0 -77
  70. stackforge_cli-0.1.3/src/stackforge/engines/dotnet/docker_generator.py +0 -64
  71. stackforge_cli-0.1.3/src/stackforge/engines/dotnet/layers_generator.py +0 -544
  72. stackforge_cli-0.1.3/src/stackforge/engines/dotnet/program_generator.py +0 -195
  73. stackforge_cli-0.1.3/src/stackforge_cli.egg-info/SOURCES.txt +0 -22
  74. stackforge_cli-0.1.3/src/stackforge_cli.egg-info/requires.txt +0 -1
  75. {stackforge_cli-0.1.3 → stackforge_cli-0.1.5}/src/stackforge/__init__.py +0 -0
  76. {stackforge_cli-0.1.3 → stackforge_cli-0.1.5}/src/stackforge_cli.egg-info/dependency_links.txt +0 -0
  77. {stackforge_cli-0.1.3 → stackforge_cli-0.1.5}/src/stackforge_cli.egg-info/entry_points.txt +0 -0
@@ -1,107 +1,109 @@
1
- Metadata-Version: 2.4
2
- Name: stackforge-cli
3
- Version: 0.1.3
4
- Summary: A CLI scaffolder for .NET Clean Architecture projects
5
- License: MIT
6
- Keywords: scaffolder,dotnet,clean-architecture,cli
7
- Classifier: Programming Language :: Python :: 3
8
- Classifier: License :: OSI Approved :: MIT License
9
- Classifier: Operating System :: OS Independent
10
- Classifier: Environment :: Console
11
- Requires-Python: >=3.10
12
- Description-Content-Type: text/markdown
13
- Requires-Dist: colorama>=0.4.6
14
-
15
- # StackForge
16
-
17
- A CLI scaffolder for .NET Clean Architecture (CQRS) projects.
18
-
19
- ## Installation
20
-
21
- ```bash
22
- pip install stackforge-cli
23
- ```
24
-
25
- ## Usage
26
-
27
- ```bash
28
- stackforge
29
- ```
30
-
31
- Then follow the prompts to scaffold a new project.
32
-
33
- ## Version and updates
34
-
35
- Check the version you have installed:
36
-
37
- ```bash
38
- stackforge --version
39
- ```
40
-
41
- Update to the latest release:
42
-
43
- ```bash
44
- pip install --upgrade stackforge-cli
45
- ```
46
-
47
- When you run `stackforge`, it checks PyPI for a newer version and prints an upgrade notice if one is available (network required; fails silently if offline).
48
-
49
- ## What it generates
50
-
51
- - .NET 10 Clean Architecture structure (API, Application, Domain, Infrastructure, Persistence)
52
- - JWT authentication with ASP.NET Identity
53
- - Swagger UI with Bearer token support
54
- - PostgreSQL with EF Core
55
- - Docker + docker-compose with healthchecks
56
- - Role and user seeders (SuperAdmin out of the box)
57
- - Git initialization on `main` with `staging` and `development` branches
58
- - GitHub Actions workflow to create `staging` and `development` on first push to `main`
59
-
60
- ## Quickstart after scaffolding
61
-
62
- 1. Open the project in VS Code or Visual Studio
63
- 2. Run: `docker-compose up --build`
64
- 3. Visit: `http://localhost:5000/swagger`
65
-
66
- ## Git workflow
67
-
68
- Each scaffolded project is initialized with three local branches:
69
-
70
- | Branch | Purpose |
71
- |---------------|----------------------------------|
72
- | `main` | Production / default branch |
73
- | `staging` | Pre-production environment |
74
- | `development` | Active development environment |
75
-
76
- A GitHub Actions workflow (`.github/workflows/sync-branches.yml`) is also included as a fallback: if you only push `main` first, it creates remote `staging` and `development` on GitHub automatically.
77
-
78
- ### Example: push to GitHub
79
-
80
- From your scaffolded project directory (e.g. `~/stackforge/MyApi`):
81
-
82
- ```bash
83
- # 1. Create a new repo on GitHub (empty, no README), then add the remote
84
- git remote add origin https://github.com/<your-user>/MyApi.git
85
-
86
- # 2. Push all branches in one go
87
- git push -u origin --all
88
- ```
89
-
90
- That publishes `main`, `staging`, and `development` in a single command and sets upstream tracking for each.
91
-
92
- ### Day-to-day branching
93
-
94
- ```bash
95
- # Work on a feature
96
- git checkout development
97
- git checkout -b feature/my-feature
98
- # ... commit changes ...
99
- git push -u origin feature/my-feature
100
-
101
- # Merge into development when ready (via PR or locally)
102
- git checkout development
103
- git merge feature/my-feature
104
- git push origin development
105
- ```
106
-
107
- Promote changes up the chain (`development` → `staging` → `main`) using pull requests or merges as your team prefers.
1
+ Metadata-Version: 2.4
2
+ Name: stackforge-cli
3
+ Version: 0.1.5
4
+ Summary: A CLI scaffolder for .NET Clean Architecture projects
5
+ License: MIT
6
+ Keywords: scaffolder,dotnet,clean-architecture,cli
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: License :: OSI Approved :: MIT License
9
+ Classifier: Operating System :: OS Independent
10
+ Classifier: Environment :: Console
11
+ Requires-Python: >=3.10
12
+ Description-Content-Type: text/markdown
13
+ Requires-Dist: colorama>=0.4.6
14
+ Provides-Extra: test
15
+ Requires-Dist: pytest>=8; extra == "test"
16
+
17
+ # StackForge
18
+
19
+ A CLI scaffolder for .NET Clean Architecture (CQRS) projects.
20
+
21
+ ## Installation
22
+
23
+ ```bash
24
+ pip install stackforge-cli
25
+ ```
26
+
27
+ ## Usage
28
+
29
+ ```bash
30
+ stackforge
31
+ ```
32
+
33
+ Then follow the prompts to scaffold a new project.
34
+
35
+ ## Version and updates
36
+
37
+ Check the version you have installed:
38
+
39
+ ```bash
40
+ stackforge --version
41
+ ```
42
+
43
+ Update to the latest release:
44
+
45
+ ```bash
46
+ pip install --upgrade stackforge-cli
47
+ ```
48
+
49
+ When you run `stackforge`, it checks PyPI for a newer version and prints an upgrade notice if one is available (network required; fails silently if offline).
50
+
51
+ ## What it generates
52
+
53
+ - .NET 10 Clean Architecture structure (API, Application, Domain, Infrastructure, Persistence)
54
+ - JWT authentication with ASP.NET Identity
55
+ - Swagger UI with Bearer token support
56
+ - PostgreSQL with EF Core
57
+ - Docker + docker-compose with healthchecks
58
+ - Role and user seeders (SuperAdmin out of the box)
59
+ - Git initialization on `main` with `staging` and `development` branches
60
+ - GitHub Actions workflow to create `staging` and `development` on first push to `main`
61
+
62
+ ## Quickstart after scaffolding
63
+
64
+ 1. Open the project in VS Code or Visual Studio
65
+ 2. Run: `docker-compose up --build`
66
+ 3. Visit: `http://localhost:5000/swagger`
67
+
68
+ ## Git workflow
69
+
70
+ Each scaffolded project is initialized with three local branches:
71
+
72
+ | Branch | Purpose |
73
+ |---------------|----------------------------------|
74
+ | `main` | Production / default branch |
75
+ | `staging` | Pre-production environment |
76
+ | `development` | Active development environment |
77
+
78
+ A GitHub Actions workflow (`.github/workflows/sync-branches.yml`) is also included as a fallback: if you only push `main` first, it creates remote `staging` and `development` on GitHub automatically.
79
+
80
+ ### Example: push to GitHub
81
+
82
+ From your scaffolded project directory (e.g. `~/stackforge/MyApi`):
83
+
84
+ ```bash
85
+ # 1. Create a new repo on GitHub (empty, no README), then add the remote
86
+ git remote add origin https://github.com/<your-user>/MyApi.git
87
+
88
+ # 2. Push all branches in one go
89
+ git push -u origin --all
90
+ ```
91
+
92
+ That publishes `main`, `staging`, and `development` in a single command and sets upstream tracking for each.
93
+
94
+ ### Day-to-day branching
95
+
96
+ ```bash
97
+ # Work on a feature
98
+ git checkout development
99
+ git checkout -b feature/my-feature
100
+ # ... commit changes ...
101
+ git push -u origin feature/my-feature
102
+
103
+ # Merge into development when ready (via PR or locally)
104
+ git checkout development
105
+ git merge feature/my-feature
106
+ git push origin development
107
+ ```
108
+
109
+ Promote changes up the chain (`development` → `staging` → `main`) using pull requests or merges as your team prefers.
@@ -1,93 +1,93 @@
1
- # StackForge
2
-
3
- A CLI scaffolder for .NET Clean Architecture (CQRS) projects.
4
-
5
- ## Installation
6
-
7
- ```bash
8
- pip install stackforge-cli
9
- ```
10
-
11
- ## Usage
12
-
13
- ```bash
14
- stackforge
15
- ```
16
-
17
- Then follow the prompts to scaffold a new project.
18
-
19
- ## Version and updates
20
-
21
- Check the version you have installed:
22
-
23
- ```bash
24
- stackforge --version
25
- ```
26
-
27
- Update to the latest release:
28
-
29
- ```bash
30
- pip install --upgrade stackforge-cli
31
- ```
32
-
33
- When you run `stackforge`, it checks PyPI for a newer version and prints an upgrade notice if one is available (network required; fails silently if offline).
34
-
35
- ## What it generates
36
-
37
- - .NET 10 Clean Architecture structure (API, Application, Domain, Infrastructure, Persistence)
38
- - JWT authentication with ASP.NET Identity
39
- - Swagger UI with Bearer token support
40
- - PostgreSQL with EF Core
41
- - Docker + docker-compose with healthchecks
42
- - Role and user seeders (SuperAdmin out of the box)
43
- - Git initialization on `main` with `staging` and `development` branches
44
- - GitHub Actions workflow to create `staging` and `development` on first push to `main`
45
-
46
- ## Quickstart after scaffolding
47
-
48
- 1. Open the project in VS Code or Visual Studio
49
- 2. Run: `docker-compose up --build`
50
- 3. Visit: `http://localhost:5000/swagger`
51
-
52
- ## Git workflow
53
-
54
- Each scaffolded project is initialized with three local branches:
55
-
56
- | Branch | Purpose |
57
- |---------------|----------------------------------|
58
- | `main` | Production / default branch |
59
- | `staging` | Pre-production environment |
60
- | `development` | Active development environment |
61
-
62
- A GitHub Actions workflow (`.github/workflows/sync-branches.yml`) is also included as a fallback: if you only push `main` first, it creates remote `staging` and `development` on GitHub automatically.
63
-
64
- ### Example: push to GitHub
65
-
66
- From your scaffolded project directory (e.g. `~/stackforge/MyApi`):
67
-
68
- ```bash
69
- # 1. Create a new repo on GitHub (empty, no README), then add the remote
70
- git remote add origin https://github.com/<your-user>/MyApi.git
71
-
72
- # 2. Push all branches in one go
73
- git push -u origin --all
74
- ```
75
-
76
- That publishes `main`, `staging`, and `development` in a single command and sets upstream tracking for each.
77
-
78
- ### Day-to-day branching
79
-
80
- ```bash
81
- # Work on a feature
82
- git checkout development
83
- git checkout -b feature/my-feature
84
- # ... commit changes ...
85
- git push -u origin feature/my-feature
86
-
87
- # Merge into development when ready (via PR or locally)
88
- git checkout development
89
- git merge feature/my-feature
90
- git push origin development
91
- ```
92
-
1
+ # StackForge
2
+
3
+ A CLI scaffolder for .NET Clean Architecture (CQRS) projects.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pip install stackforge-cli
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```bash
14
+ stackforge
15
+ ```
16
+
17
+ Then follow the prompts to scaffold a new project.
18
+
19
+ ## Version and updates
20
+
21
+ Check the version you have installed:
22
+
23
+ ```bash
24
+ stackforge --version
25
+ ```
26
+
27
+ Update to the latest release:
28
+
29
+ ```bash
30
+ pip install --upgrade stackforge-cli
31
+ ```
32
+
33
+ When you run `stackforge`, it checks PyPI for a newer version and prints an upgrade notice if one is available (network required; fails silently if offline).
34
+
35
+ ## What it generates
36
+
37
+ - .NET 10 Clean Architecture structure (API, Application, Domain, Infrastructure, Persistence)
38
+ - JWT authentication with ASP.NET Identity
39
+ - Swagger UI with Bearer token support
40
+ - PostgreSQL with EF Core
41
+ - Docker + docker-compose with healthchecks
42
+ - Role and user seeders (SuperAdmin out of the box)
43
+ - Git initialization on `main` with `staging` and `development` branches
44
+ - GitHub Actions workflow to create `staging` and `development` on first push to `main`
45
+
46
+ ## Quickstart after scaffolding
47
+
48
+ 1. Open the project in VS Code or Visual Studio
49
+ 2. Run: `docker-compose up --build`
50
+ 3. Visit: `http://localhost:5000/swagger`
51
+
52
+ ## Git workflow
53
+
54
+ Each scaffolded project is initialized with three local branches:
55
+
56
+ | Branch | Purpose |
57
+ |---------------|----------------------------------|
58
+ | `main` | Production / default branch |
59
+ | `staging` | Pre-production environment |
60
+ | `development` | Active development environment |
61
+
62
+ A GitHub Actions workflow (`.github/workflows/sync-branches.yml`) is also included as a fallback: if you only push `main` first, it creates remote `staging` and `development` on GitHub automatically.
63
+
64
+ ### Example: push to GitHub
65
+
66
+ From your scaffolded project directory (e.g. `~/stackforge/MyApi`):
67
+
68
+ ```bash
69
+ # 1. Create a new repo on GitHub (empty, no README), then add the remote
70
+ git remote add origin https://github.com/<your-user>/MyApi.git
71
+
72
+ # 2. Push all branches in one go
73
+ git push -u origin --all
74
+ ```
75
+
76
+ That publishes `main`, `staging`, and `development` in a single command and sets upstream tracking for each.
77
+
78
+ ### Day-to-day branching
79
+
80
+ ```bash
81
+ # Work on a feature
82
+ git checkout development
83
+ git checkout -b feature/my-feature
84
+ # ... commit changes ...
85
+ git push -u origin feature/my-feature
86
+
87
+ # Merge into development when ready (via PR or locally)
88
+ git checkout development
89
+ git merge feature/my-feature
90
+ git push origin development
91
+ ```
92
+
93
93
  Promote changes up the chain (`development` → `staging` → `main`) using pull requests or merges as your team prefers.
@@ -1,27 +1,38 @@
1
- [build-system]
2
- requires = ["setuptools>=68", "wheel"]
3
- build-backend = "setuptools.build_meta"
4
-
5
- [project]
6
- name = "stackforge-cli"
7
- version = "0.1.3"
8
- description = "A CLI scaffolder for .NET Clean Architecture projects"
9
- readme = "README.md"
10
- requires-python = ">=3.10"
11
- license = { text = "MIT" }
12
- keywords = ["scaffolder", "dotnet", "clean-architecture", "cli"]
13
- classifiers = [
14
- "Programming Language :: Python :: 3",
15
- "License :: OSI Approved :: MIT License",
16
- "Operating System :: OS Independent",
17
- "Environment :: Console",
18
- ]
19
- dependencies = [
20
- "colorama>=0.4.6",
21
- ]
22
-
23
- [project.scripts]
24
- stackforge = "stackforge.scaffold:main"
25
-
26
- [tool.setuptools.packages.find]
27
- where = ["src"]
1
+ [build-system]
2
+ requires = ["setuptools>=68", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "stackforge-cli"
7
+ version = "0.1.5"
8
+ description = "A CLI scaffolder for .NET Clean Architecture projects"
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ license = { text = "MIT" }
12
+ keywords = ["scaffolder", "dotnet", "clean-architecture", "cli"]
13
+ classifiers = [
14
+ "Programming Language :: Python :: 3",
15
+ "License :: OSI Approved :: MIT License",
16
+ "Operating System :: OS Independent",
17
+ "Environment :: Console",
18
+ ]
19
+ dependencies = [
20
+ "colorama>=0.4.6",
21
+ ]
22
+
23
+ [project.optional-dependencies]
24
+ test = ["pytest>=8"]
25
+
26
+ [project.scripts]
27
+ stackforge = "stackforge.scaffold:main"
28
+
29
+ [tool.setuptools.packages.find]
30
+ where = ["src"]
31
+
32
+ [tool.setuptools.package-data]
33
+ stackforge = ["templates/**/*.tmpl"]
34
+
35
+ [tool.pytest.ini_options]
36
+ testpaths = ["tests"]
37
+ pythonpath = ["src", "tests"]
38
+ markers = ["dotnet: builds the generated solution with the .NET SDK (slow)"]
@@ -1,4 +1,4 @@
1
- [egg_info]
2
- tag_build =
3
- tag_date = 0
4
-
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -1,8 +1,8 @@
1
- from .scaffolder import scaffold_folders
2
- from .csproj_generator import generate_csproj
3
- from .program_generator import generate_configure_services, generate_program_cs
4
- from .docker_generator import generate_dockerfile, generate_docker_compose
5
- from .config_generator import generate_env, generate_appsettings, generate_appsettings_development
6
- from .git_generator import generate_gitignore, generate_github_workflow, git_init
7
- from .api_generator import generate_api_structure
1
+ from .scaffolder import scaffold_folders
2
+ from .csproj_generator import generate_csproj
3
+ from .program_generator import generate_configure_services, generate_program_cs
4
+ from .docker_generator import generate_dockerfile, generate_docker_compose
5
+ from .config_generator import generate_env, generate_appsettings, generate_appsettings_development
6
+ from .git_generator import generate_gitignore, generate_github_workflow, git_init
7
+ from .api_generator import generate_api_structure
8
8
  from .layers_generator import generate_domain_layer, generate_application_layer, generate_infrastructure_layer, generate_persistence_layer
@@ -0,0 +1,39 @@
1
+ from pathlib import Path
2
+ from stackforge import ui
3
+ from stackforge.templating import render_file
4
+
5
+ ENGINE = "dotnet"
6
+
7
+ API_FOLDERS = [
8
+ "API/Configurations/Swagger",
9
+ "API/Controllers/Main",
10
+ "API/Helpers",
11
+ "API/Interface",
12
+ "API/Options",
13
+ "API/Properties",
14
+ "API/Services",
15
+ "API/Swagger",
16
+ "API/DTOs",
17
+ ]
18
+
19
+ API_TEMPLATES = [
20
+ "API/Controllers/BaseApiController.cs",
21
+ "API/Options/JwtOptions.cs",
22
+ "API/Interface/IJwtService.cs",
23
+ "API/Services/JwtService.cs",
24
+ "API/Swagger/EnumMemberSchemaFilter.cs",
25
+ "API/Configurations/Swagger/ApiRoles.cs",
26
+ "API/Properties/launchSettings.json",
27
+ "API/DTOs/AccountDTOs.cs",
28
+ "API/Controllers/Main/AccountController.cs",
29
+ ]
30
+
31
+
32
+ def generate_api_structure(base: Path, project: str):
33
+ for folder in API_FOLDERS:
34
+ (base / folder).mkdir(parents=True, exist_ok=True)
35
+
36
+ for template in API_TEMPLATES:
37
+ render_file(ENGINE, base, template, project)
38
+
39
+ ui.file_created("API/ structure and files")
@@ -0,0 +1,20 @@
1
+ from pathlib import Path
2
+ from stackforge import ui
3
+ from stackforge.templating import render_file
4
+
5
+ ENGINE = "dotnet"
6
+
7
+
8
+ def generate_env(base: Path, project: str):
9
+ render_file(ENGINE, base, ".env", project)
10
+ ui.file_created(".env")
11
+
12
+
13
+ def generate_appsettings(base: Path, project: str):
14
+ render_file(ENGINE, base, "API/appsettings.json", project)
15
+ ui.file_created("API/appsettings.json")
16
+
17
+
18
+ def generate_appsettings_development(base: Path, project: str):
19
+ render_file(ENGINE, base, "API/appsettings.Development.json", project)
20
+ ui.file_created("API/appsettings.Development.json")