fastapi-fullstack 0.1.2__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 (221) hide show
  1. fastapi_fullstack-0.1.2.dist-info/METADATA +545 -0
  2. fastapi_fullstack-0.1.2.dist-info/RECORD +221 -0
  3. fastapi_fullstack-0.1.2.dist-info/WHEEL +4 -0
  4. fastapi_fullstack-0.1.2.dist-info/entry_points.txt +2 -0
  5. fastapi_fullstack-0.1.2.dist-info/licenses/LICENSE +21 -0
  6. fastapi_gen/__init__.py +3 -0
  7. fastapi_gen/cli.py +256 -0
  8. fastapi_gen/config.py +255 -0
  9. fastapi_gen/generator.py +181 -0
  10. fastapi_gen/prompts.py +648 -0
  11. fastapi_gen/template/cookiecutter.json +76 -0
  12. fastapi_gen/template/hooks/post_gen_project.py +111 -0
  13. fastapi_gen/template/{{cookiecutter.project_slug}}/.env.example +136 -0
  14. fastapi_gen/template/{{cookiecutter.project_slug}}/.github/workflows/ci.yml +150 -0
  15. fastapi_gen/template/{{cookiecutter.project_slug}}/.gitignore +108 -0
  16. fastapi_gen/template/{{cookiecutter.project_slug}}/CLAUDE.md +357 -0
  17. fastapi_gen/template/{{cookiecutter.project_slug}}/Makefile +298 -0
  18. fastapi_gen/template/{{cookiecutter.project_slug}}/README.md +723 -0
  19. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/.dockerignore +60 -0
  20. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/.pre-commit-config.yaml +32 -0
  21. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/Dockerfile +56 -0
  22. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/alembic/env.py +76 -0
  23. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/alembic/script.py.mako +30 -0
  24. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/alembic/versions/.gitkeep +0 -0
  25. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/alembic.ini +48 -0
  26. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/__init__.py +3 -0
  27. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/admin.py +115 -0
  28. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/agents/__init__.py +13 -0
  29. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/agents/assistant.py +202 -0
  30. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/agents/tools/__init__.py +13 -0
  31. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/agents/tools/datetime_tool.py +17 -0
  32. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/api/__init__.py +1 -0
  33. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/api/deps.py +528 -0
  34. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/api/exception_handlers.py +85 -0
  35. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/api/router.py +10 -0
  36. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/api/routes/__init__.py +9 -0
  37. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/api/routes/v1/__init__.py +87 -0
  38. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/api/routes/v1/agent.py +448 -0
  39. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/api/routes/v1/auth.py +395 -0
  40. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/api/routes/v1/conversations.py +490 -0
  41. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/api/routes/v1/health.py +227 -0
  42. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/api/routes/v1/items.py +275 -0
  43. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/api/routes/v1/oauth.py +205 -0
  44. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/api/routes/v1/sessions.py +168 -0
  45. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/api/routes/v1/users.py +333 -0
  46. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/api/routes/v1/webhooks.py +477 -0
  47. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/api/routes/v1/ws.py +46 -0
  48. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/api/versioning.py +221 -0
  49. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/clients/__init__.py +14 -0
  50. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/clients/redis.py +88 -0
  51. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/commands/__init__.py +117 -0
  52. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/commands/cleanup.py +75 -0
  53. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/commands/example.py +28 -0
  54. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/commands/seed.py +266 -0
  55. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/core/__init__.py +5 -0
  56. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/core/cache.py +23 -0
  57. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/core/config.py +247 -0
  58. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/core/csrf.py +153 -0
  59. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/core/exceptions.py +122 -0
  60. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/core/logfire_setup.py +101 -0
  61. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/core/middleware.py +99 -0
  62. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/core/oauth.py +23 -0
  63. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/core/rate_limit.py +58 -0
  64. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/core/sanitize.py +271 -0
  65. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/core/security.py +102 -0
  66. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/db/__init__.py +7 -0
  67. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/db/base.py +41 -0
  68. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/db/models/__init__.py +31 -0
  69. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/db/models/conversation.py +319 -0
  70. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/db/models/item.py +96 -0
  71. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/db/models/session.py +126 -0
  72. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/db/models/user.py +218 -0
  73. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/db/models/webhook.py +244 -0
  74. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/db/session.py +113 -0
  75. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/main.py +326 -0
  76. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/pipelines/__init__.py +9 -0
  77. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/pipelines/base.py +73 -0
  78. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/repositories/__init__.py +49 -0
  79. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/repositories/base.py +154 -0
  80. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/repositories/conversation.py +760 -0
  81. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/repositories/item.py +222 -0
  82. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/repositories/session.py +318 -0
  83. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/repositories/user.py +322 -0
  84. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/repositories/webhook.py +358 -0
  85. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/schemas/__init__.py +50 -0
  86. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/schemas/base.py +57 -0
  87. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/schemas/conversation.py +195 -0
  88. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/schemas/item.py +52 -0
  89. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/schemas/session.py +42 -0
  90. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/schemas/token.py +31 -0
  91. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/schemas/user.py +64 -0
  92. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/schemas/webhook.py +89 -0
  93. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/services/__init__.py +38 -0
  94. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/services/conversation.py +797 -0
  95. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/services/item.py +246 -0
  96. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/services/session.py +333 -0
  97. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/services/user.py +432 -0
  98. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/services/webhook.py +561 -0
  99. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/worker/__init__.py +5 -0
  100. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/worker/celery_app.py +64 -0
  101. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/worker/taskiq_app.py +38 -0
  102. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/worker/tasks/__init__.py +25 -0
  103. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/worker/tasks/examples.py +106 -0
  104. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/worker/tasks/schedules.py +29 -0
  105. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/worker/tasks/taskiq_examples.py +92 -0
  106. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/cli/__init__.py +1 -0
  107. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/cli/commands.py +438 -0
  108. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/pyproject.toml +158 -0
  109. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/scripts/.gitkeep +0 -0
  110. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/tests/__init__.py +1 -0
  111. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/tests/api/__init__.py +1 -0
  112. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/tests/api/test_auth.py +242 -0
  113. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/tests/api/test_exceptions.py +151 -0
  114. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/tests/api/test_health.py +113 -0
  115. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/tests/api/test_items.py +310 -0
  116. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/tests/api/test_users.py +253 -0
  117. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/tests/conftest.py +151 -0
  118. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/tests/test_agents.py +121 -0
  119. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/tests/test_clients.py +183 -0
  120. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/tests/test_commands.py +173 -0
  121. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/tests/test_core.py +143 -0
  122. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/tests/test_pipelines.py +118 -0
  123. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/tests/test_repositories.py +181 -0
  124. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/tests/test_security.py +124 -0
  125. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/tests/test_services.py +363 -0
  126. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/tests/test_worker.py +85 -0
  127. fastapi_gen/template/{{cookiecutter.project_slug}}/docker-compose.dev.yml +242 -0
  128. fastapi_gen/template/{{cookiecutter.project_slug}}/docker-compose.frontend.yml +31 -0
  129. fastapi_gen/template/{{cookiecutter.project_slug}}/docker-compose.prod.yml +382 -0
  130. fastapi_gen/template/{{cookiecutter.project_slug}}/docker-compose.yml +241 -0
  131. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/.env.example +12 -0
  132. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/.gitignore +45 -0
  133. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/.prettierignore +19 -0
  134. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/.prettierrc +11 -0
  135. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/Dockerfile +44 -0
  136. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/README.md +693 -0
  137. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/e2e/auth.setup.ts +49 -0
  138. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/e2e/auth.spec.ts +134 -0
  139. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/e2e/chat.spec.ts +207 -0
  140. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/e2e/home.spec.ts +73 -0
  141. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/instrumentation.ts +14 -0
  142. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/messages/en.json +84 -0
  143. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/messages/pl.json +84 -0
  144. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/next.config.ts +76 -0
  145. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/package.json +66 -0
  146. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/playwright.config.ts +101 -0
  147. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/postcss.config.mjs +7 -0
  148. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/app/(auth)/layout.tsx +11 -0
  149. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/app/(auth)/login/page.tsx +5 -0
  150. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/app/(auth)/register/page.tsx +5 -0
  151. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/app/(dashboard)/chat/page.tsx +20 -0
  152. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/app/(dashboard)/dashboard/page.tsx +99 -0
  153. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/app/(dashboard)/layout.tsx +17 -0
  154. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/app/(dashboard)/profile/page.tsx +156 -0
  155. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/app/api/auth/login/route.ts +58 -0
  156. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/app/api/auth/logout/route.ts +24 -0
  157. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/app/api/auth/me/route.ts +39 -0
  158. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/app/api/auth/oauth-callback/route.ts +50 -0
  159. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/app/api/auth/refresh/route.ts +54 -0
  160. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/app/api/auth/register/route.ts +26 -0
  161. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/app/api/conversations/[id]/messages/route.ts +41 -0
  162. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/app/api/conversations/[id]/route.ts +108 -0
  163. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/app/api/conversations/route.ts +73 -0
  164. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/app/api/health/route.ts +21 -0
  165. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/app/auth/callback/page.tsx +96 -0
  166. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/app/globals.css +108 -0
  167. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/app/layout.tsx +25 -0
  168. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/app/page.tsx +73 -0
  169. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/app/providers.tsx +29 -0
  170. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/auth/index.ts +2 -0
  171. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/auth/login-form.tsx +120 -0
  172. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/auth/register-form.tsx +153 -0
  173. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/chat/chat-container.tsx +135 -0
  174. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/chat/chat-input.tsx +73 -0
  175. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/chat/conversation-sidebar.tsx +261 -0
  176. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/chat/index.ts +8 -0
  177. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/chat/message-item.tsx +63 -0
  178. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/chat/message-list.tsx +18 -0
  179. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/chat/tool-call-card.tsx +60 -0
  180. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/icons/google-icon.tsx +32 -0
  181. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/icons/index.ts +3 -0
  182. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/language-switcher.tsx +97 -0
  183. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/layout/header.tsx +45 -0
  184. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/layout/index.ts +2 -0
  185. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/layout/sidebar.tsx +48 -0
  186. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/theme/index.ts +7 -0
  187. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/theme/theme-provider.tsx +53 -0
  188. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/theme/theme-toggle.tsx +83 -0
  189. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/ui/badge.tsx +35 -0
  190. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/ui/button.test.tsx +75 -0
  191. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/ui/button.tsx +54 -0
  192. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/ui/card.tsx +82 -0
  193. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/ui/index.ts +12 -0
  194. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/ui/input.tsx +21 -0
  195. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/ui/label.tsx +21 -0
  196. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/hooks/index.ts +6 -0
  197. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/hooks/use-auth.ts +97 -0
  198. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/hooks/use-chat.ts +203 -0
  199. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/hooks/use-conversations.ts +175 -0
  200. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/hooks/use-websocket.ts +105 -0
  201. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/i18n.ts +32 -0
  202. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/lib/api-client.ts +90 -0
  203. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/lib/constants.ts +39 -0
  204. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/lib/server-api.ts +78 -0
  205. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/lib/utils.test.ts +44 -0
  206. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/lib/utils.ts +44 -0
  207. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/middleware.ts +33 -0
  208. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/stores/auth-store.test.ts +72 -0
  209. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/stores/auth-store.ts +48 -0
  210. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/stores/chat-store.ts +65 -0
  211. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/stores/conversation-store.ts +76 -0
  212. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/stores/index.ts +6 -0
  213. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/stores/theme-store.ts +44 -0
  214. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/types/api.ts +27 -0
  215. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/types/auth.ts +52 -0
  216. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/types/chat.ts +81 -0
  217. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/types/conversation.ts +49 -0
  218. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/types/index.ts +10 -0
  219. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/tsconfig.json +28 -0
  220. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/vitest.config.ts +36 -0
  221. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/vitest.setup.ts +56 -0
