fastapi-fullstack 0.1.7__py3-none-any.whl → 0.1.15__py3-none-any.whl

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 (71) hide show
  1. {fastapi_fullstack-0.1.7.dist-info → fastapi_fullstack-0.1.15.dist-info}/METADATA +9 -2
  2. {fastapi_fullstack-0.1.7.dist-info → fastapi_fullstack-0.1.15.dist-info}/RECORD +71 -55
  3. fastapi_gen/__init__.py +6 -1
  4. fastapi_gen/cli.py +9 -0
  5. fastapi_gen/config.py +154 -2
  6. fastapi_gen/generator.py +34 -14
  7. fastapi_gen/prompts.py +172 -31
  8. fastapi_gen/template/VARIABLES.md +33 -4
  9. fastapi_gen/template/cookiecutter.json +10 -0
  10. fastapi_gen/template/hooks/post_gen_project.py +87 -2
  11. fastapi_gen/template/{{cookiecutter.project_slug}}/.env.prod.example +9 -0
  12. fastapi_gen/template/{{cookiecutter.project_slug}}/.gitlab-ci.yml +178 -0
  13. fastapi_gen/template/{{cookiecutter.project_slug}}/CLAUDE.md +3 -0
  14. fastapi_gen/template/{{cookiecutter.project_slug}}/README.md +334 -0
  15. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/.env.example +32 -0
  16. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/alembic/env.py +10 -1
  17. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/admin.py +1 -1
  18. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/agents/__init__.py +31 -0
  19. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/agents/crewai_assistant.py +563 -0
  20. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/agents/deepagents_assistant.py +526 -0
  21. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/agents/langchain_assistant.py +4 -3
  22. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/agents/langgraph_assistant.py +371 -0
  23. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/api/routes/v1/agent.py +1472 -0
  24. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/api/routes/v1/oauth.py +3 -7
  25. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/commands/cleanup.py +2 -2
  26. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/commands/seed.py +7 -2
  27. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/core/config.py +44 -7
  28. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/db/__init__.py +7 -0
  29. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/db/base.py +42 -0
  30. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/db/models/conversation.py +262 -1
  31. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/db/models/item.py +76 -1
  32. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/db/models/session.py +118 -1
  33. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/db/models/user.py +158 -1
  34. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/db/models/webhook.py +185 -3
  35. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/main.py +29 -2
  36. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/repositories/base.py +6 -0
  37. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/repositories/session.py +4 -4
  38. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/services/conversation.py +9 -9
  39. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/services/session.py +6 -6
  40. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/services/webhook.py +7 -7
  41. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/worker/__init__.py +1 -1
  42. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/worker/arq_app.py +165 -0
  43. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/worker/tasks/__init__.py +10 -1
  44. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/pyproject.toml +40 -0
  45. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/tests/api/test_metrics.py +53 -0
  46. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/tests/test_agents.py +2 -0
  47. fastapi_gen/template/{{cookiecutter.project_slug}}/docker-compose.dev.yml +6 -0
  48. fastapi_gen/template/{{cookiecutter.project_slug}}/docker-compose.prod.yml +100 -0
  49. fastapi_gen/template/{{cookiecutter.project_slug}}/docker-compose.yml +39 -0
  50. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/.env.example +5 -0
  51. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/chat/chat-container.tsx +28 -1
  52. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/chat/index.ts +1 -0
  53. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/chat/message-item.tsx +22 -4
  54. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/chat/message-list.tsx +23 -3
  55. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/chat/tool-approval-dialog.tsx +138 -0
  56. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/hooks/use-chat.ts +242 -18
  57. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/hooks/use-local-chat.ts +242 -17
  58. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/lib/constants.ts +1 -1
  59. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/types/chat.ts +57 -1
  60. fastapi_gen/template/{{cookiecutter.project_slug}}/kubernetes/configmap.yaml +63 -0
  61. fastapi_gen/template/{{cookiecutter.project_slug}}/kubernetes/deployment.yaml +242 -0
  62. fastapi_gen/template/{{cookiecutter.project_slug}}/kubernetes/ingress.yaml +44 -0
  63. fastapi_gen/template/{{cookiecutter.project_slug}}/kubernetes/kustomization.yaml +28 -0
  64. fastapi_gen/template/{{cookiecutter.project_slug}}/kubernetes/namespace.yaml +12 -0
  65. fastapi_gen/template/{{cookiecutter.project_slug}}/kubernetes/secret.yaml +59 -0
  66. fastapi_gen/template/{{cookiecutter.project_slug}}/kubernetes/service.yaml +23 -0
  67. fastapi_gen/template/{{cookiecutter.project_slug}}/nginx/nginx.conf +225 -0
  68. fastapi_gen/template/{{cookiecutter.project_slug}}/nginx/ssl/.gitkeep +18 -0
  69. {fastapi_fullstack-0.1.7.dist-info → fastapi_fullstack-0.1.15.dist-info}/WHEEL +0 -0
  70. {fastapi_fullstack-0.1.7.dist-info → fastapi_fullstack-0.1.15.dist-info}/entry_points.txt +0 -0
  71. {fastapi_fullstack-0.1.7.dist-info → fastapi_fullstack-0.1.15.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,225 @@
1
+ # =============================================================================
2
+ # Nginx Configuration for {{ cookiecutter.project_name }}
3
+ # Generated by fastapi-fullstack
4
+ # =============================================================================
5
+ #
6
+ # This configuration provides:
7
+ # - Reverse proxy for backend API (api.DOMAIN)
8
+ {% if cookiecutter.use_frontend %}
9
+ # - Reverse proxy for frontend (DOMAIN)
10
+ {% endif %}
11
+ {% if cookiecutter.use_celery %}
12
+ # - Reverse proxy for Flower dashboard (flower.DOMAIN)
13
+ {% endif %}
14
+ # - WebSocket support for /ws endpoint
15
+ # - Security headers
16
+ # - HTTP to HTTPS redirect
17
+ #
18
+ # SSL Certificates:
19
+ # Place your SSL certificates in the nginx/ssl/ directory:
20
+ # - nginx/ssl/cert.pem (certificate)
21
+ # - nginx/ssl/key.pem (private key)
22
+ #
23
+ # For Let's Encrypt with certbot:
24
+ # certbot certonly --webroot -w /var/www/certbot -d api.yourdomain.com -d yourdomain.com
25
+ # =============================================================================
26
+
27
+ # Upstream definitions
28
+ upstream backend {
29
+ server backend:{{ cookiecutter.backend_port }};
30
+ }
31
+
32
+ {% if cookiecutter.use_frontend %}
33
+ upstream frontend {
34
+ server frontend:{{ cookiecutter.frontend_port }};
35
+ }
36
+
37
+ {% endif %}
38
+ {% if cookiecutter.use_celery %}
39
+ upstream flower {
40
+ server flower:5555;
41
+ }
42
+
43
+ {% endif %}
44
+ # =============================================================================
45
+ # HTTP Server - Redirect to HTTPS
46
+ # =============================================================================
47
+ server {
48
+ listen 80;
49
+ listen [::]:80;
50
+ server_name _;
51
+
52
+ # Let's Encrypt ACME challenge
53
+ location /.well-known/acme-challenge/ {
54
+ root /var/www/certbot;
55
+ }
56
+
57
+ # Redirect all other HTTP traffic to HTTPS
58
+ location / {
59
+ return 301 https://$host$request_uri;
60
+ }
61
+ }
62
+
63
+ # =============================================================================
64
+ # HTTPS Server - Backend API (api.DOMAIN)
65
+ # =============================================================================
66
+ server {
67
+ listen 443 ssl;
68
+ listen [::]:443 ssl;
69
+ http2 on;
70
+ server_name api.${DOMAIN:-localhost};
71
+
72
+ # SSL Configuration
73
+ ssl_certificate /etc/nginx/ssl/cert.pem;
74
+ ssl_certificate_key /etc/nginx/ssl/key.pem;
75
+ ssl_protocols TLSv1.2 TLSv1.3;
76
+ ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384;
77
+ ssl_prefer_server_ciphers off;
78
+ ssl_session_timeout 1d;
79
+ ssl_session_cache shared:SSL:50m;
80
+ ssl_stapling on;
81
+ ssl_stapling_verify on;
82
+
83
+ # Security Headers
84
+ add_header X-Frame-Options "SAMEORIGIN" always;
85
+ add_header X-Content-Type-Options "nosniff" always;
86
+ add_header X-XSS-Protection "1; mode=block" always;
87
+ add_header Referrer-Policy "strict-origin-when-cross-origin" always;
88
+ add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
89
+
90
+ # Proxy settings
91
+ proxy_http_version 1.1;
92
+ proxy_set_header Host $host;
93
+ proxy_set_header X-Real-IP $remote_addr;
94
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
95
+ proxy_set_header X-Forwarded-Proto $scheme;
96
+ proxy_set_header X-Forwarded-Host $host;
97
+ proxy_set_header X-Forwarded-Port $server_port;
98
+
99
+ # WebSocket support for /ws endpoint
100
+ location /ws {
101
+ proxy_pass http://backend;
102
+ proxy_http_version 1.1;
103
+ proxy_set_header Upgrade $http_upgrade;
104
+ proxy_set_header Connection "upgrade";
105
+ proxy_set_header Host $host;
106
+ proxy_set_header X-Real-IP $remote_addr;
107
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
108
+ proxy_set_header X-Forwarded-Proto $scheme;
109
+ proxy_read_timeout 86400;
110
+ proxy_send_timeout 86400;
111
+ }
112
+
113
+ # API endpoints
114
+ location / {
115
+ proxy_pass http://backend;
116
+ proxy_buffering off;
117
+ proxy_request_buffering off;
118
+
119
+ # Timeouts
120
+ proxy_connect_timeout 60s;
121
+ proxy_send_timeout 60s;
122
+ proxy_read_timeout 60s;
123
+ }
124
+ }
125
+
126
+ {% if cookiecutter.use_frontend %}
127
+ # =============================================================================
128
+ # HTTPS Server - Frontend (DOMAIN)
129
+ # =============================================================================
130
+ server {
131
+ listen 443 ssl;
132
+ listen [::]:443 ssl;
133
+ http2 on;
134
+ server_name ${DOMAIN:-localhost};
135
+
136
+ # SSL Configuration
137
+ ssl_certificate /etc/nginx/ssl/cert.pem;
138
+ ssl_certificate_key /etc/nginx/ssl/key.pem;
139
+ ssl_protocols TLSv1.2 TLSv1.3;
140
+ ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384;
141
+ ssl_prefer_server_ciphers off;
142
+ ssl_session_timeout 1d;
143
+ ssl_session_cache shared:SSL:50m;
144
+
145
+ # Security Headers
146
+ add_header X-Frame-Options "SAMEORIGIN" always;
147
+ add_header X-Content-Type-Options "nosniff" always;
148
+ add_header X-XSS-Protection "1; mode=block" always;
149
+ add_header Referrer-Policy "strict-origin-when-cross-origin" always;
150
+ add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
151
+
152
+ # Proxy settings
153
+ proxy_http_version 1.1;
154
+ proxy_set_header Host $host;
155
+ proxy_set_header X-Real-IP $remote_addr;
156
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
157
+ proxy_set_header X-Forwarded-Proto $scheme;
158
+
159
+ # Frontend application
160
+ location / {
161
+ proxy_pass http://frontend;
162
+ proxy_buffering off;
163
+
164
+ # Timeouts
165
+ proxy_connect_timeout 60s;
166
+ proxy_send_timeout 60s;
167
+ proxy_read_timeout 60s;
168
+ }
169
+
170
+ # Next.js HMR WebSocket (development)
171
+ location /_next/webpack-hmr {
172
+ proxy_pass http://frontend;
173
+ proxy_http_version 1.1;
174
+ proxy_set_header Upgrade $http_upgrade;
175
+ proxy_set_header Connection "upgrade";
176
+ }
177
+ }
178
+
179
+ {% endif %}
180
+ {% if cookiecutter.use_celery %}
181
+ # =============================================================================
182
+ # HTTPS Server - Flower Dashboard (flower.DOMAIN)
183
+ # =============================================================================
184
+ server {
185
+ listen 443 ssl;
186
+ listen [::]:443 ssl;
187
+ http2 on;
188
+ server_name flower.${DOMAIN:-localhost};
189
+
190
+ # SSL Configuration
191
+ ssl_certificate /etc/nginx/ssl/cert.pem;
192
+ ssl_certificate_key /etc/nginx/ssl/key.pem;
193
+ ssl_protocols TLSv1.2 TLSv1.3;
194
+ ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384;
195
+ ssl_prefer_server_ciphers off;
196
+ ssl_session_timeout 1d;
197
+ ssl_session_cache shared:SSL:50m;
198
+
199
+ # Security Headers
200
+ add_header X-Frame-Options "SAMEORIGIN" always;
201
+ add_header X-Content-Type-Options "nosniff" always;
202
+ add_header X-XSS-Protection "1; mode=block" always;
203
+ add_header Referrer-Policy "strict-origin-when-cross-origin" always;
204
+ add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
205
+
206
+ # Proxy settings
207
+ proxy_http_version 1.1;
208
+ proxy_set_header Host $host;
209
+ proxy_set_header X-Real-IP $remote_addr;
210
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
211
+ proxy_set_header X-Forwarded-Proto $scheme;
212
+
213
+ # Flower dashboard
214
+ location / {
215
+ proxy_pass http://flower;
216
+ proxy_buffering off;
217
+
218
+ # Timeouts
219
+ proxy_connect_timeout 60s;
220
+ proxy_send_timeout 60s;
221
+ proxy_read_timeout 60s;
222
+ }
223
+ }
224
+
225
+ {% endif %}
@@ -0,0 +1,18 @@
1
+ # SSL Certificates Directory
2
+ #
3
+ # Place your SSL certificates here:
4
+ # - cert.pem (certificate chain)
5
+ # - key.pem (private key)
6
+ #
7
+ # For Let's Encrypt with certbot:
8
+ # certbot certonly --standalone -d api.yourdomain.com -d yourdomain.com
9
+ #
10
+ # Then copy certificates:
11
+ # cp /etc/letsencrypt/live/yourdomain.com/fullchain.pem nginx/ssl/cert.pem
12
+ # cp /etc/letsencrypt/live/yourdomain.com/privkey.pem nginx/ssl/key.pem
13
+ #
14
+ # For development, you can generate self-signed certificates:
15
+ # openssl req -x509 -nodes -days 365 -newkey rsa:2048 \
16
+ # -keyout nginx/ssl/key.pem \
17
+ # -out nginx/ssl/cert.pem \
18
+ # -subj "/CN=localhost"