pyreactor-forge 0.1.0__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.
- pyreactor_forge-0.1.0/LICENSE +21 -0
- pyreactor_forge-0.1.0/PKG-INFO +266 -0
- pyreactor_forge-0.1.0/README.md +238 -0
- pyreactor_forge-0.1.0/pyproject.toml +67 -0
- pyreactor_forge-0.1.0/pyreactor_forge/__init__.py +3 -0
- pyreactor_forge-0.1.0/pyreactor_forge/cli.py +234 -0
- pyreactor_forge-0.1.0/pyreactor_forge/generators/__init__.py +0 -0
- pyreactor_forge-0.1.0/pyreactor_forge/generators/app.py +281 -0
- pyreactor_forge-0.1.0/pyreactor_forge/generators/backend/__init__.py +0 -0
- pyreactor_forge-0.1.0/pyreactor_forge/generators/backend/django.py +206 -0
- pyreactor_forge-0.1.0/pyreactor_forge/generators/backend/fastapi.py +700 -0
- pyreactor_forge-0.1.0/pyreactor_forge/generators/backend/flask.py +190 -0
- pyreactor_forge-0.1.0/pyreactor_forge/generators/devops.py +376 -0
- pyreactor_forge-0.1.0/pyreactor_forge/generators/entity.py +495 -0
- pyreactor_forge-0.1.0/pyreactor_forge/generators/frontend.py +640 -0
- pyreactor_forge-0.1.0/pyreactor_forge/utils/__init__.py +0 -0
- pyreactor_forge-0.1.0/pyreactor_forge/utils/display.py +58 -0
- pyreactor_forge-0.1.0/pyreactor_forge.egg-info/PKG-INFO +266 -0
- pyreactor_forge-0.1.0/pyreactor_forge.egg-info/SOURCES.txt +23 -0
- pyreactor_forge-0.1.0/pyreactor_forge.egg-info/dependency_links.txt +1 -0
- pyreactor_forge-0.1.0/pyreactor_forge.egg-info/entry_points.txt +2 -0
- pyreactor_forge-0.1.0/pyreactor_forge.egg-info/requires.txt +8 -0
- pyreactor_forge-0.1.0/pyreactor_forge.egg-info/top_level.txt +1 -0
- pyreactor_forge-0.1.0/setup.cfg +4 -0
- pyreactor_forge-0.1.0/tests/test_generators.py +198 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Panagiotis Adamopoulos
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pyreactor-forge
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: JHipster-inspired full-stack generator for Python (FastAPI/Django/Flask) + React
|
|
5
|
+
Author-email: Panagiotis Adamopoulos <info@assert.gr>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/panosadamop/pyreactor-forge
|
|
8
|
+
Project-URL: Repository, https://github.com/panosadamop/pyreactor-forge
|
|
9
|
+
Project-URL: Issues, https://github.com/panosadamop/pyreactor-forge/issues
|
|
10
|
+
Keywords: generator,scaffolding,fastapi,react,fullstack,cli
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Topic :: Software Development :: Code Generators
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
17
|
+
Requires-Python: >=3.11
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
License-File: LICENSE
|
|
20
|
+
Requires-Dist: click>=8.1.7
|
|
21
|
+
Requires-Dist: rich>=13.7.0
|
|
22
|
+
Requires-Dist: jinja2>=3.1.4
|
|
23
|
+
Provides-Extra: dev
|
|
24
|
+
Requires-Dist: pytest>=8.0; extra == "dev"
|
|
25
|
+
Requires-Dist: ruff>=0.6; extra == "dev"
|
|
26
|
+
Requires-Dist: mypy>=1.11; extra == "dev"
|
|
27
|
+
Dynamic: license-file
|
|
28
|
+
|
|
29
|
+
# ⚡ PyReactor Forge
|
|
30
|
+
|
|
31
|
+
> A full-stack application generator for Python + React.
|
|
32
|
+
|
|
33
|
+
PyReactor Forge scaffolds production-ready web applications with a Python backend (FastAPI, Django, or Flask) and a React frontend — with authentication, database integration, Docker, CI/CD, and more — in under 60 seconds.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## ✨ Features
|
|
38
|
+
|
|
39
|
+
| Feature | Details |
|
|
40
|
+
|---|---|
|
|
41
|
+
| **Backends** | FastAPI (async, SQLAlchemy 2), Django (DRF), Flask |
|
|
42
|
+
| **Frontend** | React + Vite (JavaScript or TypeScript) + Tailwind CSS |
|
|
43
|
+
| **Database** | PostgreSQL, MySQL, SQLite (with Alembic migrations) |
|
|
44
|
+
| **Auth** | JWT (Bearer token), Session, OAuth2 |
|
|
45
|
+
| **Entity generator** | Add models + CRUD API + React UI with one command |
|
|
46
|
+
| **Docker** | Multi-stage Dockerfile + docker-compose for dev & prod |
|
|
47
|
+
| **CI/CD** | GitHub Actions or GitLab CI pipelines |
|
|
48
|
+
| **Code quality** | Ruff, mypy, ESLint, Vitest pre-configured |
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## 📦 Installation
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
pip install pyreactor-forge
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
> Installs as **`pyreactor-forge`**. The terminal command is **`pyforge`** and the
|
|
59
|
+
> import package is `pyreactor_forge`.
|
|
60
|
+
|
|
61
|
+
Or from source:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
git clone https://github.com/panosadamop/pyreactor-forge
|
|
65
|
+
cd pyreactor-forge
|
|
66
|
+
pip install -e .
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## 🚀 Quick Start
|
|
72
|
+
|
|
73
|
+
### 1. Generate a new application
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
pyforge new
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
You'll be prompted to configure your app:
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
Application name: my-saas
|
|
83
|
+
Backend framework: fastapi
|
|
84
|
+
Frontend framework: react-ts
|
|
85
|
+
Database: postgresql
|
|
86
|
+
Authentication type: jwt
|
|
87
|
+
Include Docker configuration? Yes
|
|
88
|
+
CI/CD pipeline: github-actions
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Or pass everything as flags:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
pyforge new \
|
|
95
|
+
--name my-saas \
|
|
96
|
+
--backend fastapi \
|
|
97
|
+
--frontend react-ts \
|
|
98
|
+
--database postgresql \
|
|
99
|
+
--auth jwt \
|
|
100
|
+
--docker \
|
|
101
|
+
--ci github-actions
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### 2. Start developing
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
cd my-saas
|
|
108
|
+
make dev # starts backend + frontend concurrently
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Or manually:
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
# Backend
|
|
115
|
+
cd backend
|
|
116
|
+
python -m venv .venv && source .venv/bin/activate
|
|
117
|
+
pip install -r requirements.txt
|
|
118
|
+
cp .env.example .env
|
|
119
|
+
uvicorn app.main:app --reload
|
|
120
|
+
|
|
121
|
+
# Frontend (new terminal)
|
|
122
|
+
cd frontend
|
|
123
|
+
npm install
|
|
124
|
+
npm run dev
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Visit:
|
|
128
|
+
- **Frontend**: http://localhost:5173
|
|
129
|
+
- **API docs**: http://localhost:8000/docs
|
|
130
|
+
|
|
131
|
+
### 3. Add an entity
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
cd my-saas
|
|
135
|
+
pyforge entity
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
```
|
|
139
|
+
Entity name: Product
|
|
140
|
+
Field name: name | type: string | required: yes
|
|
141
|
+
Field name: price | type: float | required: yes
|
|
142
|
+
Field name: description | type: text | required: no
|
|
143
|
+
Field name: | (press Enter to finish)
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
This generates:
|
|
147
|
+
- `backend/app/models/product.py` — SQLAlchemy model
|
|
148
|
+
- `backend/app/schemas/product.py` — Pydantic schemas
|
|
149
|
+
- `backend/app/routers/products.py` — Full CRUD router
|
|
150
|
+
- `frontend/src/services/productService.ts` — Typed API client
|
|
151
|
+
- `frontend/src/pages/ProductPage.tsx` — Data table UI
|
|
152
|
+
- Updates `main.py` and `App.tsx` automatically
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## 📁 Generated Project Structure
|
|
157
|
+
|
|
158
|
+
```
|
|
159
|
+
my-saas/
|
|
160
|
+
├── backend/ # Python backend
|
|
161
|
+
│ ├── app/
|
|
162
|
+
│ │ ├── main.py # FastAPI app factory
|
|
163
|
+
│ │ ├── core/
|
|
164
|
+
│ │ │ ├── config.py # Pydantic settings
|
|
165
|
+
│ │ │ ├── database.py # SQLAlchemy async engine
|
|
166
|
+
│ │ │ ├── security.py # JWT + bcrypt
|
|
167
|
+
│ │ │ └── deps.py # FastAPI dependencies
|
|
168
|
+
│ │ ├── models/ # SQLAlchemy models
|
|
169
|
+
│ │ ├── routers/ # API route handlers
|
|
170
|
+
│ │ ├── schemas/ # Pydantic schemas
|
|
171
|
+
│ │ └── services/ # Business logic layer
|
|
172
|
+
│ ├── tests/ # pytest + pytest-asyncio
|
|
173
|
+
│ ├── migrations/ # Alembic migrations
|
|
174
|
+
│ ├── requirements.txt
|
|
175
|
+
│ ├── pyproject.toml # Ruff + mypy config
|
|
176
|
+
│ ├── Dockerfile
|
|
177
|
+
│ └── .env.example
|
|
178
|
+
│
|
|
179
|
+
├── frontend/ # React + Vite + TypeScript
|
|
180
|
+
│ ├── src/
|
|
181
|
+
│ │ ├── App.tsx # Router + auth guard
|
|
182
|
+
│ │ ├── pages/ # Route-level components
|
|
183
|
+
│ │ ├── components/
|
|
184
|
+
│ │ │ ├── layout/ # Layout + sidebar
|
|
185
|
+
│ │ │ └── ui/ # Reusable UI components
|
|
186
|
+
│ │ ├── services/ # Axios API clients
|
|
187
|
+
│ │ ├── hooks/ # React Query hooks
|
|
188
|
+
│ │ ├── store/ # Zustand stores
|
|
189
|
+
│ │ └── types/ # TypeScript types
|
|
190
|
+
│ ├── package.json
|
|
191
|
+
│ ├── vite.config.ts
|
|
192
|
+
│ ├── tailwind.config.js
|
|
193
|
+
│ └── Dockerfile
|
|
194
|
+
│
|
|
195
|
+
├── .github/workflows/ # GitHub Actions CI/CD
|
|
196
|
+
├── docker-compose.yml
|
|
197
|
+
├── docker-compose.dev.yml
|
|
198
|
+
├── Makefile
|
|
199
|
+
├── .pyforge.json # Project metadata
|
|
200
|
+
└── README.md
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
## 🛠 Commands
|
|
206
|
+
|
|
207
|
+
| Command | Description |
|
|
208
|
+
|---|---|
|
|
209
|
+
| `pyforge new` | Scaffold a new full-stack application |
|
|
210
|
+
| `pyforge entity` | Add a new entity (model + API + UI) to an existing app |
|
|
211
|
+
| `pyforge info` | Show supported technologies and commands |
|
|
212
|
+
| `pyforge --version` | Display the PyReactor Forge version |
|
|
213
|
+
|
|
214
|
+
### Makefile targets (inside generated project)
|
|
215
|
+
|
|
216
|
+
| Target | Description |
|
|
217
|
+
|---|---|
|
|
218
|
+
| `make dev` | Start backend + frontend concurrently |
|
|
219
|
+
| `make install` | Install all dependencies |
|
|
220
|
+
| `make migrate` | Run database migrations |
|
|
221
|
+
| `make test` | Run backend + frontend tests |
|
|
222
|
+
| `make lint` | Lint backend (ruff + mypy) + frontend (eslint) |
|
|
223
|
+
| `make docker-up` | Start all services with Docker Compose |
|
|
224
|
+
| `make docker-down` | Stop Docker Compose services |
|
|
225
|
+
|
|
226
|
+
---
|
|
227
|
+
|
|
228
|
+
## ⚙️ Tech Stack (generated app)
|
|
229
|
+
|
|
230
|
+
### Backend (FastAPI — default)
|
|
231
|
+
- **FastAPI** — async Python web framework
|
|
232
|
+
- **SQLAlchemy 2** (async) — ORM with Alembic migrations
|
|
233
|
+
- **Pydantic v2** — data validation and settings
|
|
234
|
+
- **python-jose** — JWT tokens
|
|
235
|
+
- **bcrypt** — password hashing
|
|
236
|
+
- **pytest + pytest-asyncio** — testing
|
|
237
|
+
- **ruff + mypy** — linting and type checking
|
|
238
|
+
|
|
239
|
+
### Frontend
|
|
240
|
+
- **React 18** + **Vite** — blazing fast dev server
|
|
241
|
+
- **TypeScript** — full type safety
|
|
242
|
+
- **Tailwind CSS** — utility-first styling
|
|
243
|
+
- **React Router v6** — client-side routing
|
|
244
|
+
- **TanStack Query** — server state management
|
|
245
|
+
- **Zustand** — client state (with persistence)
|
|
246
|
+
- **React Hook Form** + **Zod** — form validation
|
|
247
|
+
- **Axios** — HTTP client with interceptors
|
|
248
|
+
- **Lucide React** — icons
|
|
249
|
+
|
|
250
|
+
---
|
|
251
|
+
|
|
252
|
+
## 🗺 Roadmap
|
|
253
|
+
|
|
254
|
+
- [ ] Interactive TUI (Textual-based) in addition to CLI
|
|
255
|
+
- [ ] PostgreSQL full-text search support
|
|
256
|
+
- [ ] Websocket support
|
|
257
|
+
- [ ] Admin panel generation
|
|
258
|
+
- [ ] Deployment presets (Railway, Fly.io, Render, AWS)
|
|
259
|
+
- [ ] Multi-tenancy support
|
|
260
|
+
- [ ] OpenAPI client auto-generation from backend schema
|
|
261
|
+
|
|
262
|
+
---
|
|
263
|
+
|
|
264
|
+
## 📄 License
|
|
265
|
+
|
|
266
|
+
MIT © Panagiotis Adamopoulos
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
# ⚡ PyReactor Forge
|
|
2
|
+
|
|
3
|
+
> A full-stack application generator for Python + React.
|
|
4
|
+
|
|
5
|
+
PyReactor Forge scaffolds production-ready web applications with a Python backend (FastAPI, Django, or Flask) and a React frontend — with authentication, database integration, Docker, CI/CD, and more — in under 60 seconds.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## ✨ Features
|
|
10
|
+
|
|
11
|
+
| Feature | Details |
|
|
12
|
+
|---|---|
|
|
13
|
+
| **Backends** | FastAPI (async, SQLAlchemy 2), Django (DRF), Flask |
|
|
14
|
+
| **Frontend** | React + Vite (JavaScript or TypeScript) + Tailwind CSS |
|
|
15
|
+
| **Database** | PostgreSQL, MySQL, SQLite (with Alembic migrations) |
|
|
16
|
+
| **Auth** | JWT (Bearer token), Session, OAuth2 |
|
|
17
|
+
| **Entity generator** | Add models + CRUD API + React UI with one command |
|
|
18
|
+
| **Docker** | Multi-stage Dockerfile + docker-compose for dev & prod |
|
|
19
|
+
| **CI/CD** | GitHub Actions or GitLab CI pipelines |
|
|
20
|
+
| **Code quality** | Ruff, mypy, ESLint, Vitest pre-configured |
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## 📦 Installation
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
pip install pyreactor-forge
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
> Installs as **`pyreactor-forge`**. The terminal command is **`pyforge`** and the
|
|
31
|
+
> import package is `pyreactor_forge`.
|
|
32
|
+
|
|
33
|
+
Or from source:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
git clone https://github.com/panosadamop/pyreactor-forge
|
|
37
|
+
cd pyreactor-forge
|
|
38
|
+
pip install -e .
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## 🚀 Quick Start
|
|
44
|
+
|
|
45
|
+
### 1. Generate a new application
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
pyforge new
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
You'll be prompted to configure your app:
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
Application name: my-saas
|
|
55
|
+
Backend framework: fastapi
|
|
56
|
+
Frontend framework: react-ts
|
|
57
|
+
Database: postgresql
|
|
58
|
+
Authentication type: jwt
|
|
59
|
+
Include Docker configuration? Yes
|
|
60
|
+
CI/CD pipeline: github-actions
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Or pass everything as flags:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
pyforge new \
|
|
67
|
+
--name my-saas \
|
|
68
|
+
--backend fastapi \
|
|
69
|
+
--frontend react-ts \
|
|
70
|
+
--database postgresql \
|
|
71
|
+
--auth jwt \
|
|
72
|
+
--docker \
|
|
73
|
+
--ci github-actions
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### 2. Start developing
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
cd my-saas
|
|
80
|
+
make dev # starts backend + frontend concurrently
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Or manually:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
# Backend
|
|
87
|
+
cd backend
|
|
88
|
+
python -m venv .venv && source .venv/bin/activate
|
|
89
|
+
pip install -r requirements.txt
|
|
90
|
+
cp .env.example .env
|
|
91
|
+
uvicorn app.main:app --reload
|
|
92
|
+
|
|
93
|
+
# Frontend (new terminal)
|
|
94
|
+
cd frontend
|
|
95
|
+
npm install
|
|
96
|
+
npm run dev
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Visit:
|
|
100
|
+
- **Frontend**: http://localhost:5173
|
|
101
|
+
- **API docs**: http://localhost:8000/docs
|
|
102
|
+
|
|
103
|
+
### 3. Add an entity
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
cd my-saas
|
|
107
|
+
pyforge entity
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
```
|
|
111
|
+
Entity name: Product
|
|
112
|
+
Field name: name | type: string | required: yes
|
|
113
|
+
Field name: price | type: float | required: yes
|
|
114
|
+
Field name: description | type: text | required: no
|
|
115
|
+
Field name: | (press Enter to finish)
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
This generates:
|
|
119
|
+
- `backend/app/models/product.py` — SQLAlchemy model
|
|
120
|
+
- `backend/app/schemas/product.py` — Pydantic schemas
|
|
121
|
+
- `backend/app/routers/products.py` — Full CRUD router
|
|
122
|
+
- `frontend/src/services/productService.ts` — Typed API client
|
|
123
|
+
- `frontend/src/pages/ProductPage.tsx` — Data table UI
|
|
124
|
+
- Updates `main.py` and `App.tsx` automatically
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## 📁 Generated Project Structure
|
|
129
|
+
|
|
130
|
+
```
|
|
131
|
+
my-saas/
|
|
132
|
+
├── backend/ # Python backend
|
|
133
|
+
│ ├── app/
|
|
134
|
+
│ │ ├── main.py # FastAPI app factory
|
|
135
|
+
│ │ ├── core/
|
|
136
|
+
│ │ │ ├── config.py # Pydantic settings
|
|
137
|
+
│ │ │ ├── database.py # SQLAlchemy async engine
|
|
138
|
+
│ │ │ ├── security.py # JWT + bcrypt
|
|
139
|
+
│ │ │ └── deps.py # FastAPI dependencies
|
|
140
|
+
│ │ ├── models/ # SQLAlchemy models
|
|
141
|
+
│ │ ├── routers/ # API route handlers
|
|
142
|
+
│ │ ├── schemas/ # Pydantic schemas
|
|
143
|
+
│ │ └── services/ # Business logic layer
|
|
144
|
+
│ ├── tests/ # pytest + pytest-asyncio
|
|
145
|
+
│ ├── migrations/ # Alembic migrations
|
|
146
|
+
│ ├── requirements.txt
|
|
147
|
+
│ ├── pyproject.toml # Ruff + mypy config
|
|
148
|
+
│ ├── Dockerfile
|
|
149
|
+
│ └── .env.example
|
|
150
|
+
│
|
|
151
|
+
├── frontend/ # React + Vite + TypeScript
|
|
152
|
+
│ ├── src/
|
|
153
|
+
│ │ ├── App.tsx # Router + auth guard
|
|
154
|
+
│ │ ├── pages/ # Route-level components
|
|
155
|
+
│ │ ├── components/
|
|
156
|
+
│ │ │ ├── layout/ # Layout + sidebar
|
|
157
|
+
│ │ │ └── ui/ # Reusable UI components
|
|
158
|
+
│ │ ├── services/ # Axios API clients
|
|
159
|
+
│ │ ├── hooks/ # React Query hooks
|
|
160
|
+
│ │ ├── store/ # Zustand stores
|
|
161
|
+
│ │ └── types/ # TypeScript types
|
|
162
|
+
│ ├── package.json
|
|
163
|
+
│ ├── vite.config.ts
|
|
164
|
+
│ ├── tailwind.config.js
|
|
165
|
+
│ └── Dockerfile
|
|
166
|
+
│
|
|
167
|
+
├── .github/workflows/ # GitHub Actions CI/CD
|
|
168
|
+
├── docker-compose.yml
|
|
169
|
+
├── docker-compose.dev.yml
|
|
170
|
+
├── Makefile
|
|
171
|
+
├── .pyforge.json # Project metadata
|
|
172
|
+
└── README.md
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## 🛠 Commands
|
|
178
|
+
|
|
179
|
+
| Command | Description |
|
|
180
|
+
|---|---|
|
|
181
|
+
| `pyforge new` | Scaffold a new full-stack application |
|
|
182
|
+
| `pyforge entity` | Add a new entity (model + API + UI) to an existing app |
|
|
183
|
+
| `pyforge info` | Show supported technologies and commands |
|
|
184
|
+
| `pyforge --version` | Display the PyReactor Forge version |
|
|
185
|
+
|
|
186
|
+
### Makefile targets (inside generated project)
|
|
187
|
+
|
|
188
|
+
| Target | Description |
|
|
189
|
+
|---|---|
|
|
190
|
+
| `make dev` | Start backend + frontend concurrently |
|
|
191
|
+
| `make install` | Install all dependencies |
|
|
192
|
+
| `make migrate` | Run database migrations |
|
|
193
|
+
| `make test` | Run backend + frontend tests |
|
|
194
|
+
| `make lint` | Lint backend (ruff + mypy) + frontend (eslint) |
|
|
195
|
+
| `make docker-up` | Start all services with Docker Compose |
|
|
196
|
+
| `make docker-down` | Stop Docker Compose services |
|
|
197
|
+
|
|
198
|
+
---
|
|
199
|
+
|
|
200
|
+
## ⚙️ Tech Stack (generated app)
|
|
201
|
+
|
|
202
|
+
### Backend (FastAPI — default)
|
|
203
|
+
- **FastAPI** — async Python web framework
|
|
204
|
+
- **SQLAlchemy 2** (async) — ORM with Alembic migrations
|
|
205
|
+
- **Pydantic v2** — data validation and settings
|
|
206
|
+
- **python-jose** — JWT tokens
|
|
207
|
+
- **bcrypt** — password hashing
|
|
208
|
+
- **pytest + pytest-asyncio** — testing
|
|
209
|
+
- **ruff + mypy** — linting and type checking
|
|
210
|
+
|
|
211
|
+
### Frontend
|
|
212
|
+
- **React 18** + **Vite** — blazing fast dev server
|
|
213
|
+
- **TypeScript** — full type safety
|
|
214
|
+
- **Tailwind CSS** — utility-first styling
|
|
215
|
+
- **React Router v6** — client-side routing
|
|
216
|
+
- **TanStack Query** — server state management
|
|
217
|
+
- **Zustand** — client state (with persistence)
|
|
218
|
+
- **React Hook Form** + **Zod** — form validation
|
|
219
|
+
- **Axios** — HTTP client with interceptors
|
|
220
|
+
- **Lucide React** — icons
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
## 🗺 Roadmap
|
|
225
|
+
|
|
226
|
+
- [ ] Interactive TUI (Textual-based) in addition to CLI
|
|
227
|
+
- [ ] PostgreSQL full-text search support
|
|
228
|
+
- [ ] Websocket support
|
|
229
|
+
- [ ] Admin panel generation
|
|
230
|
+
- [ ] Deployment presets (Railway, Fly.io, Render, AWS)
|
|
231
|
+
- [ ] Multi-tenancy support
|
|
232
|
+
- [ ] OpenAPI client auto-generation from backend schema
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
## 📄 License
|
|
237
|
+
|
|
238
|
+
MIT © Panagiotis Adamopoulos
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=77.0", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "pyreactor-forge"
|
|
7
|
+
dynamic = ["version"]
|
|
8
|
+
description = "JHipster-inspired full-stack generator for Python (FastAPI/Django/Flask) + React"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = "MIT"
|
|
11
|
+
license-files = ["LICENSE"]
|
|
12
|
+
requires-python = ">=3.11"
|
|
13
|
+
authors = [
|
|
14
|
+
{name = "Panagiotis Adamopoulos", email = "info@assert.gr"},
|
|
15
|
+
]
|
|
16
|
+
keywords = ["generator", "scaffolding", "fastapi", "react", "fullstack", "cli"]
|
|
17
|
+
classifiers = [
|
|
18
|
+
"Development Status :: 3 - Alpha",
|
|
19
|
+
"Intended Audience :: Developers",
|
|
20
|
+
"Topic :: Software Development :: Code Generators",
|
|
21
|
+
"Programming Language :: Python :: 3.11",
|
|
22
|
+
"Programming Language :: Python :: 3.12",
|
|
23
|
+
"Programming Language :: Python :: 3.13",
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
dependencies = [
|
|
27
|
+
"click>=8.1.7",
|
|
28
|
+
"rich>=13.7.0",
|
|
29
|
+
"jinja2>=3.1.4",
|
|
30
|
+
]
|
|
31
|
+
|
|
32
|
+
[project.optional-dependencies]
|
|
33
|
+
dev = [
|
|
34
|
+
"pytest>=8.0",
|
|
35
|
+
"ruff>=0.6",
|
|
36
|
+
"mypy>=1.11",
|
|
37
|
+
]
|
|
38
|
+
|
|
39
|
+
[project.scripts]
|
|
40
|
+
pyforge = "pyreactor_forge.cli:cli"
|
|
41
|
+
|
|
42
|
+
[project.urls]
|
|
43
|
+
Homepage = "https://github.com/panosadamop/pyreactor-forge"
|
|
44
|
+
Repository = "https://github.com/panosadamop/pyreactor-forge"
|
|
45
|
+
Issues = "https://github.com/panosadamop/pyreactor-forge/issues"
|
|
46
|
+
|
|
47
|
+
[tool.setuptools.dynamic]
|
|
48
|
+
version = {attr = "pyreactor_forge.__version__"}
|
|
49
|
+
|
|
50
|
+
[tool.setuptools.packages.find]
|
|
51
|
+
where = ["."]
|
|
52
|
+
include = ["pyreactor_forge*"]
|
|
53
|
+
|
|
54
|
+
[tool.ruff]
|
|
55
|
+
line-length = 100
|
|
56
|
+
target-version = "py311"
|
|
57
|
+
|
|
58
|
+
[tool.ruff.lint]
|
|
59
|
+
select = ["E", "F", "I", "N", "UP"]
|
|
60
|
+
|
|
61
|
+
[tool.mypy]
|
|
62
|
+
python_version = "3.11"
|
|
63
|
+
strict = false
|
|
64
|
+
ignore_missing_imports = true
|
|
65
|
+
|
|
66
|
+
[tool.pytest.ini_options]
|
|
67
|
+
testpaths = ["tests"]
|