@@ -0,0 +1,545 @@
1
+ Metadata-Version: 2.4
2
+ Name: fastapi-fullstack
3
+ Version: 0.1.2
4
+ Summary: Interactive FastAPI project generator with Logfire observability
5
+ Project-URL: Homepage, https://github.com/vstorm-co/full-stack-fastapi-nextjs-llm-template
6
+ Project-URL: Documentation, https://github.com/vstorm-co/full-stack-fastapi-nextjs-llm-template#readme
7
+ Project-URL: Repository, https://github.com/vstorm-co/full-stack-fastapi-nextjs-llm-template
8
+ Author-email: Your Name <your@email.com>
9
+ License: MIT
10
+ License-File: LICENSE
11
+ Keywords: fastapi,generator,logfire,observability,template
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Environment :: Console
14
+ Classifier: Framework :: FastAPI
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Topic :: Software Development :: Code Generators
21
+ Requires-Python: >=3.11
22
+ Requires-Dist: click>=8.1.0
23
+ Requires-Dist: cookiecutter>=2.6.0
24
+ Requires-Dist: pydantic-settings>=2.0.0
25
+ Requires-Dist: pydantic>=2.0.0
26
+ Requires-Dist: questionary>=2.0.0
27
+ Requires-Dist: rich>=13.0.0
28
+ Provides-Extra: dev
29
+ Requires-Dist: mypy>=1.13.0; extra == 'dev'
30
+ Requires-Dist: pre-commit>=3.0.0; extra == 'dev'
31
+ Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
32
+ Requires-Dist: pytest>=8.0.0; extra == 'dev'
33
+ Requires-Dist: ruff>=0.8.0; extra == 'dev'
34
+ Description-Content-Type: text/markdown
35
+
36
+ # Full-Stack FastAPI + Next.js Template for AI/LLM Applications
37
+
38
+ <p align="center">
39
+ <a href="https://github.com/vstorm-co/full-stack-fastapi-nextjs-llm-template/stargazers"><img src="https://img.shields.io/github/stars/vstorm-co/full-stack-fastapi-nextjs-llm-template?style=flat&logo=github&color=yellow" alt="GitHub Stars"></a>
40
+ <a href="https://github.com/vstorm-co/full-stack-fastapi-nextjs-llm-template/blob/main/LICENSE"><img src="https://img.shields.io/github/license/vstorm-co/full-stack-fastapi-nextjs-llm-template?color=blue" alt="License"></a>
41
+ <a href="https://www.python.org/"><img src="https://img.shields.io/badge/python-3.11%20%7C%203.12%20%7C%203.13-blue?logo=python&logoColor=white" alt="Python"></a>
42
+ <a href="https://pypi.org/project/fastapi-fullstack/"><img src="https://img.shields.io/pypi/v/fastapi-fullstack?color=green&logo=pypi&logoColor=white" alt="PyPI"></a>
43
+ <img src="https://img.shields.io/badge/integrations-20%2B-brightgreen" alt="20+ Integrations">
44
+ </p>
45
+
46
+ <p align="center">
47
+ <b>Production-ready project generator for AI/LLM applications with 20+ enterprise integrations.</b><br>
48
+ <sub>Built with FastAPI, Next.js 15, PydanticAI, and everything you need for professional business applications.</sub>
49
+ </p>
50
+
51
+ <p align="center">
52
+ <a href="#-why-this-template">Why This Template</a> •
53
+ <a href="#-features">Features</a> •
54
+ <a href="#-quick-start">Quick Start</a> •
55
+ <a href="#-architecture">Architecture</a> •
56
+ <a href="#-ai-agent">AI Agent</a> •
57
+ <a href="#-observability-with-logfire">Logfire</a> •
58
+ <a href="#-documentation">Documentation</a>
59
+ </p>
60
+
61
+ ## 🎯 Why This Template
62
+
63
+ Building AI/LLM applications requires more than just an API wrapper. You need:
64
+
65
+ - **Type-safe AI agents** with tool/function calling
66
+ - **Real-time streaming** responses via WebSocket
67
+ - **Conversation persistence** and history management
68
+ - **Production infrastructure** - auth, rate limiting, observability
69
+ - **Enterprise integrations** - background tasks, webhooks, admin panels
70
+
71
+ This template gives you all of that out of the box, with **20+ configurable integrations** so you can focus on building your AI product, not boilerplate.
72
+
73
+ ### Perfect For
74
+
75
+ - 🤖 **AI Chatbots & Assistants** - PydanticAI agents with streaming responses
76
+ - 📊 **ML Applications** - Background task processing with Celery/Taskiq
77
+ - 🏢 **Enterprise SaaS** - Full auth, admin panel, webhooks, and more
78
+ - 🚀 **Startups** - Ship fast with production-ready infrastructure
79
+
80
+ ---
81
+
82
+ ## ✨ Features
83
+
84
+ ### 🤖 AI/LLM First
85
+
86
+ - **[PydanticAI](https://ai.pydantic.dev)** - Type-safe AI agents with tool support
87
+ - **WebSocket Streaming** - Real-time responses using `iter()` method
88
+ - **Conversation Persistence** - Save chat history to database
89
+ - **Custom Tools** - Easily extend agent capabilities
90
+ - **Multi-model Support** - OpenAI, Anthropic, and more
91
+
92
+ ### ⚡ Backend (FastAPI)
93
+
94
+ - **[FastAPI](https://fastapi.tiangolo.com)** + **[Pydantic v2](https://docs.pydantic.dev)** - High-performance async API
95
+ - **Multiple Databases** - PostgreSQL (async), MongoDB (async), SQLite
96
+ - **Authentication** - JWT + Refresh tokens, API Keys, OAuth2 (Google)
97
+ - **Background Tasks** - Celery, Taskiq, or ARQ
98
+ - **Django-style CLI** - Custom management commands with auto-discovery
99
+
100
+ ### 🎨 Frontend (Next.js 15)
101
+
102
+ - **React 19** + **TypeScript** + **Tailwind CSS v4**
103
+ - **AI Chat Interface** - WebSocket streaming, tool call visualization
104
+ - **Authentication** - HTTP-only cookies, auto-refresh
105
+ - **Dark Mode** + **i18n** (optional)
106
+
107
+ ### 🔌 20+ Enterprise Integrations
108
+
109
+ | Category | Integrations |
110
+ |----------|-------------|
111
+ | **Caching & State** | Redis, fastapi-cache2 |
112
+ | **Security** | Rate limiting, CORS, CSRF protection |
113
+ | **Observability** | Logfire, Sentry, Prometheus |
114
+ | **Admin** | SQLAdmin panel with auth |
115
+ | **Events** | Webhooks, WebSockets |
116
+ | **DevOps** | Docker, GitHub Actions, GitLab CI, Kubernetes |
117
+
118
+ ---
119
+
120
+ ## 🏗️ Architecture
121
+
122
+ ```mermaid
123
+ graph TB
124
+ subgraph Frontend["Frontend (Next.js 15)"]
125
+ UI[React Components]
126
+ WS[WebSocket Client]
127
+ Store[Zustand Stores]
128
+ end
129
+
130
+ subgraph Backend["Backend (FastAPI)"]
131
+ API[API Routes]
132
+ Services[Services Layer]
133
+ Repos[Repositories]
134
+ Agent[PydanticAI Agent]
135
+ end
136
+
137
+ subgraph Infrastructure
138
+ DB[(PostgreSQL/MongoDB)]
139
+ Redis[(Redis)]
140
+ Queue[Celery/Taskiq]
141
+ end
142
+
143
+ subgraph External
144
+ LLM[OpenAI/Anthropic]
145
+ Webhook[Webhook Endpoints]
146
+ end
147
+
148
+ UI --> API
149
+ WS <--> Agent
150
+ API --> Services
151
+ Services --> Repos
152
+ Services --> Agent
153
+ Repos --> DB
154
+ Agent --> LLM
155
+ Services --> Redis
156
+ Services --> Queue
157
+ Services --> Webhook
158
+ ```
159
+
160
+ ### Layered Architecture
161
+
162
+ The backend follows a clean **Repository + Service** pattern:
163
+
164
+ ```mermaid
165
+ graph LR
166
+ A[API Routes] --> B[Services]
167
+ B --> C[Repositories]
168
+ C --> D[(Database)]
169
+
170
+ B --> E[External APIs]
171
+ B --> F[AI Agents]
172
+ ```
173
+
174
+ | Layer | Responsibility |
175
+ |-------|---------------|
176
+ | **Routes** | HTTP handling, validation, auth |
177
+ | **Services** | Business logic, orchestration |
178
+ | **Repositories** | Data access, queries |
179
+
180
+ See [Architecture Documentation](./docs/architecture.md) for details.
181
+
182
+ ---
183
+
184
+ ## 🚀 Quick Start
185
+
186
+ ### Installation
187
+
188
+ ```bash
189
+ # pip
190
+ pip install fastapi-fullstack
191
+
192
+ # uv (recommended)
193
+ uv tool install fastapi-fullstack
194
+
195
+ # pipx
196
+ pipx install fastapi-fullstack
197
+ ```
198
+
199
+ ### Create Your Project
200
+
201
+ ```bash
202
+ # Interactive wizard (recommended)
203
+ fastapi-fullstack new
204
+
205
+ # Quick mode with options
206
+ fastapi-fullstack create my_ai_app \
207
+ --database postgresql \
208
+ --auth jwt \
209
+ --frontend nextjs
210
+ ```
211
+
212
+ ### Start Development
213
+
214
+ ```bash
215
+ cd my_ai_app
216
+
217
+ # Backend
218
+ cd backend
219
+ uv sync
220
+ cp .env.example .env
221
+ alembic upgrade head
222
+ uv run uvicorn app.main:app --reload
223
+
224
+ # Frontend (new terminal)
225
+ cd frontend
226
+ bun install
227
+ bun dev
228
+ ```
229
+
230
+ **Access:**
231
+ - API: http://localhost:8000
232
+ - Docs: http://localhost:8000/docs
233
+ - Frontend: http://localhost:3000
234
+
235
+ ---
236
+
237
+ ## 🤖 AI Agent
238
+
239
+ ### PydanticAI Integration
240
+
241
+ The template includes a fully configured AI agent with:
242
+
243
+ ```python
244
+ # app/agents/assistant.py
245
+ from pydantic_ai import Agent, RunContext
246
+
247
+ @dataclass
248
+ class Deps:
249
+ user_id: str | None = None
250
+ db: AsyncSession | None = None
251
+
252
+ agent = Agent[Deps, str](
253
+ model="openai:gpt-4o-mini",
254
+ system_prompt="You are a helpful assistant.",
255
+ )
256
+
257
+ @agent.tool
258
+ async def search_database(ctx: RunContext[Deps], query: str) -> list[dict]:
259
+ """Search the database for relevant information."""
260
+ # Access user context and database via ctx.deps
261
+ ...
262
+ ```
263
+
264
+ ### WebSocket Streaming
265
+
266
+ Real-time responses with full event access:
267
+
268
+ ```python
269
+ @router.websocket("/ws")
270
+ async def agent_ws(websocket: WebSocket):
271
+ await websocket.accept()
272
+
273
+ async for event in agent.iter(user_input, deps=deps):
274
+ if isinstance(event, PartDeltaEvent):
275
+ await websocket.send_json({
276
+ "type": "token",
277
+ "content": event.delta.content
278
+ })
279
+ ```
280
+
281
+ ### Adding Custom Tools
282
+
283
+ ```python
284
+ @agent.tool
285
+ async def get_weather(ctx: RunContext[Deps], city: str) -> dict:
286
+ """Get current weather for a city."""
287
+ async with httpx.AsyncClient() as client:
288
+ response = await client.get(f"https://api.weather.com/{city}")
289
+ return response.json()
290
+ ```
291
+
292
+ See [AI Agent Documentation](./docs/ai-agent.md) for more.
293
+
294
+ ---
295
+
296
+ ## 📊 Observability with Logfire
297
+
298
+ [Logfire](https://logfire.pydantic.dev) provides complete observability for your application - from AI agents to database queries. Built by the Pydantic team, it offers first-class support for the entire Python ecosystem.
299
+
300
+ ### What Gets Instrumented
301
+
302
+ ```mermaid
303
+ graph LR
304
+ subgraph Your App
305
+ API[FastAPI]
306
+ Agent[PydanticAI]
307
+ DB[(Database)]
308
+ Cache[(Redis)]
309
+ Queue[Celery/Taskiq]
310
+ HTTP[HTTPX]
311
+ end
312
+
313
+ subgraph Logfire
314
+ Traces[Traces]
315
+ Metrics[Metrics]
316
+ Logs[Logs]
317
+ end
318
+
319
+ API --> Traces
320
+ Agent --> Traces
321
+ DB --> Traces
322
+ Cache --> Traces
323
+ Queue --> Traces
324
+ HTTP --> Traces
325
+ ```
326
+
327
+ | Component | What You See |
328
+ |-----------|-------------|
329
+ | **PydanticAI** | Agent runs, tool calls, LLM requests, token usage, streaming events |
330
+ | **FastAPI** | Request/response traces, latency, status codes, route performance |
331
+ | **PostgreSQL/MongoDB** | Query execution time, slow queries, connection pool stats |
332
+ | **Redis** | Cache hits/misses, command latency, key patterns |
333
+ | **Celery/Taskiq** | Task execution, queue depth, worker performance |
334
+ | **HTTPX** | External API calls, response times, error rates |
335
+
336
+ ### Configuration
337
+
338
+ Enable Logfire and select which components to instrument:
339
+
340
+ ```bash
341
+ fastapi-fullstack new
342
+ # ✓ Enable Logfire observability
343
+ # ✓ Instrument FastAPI
344
+ # ✓ Instrument Database
345
+ # ✓ Instrument Redis
346
+ # ✓ Instrument Celery
347
+ # ✓ Instrument HTTPX
348
+ ```
349
+
350
+ ### Usage
351
+
352
+ ```python
353
+ # Automatic instrumentation in app/main.py
354
+ import logfire
355
+
356
+ logfire.configure()
357
+ logfire.instrument_fastapi(app)
358
+ logfire.instrument_asyncpg()
359
+ logfire.instrument_redis()
360
+ logfire.instrument_httpx()
361
+ ```
362
+
363
+ ```python
364
+ # Manual spans for custom logic
365
+ with logfire.span("process_order", order_id=order.id):
366
+ await validate_order(order)
367
+ await charge_payment(order)
368
+ await send_confirmation(order)
369
+ ```
370
+
371
+ For more details, see [Logfire Documentation](https://logfire.pydantic.dev/docs/integrations/).
372
+
373
+ ---
374
+
375
+ ## 🛠️ Django-style CLI
376
+
377
+ Each generated project includes a powerful CLI inspired by Django's management commands:
378
+
379
+ ### Built-in Commands
380
+
381
+ ```bash
382
+ # Server
383
+ my_app server run --reload
384
+ my_app server routes
385
+
386
+ # Database (Alembic wrapper)
387
+ my_app db init
388
+ my_app db migrate -m "Add users"
389
+ my_app db upgrade
390
+
391
+ # Users
392
+ my_app user create --email admin@example.com --superuser
393
+ my_app user list
394
+ ```
395
+
396
+ ### Custom Commands
397
+
398
+ Create your own commands with auto-discovery:
399
+
400
+ ```python
401
+ # app/commands/seed.py
402
+ from app.commands import command, success, error
403
+ import click
404
+
405
+ @command("seed", help="Seed database with test data")
406
+ @click.option("--count", "-c", default=10, type=int)
407
+ @click.option("--dry-run", is_flag=True)
408
+ def seed_database(count: int, dry_run: bool):
409
+ """Seed the database with sample data."""
410
+ if dry_run:
411
+ info(f"[DRY RUN] Would create {count} records")
412
+ return
413
+
414
+ # Your logic here
415
+ success(f"Created {count} records!")
416
+ ```
417
+
418
+ Commands are **automatically discovered** from `app/commands/` - just create a file and use the `@command` decorator.
419
+
420
+ ```bash
421
+ my_app cmd seed --count 100
422
+ my_app cmd seed --dry-run
423
+ ```
424
+
425
+ ---
426
+
427
+ ## 📁 Generated Project Structure
428
+
429
+ ```
430
+ my_project/
431
+ ├── backend/
432
+ │ ├── app/
433
+ │ │ ├── main.py # FastAPI app with lifespan
434
+ │ │ ├── api/
435
+ │ │ │ ├── routes/v1/ # Versioned API endpoints
436
+ │ │ │ ├── deps.py # Dependency injection
437
+ │ │ │ └── router.py # Route aggregation
438
+ │ │ ├── core/ # Config, security, middleware
439
+ │ │ ├── db/models/ # SQLAlchemy/MongoDB models
440
+ │ │ ├── schemas/ # Pydantic schemas
441
+ │ │ ├── repositories/ # Data access layer
442
+ │ │ ├── services/ # Business logic
443
+ │ │ ├── agents/ # PydanticAI agents
444
+ │ │ ├── commands/ # Django-style CLI commands
445
+ │ │ └── worker/ # Background tasks
446
+ │ ├── cli/ # Project CLI
447
+ │ ├── tests/ # pytest test suite
448
+ │ └── alembic/ # Database migrations
449
+ ├── frontend/
450
+ │ ├── src/
451
+ │ │ ├── app/ # Next.js App Router
452
+ │ │ ├── components/ # React components
453
+ │ │ ├── hooks/ # useChat, useWebSocket, etc.
454
+ │ │ └── stores/ # Zustand state management
455
+ │ └── e2e/ # Playwright tests
456
+ ├── docker-compose.yml
457
+ ├── Makefile
458
+ └── README.md
459
+ ```
460
+
461
+ ---
462
+
463
+ ## ⚙️ Configuration Options
464
+
465
+ ### Core Options
466
+
467
+ | Option | Values | Description |
468
+ |--------|--------|-------------|
469
+ | **Database** | `postgresql`, `mongodb`, `sqlite`, `none` | Async by default |
470
+ | **Auth** | `jwt`, `api_key`, `both`, `none` | JWT includes user management |
471
+ | **OAuth** | `none`, `google` | Social login |
472
+ | **Background Tasks** | `none`, `celery`, `taskiq`, `arq` | Distributed queues |
473
+ | **Frontend** | `none`, `nextjs` | Next.js 15 + React 19 |
474
+
475
+ ### Integrations
476
+
477
+ Select what you need:
478
+
479
+ ```bash
480
+ fastapi-fullstack new
481
+ # ✓ Redis (caching/sessions)
482
+ # ✓ Rate limiting (slowapi)
483
+ # ✓ Pagination (fastapi-pagination)
484
+ # ✓ Admin Panel (SQLAdmin)
485
+ # ✓ AI Agent (PydanticAI)
486
+ # ✓ Webhooks
487
+ # ✓ Sentry
488
+ # ✓ Logfire
489
+ # ✓ Prometheus
490
+ # ... and more
491
+ ```
492
+
493
+ ---
494
+
495
+ ## 📚 Documentation
496
+
497
+ | Document | Description |
498
+ |----------|-------------|
499
+ | [Architecture](./docs/architecture.md) | Repository + Service pattern, layered design |
500
+ | [Frontend](./docs/frontend.md) | Next.js setup, auth, state management |
501
+ | [AI Agent](./docs/ai-agent.md) | PydanticAI, tools, WebSocket streaming |
502
+ | [Observability](./docs/observability.md) | Logfire integration, tracing, metrics |
503
+ | [Deployment](./docs/deployment.md) | Docker, Kubernetes, production setup |
504
+ | [Development](./docs/development.md) | Local setup, testing, debugging |
505
+
506
+ ---
507
+
508
+ ## Star History
509
+
510
+ <a href="https://www.star-history.com/#vstorm-co/full-stack-fastapi-nextjs-llm-template&type=Date&legend=top-left">
511
+ <picture>
512
+ <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=vstorm-co/full-stack-fastapi-nextjs-llm-template&type=Date&theme=dark" />
513
+ <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=vstorm-co/full-stack-fastapi-nextjs-llm-template&type=Date" />
514
+ <img alt="Star History Chart" src="https://api.star-history.com/svg?repos=vstorm-co/full-stack-fastapi-nextjs-llm-template&type=Date" />
515
+ </picture>
516
+ </a>
517
+
518
+ ---
519
+
520
+ ## 🙏 Inspiration
521
+
522
+ This project is inspired by:
523
+
524
+ - [full-stack-fastapi-template](https://github.com/fastapi/full-stack-fastapi-template) by @tiangolo
525
+ - [fastapi-template](https://github.com/s3rius/fastapi-template) by @s3rius
526
+ - [FastAPI Best Practices](https://github.com/zhanymkanov/fastapi-best-practices) by @zhanymkanov
527
+ - Django's management commands system
528
+
529
+ ---
530
+
531
+ ## 🤝 Contributing
532
+
533
+ Contributions are welcome! Please read our [Contributing Guide](./CONTRIBUTING.md) for details.
534
+
535
+ ---
536
+
537
+ ## 📄 License
538
+
539
+ MIT License - see [LICENSE](./LICENSE) for details.
540
+
541
+ ---
542
+
543
+ <p align="center">
544
+ Made with ❤️ by <a href="https://github.com/vstorm-co">VStorm</a>
545
+ </p>