fastapi-fullstack 0.1.7__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 (241) hide show
  1. fastapi_fullstack-0.1.7.dist-info/METADATA +739 -0
  2. fastapi_fullstack-0.1.7.dist-info/RECORD +241 -0
  3. fastapi_fullstack-0.1.7.dist-info/WHEEL +4 -0
  4. fastapi_fullstack-0.1.7.dist-info/entry_points.txt +2 -0
  5. fastapi_fullstack-0.1.7.dist-info/licenses/LICENSE +21 -0
  6. fastapi_gen/__init__.py +3 -0
  7. fastapi_gen/cli.py +442 -0
  8. fastapi_gen/config.py +356 -0
  9. fastapi_gen/generator.py +207 -0
  10. fastapi_gen/prompts.py +874 -0
  11. fastapi_gen/template/VARIABLES.md +276 -0
  12. fastapi_gen/template/cookiecutter.json +93 -0
  13. fastapi_gen/template/hooks/post_gen_project.py +355 -0
  14. fastapi_gen/template/{{cookiecutter.project_slug}}/.env.prod.example +56 -0
  15. fastapi_gen/template/{{cookiecutter.project_slug}}/.github/workflows/ci.yml +150 -0
  16. fastapi_gen/template/{{cookiecutter.project_slug}}/.gitignore +109 -0
  17. fastapi_gen/template/{{cookiecutter.project_slug}}/AGENTS.md +55 -0
  18. fastapi_gen/template/{{cookiecutter.project_slug}}/CLAUDE.md +99 -0
  19. fastapi_gen/template/{{cookiecutter.project_slug}}/Makefile +315 -0
  20. fastapi_gen/template/{{cookiecutter.project_slug}}/README.md +768 -0
  21. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/.dockerignore +60 -0
  22. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/.env.example +155 -0
  23. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/.pre-commit-config.yaml +32 -0
  24. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/Dockerfile +56 -0
  25. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/alembic/env.py +76 -0
  26. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/alembic/script.py.mako +30 -0
  27. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/alembic/versions/.gitkeep +0 -0
  28. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/alembic.ini +48 -0
  29. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/__init__.py +3 -0
  30. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/admin.py +447 -0
  31. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/agents/__init__.py +23 -0
  32. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/agents/assistant.py +226 -0
  33. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/agents/langchain_assistant.py +226 -0
  34. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/agents/prompts.py +10 -0
  35. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/agents/tools/__init__.py +13 -0
  36. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/agents/tools/datetime_tool.py +17 -0
  37. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/api/__init__.py +1 -0
  38. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/api/deps.py +541 -0
  39. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/api/exception_handlers.py +98 -0
  40. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/api/router.py +10 -0
  41. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/api/routes/__init__.py +9 -0
  42. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/api/routes/v1/__init__.py +87 -0
  43. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/api/routes/v1/agent.py +902 -0
  44. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/api/routes/v1/auth.py +395 -0
  45. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/api/routes/v1/conversations.py +498 -0
  46. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/api/routes/v1/health.py +227 -0
  47. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/api/routes/v1/items.py +275 -0
  48. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/api/routes/v1/oauth.py +205 -0
  49. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/api/routes/v1/sessions.py +168 -0
  50. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/api/routes/v1/users.py +333 -0
  51. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/api/routes/v1/webhooks.py +477 -0
  52. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/api/routes/v1/ws.py +46 -0
  53. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/api/versioning.py +221 -0
  54. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/clients/__init__.py +14 -0
  55. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/clients/redis.py +88 -0
  56. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/commands/__init__.py +117 -0
  57. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/commands/cleanup.py +75 -0
  58. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/commands/example.py +28 -0
  59. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/commands/seed.py +266 -0
  60. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/core/__init__.py +5 -0
  61. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/core/cache.py +23 -0
  62. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/core/config.py +267 -0
  63. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/core/csrf.py +153 -0
  64. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/core/exceptions.py +122 -0
  65. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/core/logfire_setup.py +101 -0
  66. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/core/middleware.py +99 -0
  67. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/core/oauth.py +23 -0
  68. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/core/rate_limit.py +58 -0
  69. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/core/sanitize.py +271 -0
  70. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/core/security.py +102 -0
  71. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/db/__init__.py +7 -0
  72. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/db/base.py +41 -0
  73. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/db/models/__init__.py +31 -0
  74. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/db/models/conversation.py +319 -0
  75. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/db/models/item.py +96 -0
  76. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/db/models/session.py +126 -0
  77. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/db/models/user.py +218 -0
  78. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/db/models/webhook.py +244 -0
  79. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/db/session.py +130 -0
  80. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/main.py +334 -0
  81. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/pipelines/__init__.py +9 -0
  82. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/pipelines/base.py +73 -0
  83. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/repositories/__init__.py +49 -0
  84. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/repositories/base.py +154 -0
  85. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/repositories/conversation.py +838 -0
  86. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/repositories/item.py +222 -0
  87. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/repositories/session.py +318 -0
  88. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/repositories/user.py +322 -0
  89. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/repositories/webhook.py +358 -0
  90. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/schemas/__init__.py +50 -0
  91. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/schemas/base.py +57 -0
  92. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/schemas/conversation.py +192 -0
  93. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/schemas/item.py +52 -0
  94. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/schemas/session.py +42 -0
  95. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/schemas/token.py +31 -0
  96. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/schemas/user.py +64 -0
  97. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/schemas/webhook.py +89 -0
  98. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/services/__init__.py +38 -0
  99. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/services/conversation.py +850 -0
  100. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/services/item.py +246 -0
  101. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/services/session.py +333 -0
  102. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/services/user.py +432 -0
  103. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/services/webhook.py +561 -0
  104. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/worker/__init__.py +5 -0
  105. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/worker/celery_app.py +64 -0
  106. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/worker/taskiq_app.py +38 -0
  107. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/worker/tasks/__init__.py +25 -0
  108. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/worker/tasks/examples.py +106 -0
  109. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/worker/tasks/schedules.py +29 -0
  110. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/app/worker/tasks/taskiq_examples.py +92 -0
  111. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/cli/__init__.py +1 -0
  112. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/cli/commands.py +438 -0
  113. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/pyproject.toml +180 -0
  114. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/scripts/.gitkeep +0 -0
  115. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/tests/__init__.py +1 -0
  116. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/tests/api/__init__.py +1 -0
  117. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/tests/api/test_auth.py +242 -0
  118. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/tests/api/test_exceptions.py +151 -0
  119. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/tests/api/test_health.py +113 -0
  120. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/tests/api/test_items.py +310 -0
  121. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/tests/api/test_users.py +253 -0
  122. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/tests/conftest.py +151 -0
  123. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/tests/test_admin.py +890 -0
  124. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/tests/test_agents.py +261 -0
  125. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/tests/test_clients.py +183 -0
  126. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/tests/test_commands.py +173 -0
  127. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/tests/test_core.py +143 -0
  128. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/tests/test_pipelines.py +118 -0
  129. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/tests/test_repositories.py +181 -0
  130. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/tests/test_security.py +124 -0
  131. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/tests/test_services.py +363 -0
  132. fastapi_gen/template/{{cookiecutter.project_slug}}/backend/tests/test_worker.py +85 -0
  133. fastapi_gen/template/{{cookiecutter.project_slug}}/docker-compose.dev.yml +242 -0
  134. fastapi_gen/template/{{cookiecutter.project_slug}}/docker-compose.frontend.yml +31 -0
  135. fastapi_gen/template/{{cookiecutter.project_slug}}/docker-compose.prod.yml +435 -0
  136. fastapi_gen/template/{{cookiecutter.project_slug}}/docker-compose.yml +241 -0
  137. fastapi_gen/template/{{cookiecutter.project_slug}}/docs/adding_features.md +132 -0
  138. fastapi_gen/template/{{cookiecutter.project_slug}}/docs/architecture.md +63 -0
  139. fastapi_gen/template/{{cookiecutter.project_slug}}/docs/patterns.md +161 -0
  140. fastapi_gen/template/{{cookiecutter.project_slug}}/docs/testing.md +120 -0
  141. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/.dockerignore +40 -0
  142. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/.env.example +12 -0
  143. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/.gitignore +45 -0
  144. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/.prettierignore +19 -0
  145. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/.prettierrc +11 -0
  146. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/Dockerfile +44 -0
  147. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/README.md +648 -0
  148. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/e2e/auth.setup.ts +49 -0
  149. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/e2e/auth.spec.ts +134 -0
  150. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/e2e/chat.spec.ts +207 -0
  151. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/e2e/home.spec.ts +73 -0
  152. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/instrumentation.ts +14 -0
  153. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/messages/en.json +84 -0
  154. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/messages/pl.json +84 -0
  155. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/next.config.ts +76 -0
  156. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/package.json +69 -0
  157. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/playwright.config.ts +101 -0
  158. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/postcss.config.mjs +7 -0
  159. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/app/[locale]/(auth)/layout.tsx +11 -0
  160. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/app/[locale]/(auth)/login/page.tsx +5 -0
  161. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/app/[locale]/(auth)/register/page.tsx +5 -0
  162. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/app/[locale]/(dashboard)/chat/page.tsx +48 -0
  163. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/app/[locale]/(dashboard)/dashboard/page.tsx +99 -0
  164. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/app/[locale]/(dashboard)/layout.tsx +17 -0
  165. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/app/[locale]/(dashboard)/profile/page.tsx +152 -0
  166. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/app/[locale]/auth/callback/page.tsx +113 -0
  167. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/app/[locale]/layout.tsx +46 -0
  168. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/app/[locale]/page.tsx +73 -0
  169. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/app/api/auth/login/route.ts +58 -0
  170. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/app/api/auth/logout/route.ts +24 -0
  171. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/app/api/auth/me/route.ts +39 -0
  172. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/app/api/auth/oauth-callback/route.ts +50 -0
  173. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/app/api/auth/refresh/route.ts +54 -0
  174. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/app/api/auth/register/route.ts +26 -0
  175. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/app/api/conversations/[id]/messages/route.ts +41 -0
  176. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/app/api/conversations/[id]/route.ts +108 -0
  177. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/app/api/conversations/route.ts +73 -0
  178. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/app/api/health/route.ts +21 -0
  179. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/app/globals.css +323 -0
  180. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/app/layout.tsx +22 -0
  181. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/app/providers.tsx +29 -0
  182. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/auth/index.ts +2 -0
  183. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/auth/login-form.tsx +120 -0
  184. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/auth/register-form.tsx +153 -0
  185. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/chat/chat-container.tsx +234 -0
  186. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/chat/chat-input.tsx +72 -0
  187. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/chat/conversation-sidebar.tsx +328 -0
  188. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/chat/copy-button.tsx +46 -0
  189. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/chat/index.ts +11 -0
  190. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/chat/local-conversation-sidebar.tsx +295 -0
  191. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/chat/markdown-content.tsx +167 -0
  192. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/chat/message-item.tsx +79 -0
  193. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/chat/message-list.tsx +18 -0
  194. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/chat/tool-call-card.tsx +79 -0
  195. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/icons/google-icon.tsx +32 -0
  196. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/icons/index.ts +3 -0
  197. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/language-switcher.tsx +97 -0
  198. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/layout/header.tsx +65 -0
  199. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/layout/index.ts +2 -0
  200. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/layout/sidebar.tsx +82 -0
  201. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/theme/index.ts +7 -0
  202. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/theme/theme-provider.tsx +53 -0
  203. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/theme/theme-toggle.tsx +105 -0
  204. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/ui/badge.tsx +35 -0
  205. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/ui/button.test.tsx +75 -0
  206. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/ui/button.tsx +56 -0
  207. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/ui/card.tsx +82 -0
  208. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/ui/index.ts +13 -0
  209. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/ui/input.tsx +21 -0
  210. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/ui/label.tsx +21 -0
  211. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/components/ui/sheet.tsx +109 -0
  212. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/hooks/index.ts +7 -0
  213. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/hooks/use-auth.ts +97 -0
  214. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/hooks/use-chat.ts +203 -0
  215. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/hooks/use-conversations.ts +181 -0
  216. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/hooks/use-local-chat.ts +165 -0
  217. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/hooks/use-websocket.ts +105 -0
  218. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/i18n.ts +37 -0
  219. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/lib/api-client.ts +90 -0
  220. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/lib/constants.ts +39 -0
  221. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/lib/server-api.ts +78 -0
  222. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/lib/utils.test.ts +44 -0
  223. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/lib/utils.ts +44 -0
  224. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/middleware.ts +31 -0
  225. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/stores/auth-store.test.ts +72 -0
  226. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/stores/auth-store.ts +64 -0
  227. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/stores/chat-sidebar-store.ts +17 -0
  228. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/stores/chat-store.ts +65 -0
  229. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/stores/conversation-store.ts +76 -0
  230. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/stores/index.ts +9 -0
  231. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/stores/local-chat-store.ts +255 -0
  232. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/stores/sidebar-store.ts +17 -0
  233. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/stores/theme-store.ts +44 -0
  234. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/types/api.ts +27 -0
  235. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/types/auth.ts +52 -0
  236. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/types/chat.ts +83 -0
  237. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/types/conversation.ts +49 -0
  238. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/src/types/index.ts +10 -0
  239. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/tsconfig.json +28 -0
  240. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/vitest.config.ts +36 -0
  241. fastapi_gen/template/{{cookiecutter.project_slug}}/frontend/vitest.setup.ts +56 -0
@@ -0,0 +1,276 @@
1
+ # Cookiecutter Template Variables
2
+
3
+ This document describes all variables available in `cookiecutter.json` for the fastapi-fullstack template.
4
+
5
+ ## Table of Contents
6
+
7
+ - [Metadata](#metadata)
8
+ - [Project Information](#project-information)
9
+ - [Database Settings](#database-settings)
10
+ - [Authentication](#authentication)
11
+ - [OAuth](#oauth)
12
+ - [Observability (Logfire)](#observability-logfire)
13
+ - [Background Tasks](#background-tasks)
14
+ - [Redis & Caching](#redis--caching)
15
+ - [Rate Limiting](#rate-limiting)
16
+ - [Features](#features)
17
+ - [AI Agent](#ai-agent)
18
+ - [WebSocket](#websocket)
19
+ - [Development Tools](#development-tools)
20
+ - [Deployment](#deployment)
21
+ - [Frontend](#frontend)
22
+
23
+ ---
24
+
25
+ ## Metadata
26
+
27
+ These variables are set automatically by the generator.
28
+
29
+ | Variable | Type | Default | Description |
30
+ |----------|------|---------|-------------|
31
+ | `generator_name` | string | `"fastapi-fullstack"` | Name of the generator tool |
32
+ | `generator_version` | string | `"DYNAMIC"` | Version of the generator (set at runtime) |
33
+ | `generated_at` | string | `""` | Timestamp when project was generated |
34
+
35
+ ---
36
+
37
+ ## Project Information
38
+
39
+ | Variable | Type | Default | Description |
40
+ |----------|------|---------|-------------|
41
+ | `project_name` | string | `"my_project"` | Name of the project. Must match pattern `^[a-z][a-z0-9_]*$` |
42
+ | `project_slug` | computed | - | URL-safe version derived from `project_name` |
43
+ | `project_description` | string | `"A FastAPI project"` | Short description of the project |
44
+ | `author_name` | string | `"Your Name"` | Author's full name |
45
+ | `author_email` | string | `"your@email.com"` | Author's email address (validated format) |
46
+
47
+ ---
48
+
49
+ ## Database Settings
50
+
51
+ | Variable | Type | Default | Description | Dependencies |
52
+ |----------|------|---------|-------------|--------------|
53
+ | `database` | enum | `"postgresql"` | Database type. Values: `postgresql`, `mongodb`, `sqlite`, `none` | - |
54
+ | `use_postgresql` | bool | `true` | PostgreSQL is selected | Computed from `database` |
55
+ | `use_mongodb` | bool | `false` | MongoDB is selected | Computed from `database` |
56
+ | `use_sqlite` | bool | `false` | SQLite is selected | Computed from `database` |
57
+ | `use_database` | bool | `true` | Any database is enabled | Computed from `database` |
58
+ | `db_pool_size` | int | `5` | Database connection pool size | Requires SQL database |
59
+ | `db_max_overflow` | int | `10` | Max overflow connections above pool size | Requires SQL database |
60
+ | `db_pool_timeout` | int | `30` | Timeout (seconds) waiting for connection | Requires SQL database |
61
+
62
+ **Notes:**
63
+ - PostgreSQL uses `asyncpg` for async operations
64
+ - MongoDB uses `motor` for async operations
65
+ - SQLite is synchronous and not recommended for production
66
+
67
+ ---
68
+
69
+ ## Authentication
70
+
71
+ | Variable | Type | Default | Description | Dependencies |
72
+ |----------|------|---------|-------------|--------------|
73
+ | `auth` | enum | `"jwt"` | Authentication type. Values: `jwt`, `api_key`, `none` | - |
74
+ | `use_jwt` | bool | `true` | JWT authentication is selected | Computed from `auth` |
75
+ | `use_api_key` | bool | `false` | API Key authentication is selected | Computed from `auth` |
76
+ | `use_auth` | bool | `true` | Any authentication is enabled | Computed from `auth` |
77
+
78
+ ---
79
+
80
+ ## OAuth
81
+
82
+ | Variable | Type | Default | Description | Dependencies |
83
+ |----------|------|---------|-------------|--------------|
84
+ | `oauth_provider` | enum | `"none"` | OAuth provider. Values: `google`, `none` | - |
85
+ | `enable_oauth` | bool | `false` | OAuth is enabled | Computed from `oauth_provider` |
86
+ | `enable_oauth_google` | bool | `false` | Google OAuth is enabled | Computed from `oauth_provider` |
87
+ | `enable_session_management` | bool | `false` | Enable session management for OAuth | Requires OAuth |
88
+
89
+ ---
90
+
91
+ ## Observability (Logfire)
92
+
93
+ | Variable | Type | Default | Description | Dependencies |
94
+ |----------|------|---------|-------------|--------------|
95
+ | `enable_logfire` | bool | `true` | Enable Logfire observability | - |
96
+ | `logfire_fastapi` | bool | `true` | Instrument FastAPI with Logfire | Requires `enable_logfire` |
97
+ | `logfire_database` | bool | `true` | Instrument database with Logfire | Requires `enable_logfire` and database |
98
+ | `logfire_redis` | bool | `false` | Instrument Redis with Logfire | Requires `enable_logfire` and Redis |
99
+ | `logfire_celery` | bool | `false` | Instrument Celery with Logfire | Requires `enable_logfire` and Celery |
100
+ | `logfire_httpx` | bool | `false` | Instrument HTTPX client with Logfire | Requires `enable_logfire` |
101
+
102
+ ---
103
+
104
+ ## Background Tasks
105
+
106
+ | Variable | Type | Default | Description | Dependencies |
107
+ |----------|------|---------|-------------|--------------|
108
+ | `background_tasks` | enum | `"none"` | Background task system. Values: `celery`, `taskiq`, `arq`, `none` | - |
109
+ | `use_celery` | bool | `false` | Celery is selected | Computed from `background_tasks` |
110
+ | `use_taskiq` | bool | `false` | Taskiq is selected | Computed from `background_tasks` |
111
+ | `use_arq` | bool | `false` | ARQ is selected | Computed from `background_tasks` |
112
+
113
+ **Notes:**
114
+ - Celery requires Redis as broker
115
+ - Taskiq and ARQ also benefit from Redis
116
+
117
+ ---
118
+
119
+ ## Redis & Caching
120
+
121
+ | Variable | Type | Default | Description | Dependencies |
122
+ |----------|------|---------|-------------|--------------|
123
+ | `enable_redis` | bool | `false` | Enable Redis integration | - |
124
+ | `enable_caching` | bool | `false` | Enable response caching | Requires Redis |
125
+
126
+ **Notes:**
127
+ - Redis is automatically enabled when using Celery, ARQ, or Redis-based rate limiting
128
+
129
+ ---
130
+
131
+ ## Rate Limiting
132
+
133
+ | Variable | Type | Default | Description | Dependencies |
134
+ |----------|------|---------|-------------|--------------|
135
+ | `enable_rate_limiting` | bool | `false` | Enable API rate limiting | - |
136
+ | `rate_limit_requests` | int | `100` | Number of requests allowed | Requires `enable_rate_limiting` |
137
+ | `rate_limit_period` | int | `60` | Period in seconds for rate limit window | Requires `enable_rate_limiting` |
138
+ | `rate_limit_storage` | enum | `"memory"` | Rate limit storage backend. Values: `memory`, `redis` | Requires `enable_rate_limiting` |
139
+ | `rate_limit_storage_memory` | bool | `true` | Memory storage is selected | Computed from `rate_limit_storage` |
140
+ | `rate_limit_storage_redis` | bool | `false` | Redis storage is selected | Computed from `rate_limit_storage` |
141
+
142
+ **Notes:**
143
+ - Memory storage is not suitable for multi-process deployments
144
+ - Redis storage requires Redis to be enabled
145
+
146
+ ---
147
+
148
+ ## Features
149
+
150
+ | Variable | Type | Default | Description | Dependencies |
151
+ |----------|------|---------|-------------|--------------|
152
+ | `enable_pagination` | bool | `true` | Enable pagination utilities | - |
153
+ | `enable_sentry` | bool | `false` | Enable Sentry error tracking | - |
154
+ | `enable_prometheus` | bool | `false` | Enable Prometheus metrics | - |
155
+ | `enable_admin_panel` | bool | `false` | Enable SQLAdmin panel | Requires SQL database |
156
+ | `admin_environments` | enum | `"dev_staging"` | Environments where admin is active. Values: `all`, `dev_only`, `dev_staging`, `disabled` | Requires `enable_admin_panel` |
157
+ | `admin_env_all` | bool | `false` | Admin enabled in all environments | Computed from `admin_environments` |
158
+ | `admin_env_dev_only` | bool | `false` | Admin enabled only in dev | Computed from `admin_environments` |
159
+ | `admin_env_dev_staging` | bool | `true` | Admin enabled in dev and staging | Computed from `admin_environments` |
160
+ | `admin_env_disabled` | bool | `false` | Admin is disabled | Computed from `admin_environments` |
161
+ | `admin_require_auth` | bool | `true` | Require authentication for admin panel | Requires `enable_admin_panel` |
162
+ | `enable_websockets` | bool | `false` | Enable WebSocket support | - |
163
+ | `enable_file_storage` | bool | `false` | Enable file upload/storage | - |
164
+ | `enable_cors` | bool | `true` | Enable CORS middleware | - |
165
+ | `enable_orjson` | bool | `true` | Use orjson for faster JSON serialization | - |
166
+ | `enable_i18n` | bool | `false` | Enable internationalization | - |
167
+ | `include_example_crud` | bool | `true` | Include example CRUD endpoints | Requires database |
168
+ | `enable_webhooks` | bool | `false` | Enable webhook support | - |
169
+
170
+ ---
171
+
172
+ ## AI Agent
173
+
174
+ | Variable | Type | Default | Description | Dependencies |
175
+ |----------|------|---------|-------------|--------------|
176
+ | `enable_ai_agent` | bool | `false` | Enable AI agent functionality | - |
177
+ | `ai_framework` | enum | `"pydantic_ai"` | AI framework. Values: `pydantic_ai`, `langchain` | Requires `enable_ai_agent` |
178
+ | `use_pydantic_ai` | bool | `true` | PydanticAI is selected | Computed from `ai_framework` |
179
+ | `use_langchain` | bool | `false` | LangChain is selected | Computed from `ai_framework` |
180
+ | `llm_provider` | enum | `"openai"` | LLM provider. Values: `openai`, `anthropic`, `openrouter` | Requires `enable_ai_agent` |
181
+ | `use_openai` | bool | `true` | OpenAI is selected | Computed from `llm_provider` |
182
+ | `use_anthropic` | bool | `false` | Anthropic is selected | Computed from `llm_provider` |
183
+ | `use_openrouter` | bool | `false` | OpenRouter is selected | Computed from `llm_provider` |
184
+ | `enable_conversation_persistence` | bool | `false` | Persist AI conversations to database | Requires `enable_ai_agent` and database |
185
+
186
+ **Notes:**
187
+ - PydanticAI uses `iter()` for full event streaming over WebSocket
188
+ - OpenRouter with LangChain is not supported
189
+
190
+ ---
191
+
192
+ ## WebSocket
193
+
194
+ | Variable | Type | Default | Description | Dependencies |
195
+ |----------|------|---------|-------------|--------------|
196
+ | `websocket_auth` | enum | `"none"` | WebSocket authentication. Values: `jwt`, `api_key`, `none` | Requires `enable_websockets` |
197
+ | `websocket_auth_jwt` | bool | `false` | JWT auth for WebSocket | Computed from `websocket_auth` |
198
+ | `websocket_auth_api_key` | bool | `false` | API Key auth for WebSocket | Computed from `websocket_auth` |
199
+ | `websocket_auth_none` | bool | `true` | No auth for WebSocket | Computed from `websocket_auth` |
200
+
201
+ ---
202
+
203
+ ## Development Tools
204
+
205
+ | Variable | Type | Default | Description |
206
+ |----------|------|---------|-------------|
207
+ | `enable_pytest` | bool | `true` | Include pytest configuration and fixtures |
208
+ | `enable_precommit` | bool | `true` | Include pre-commit hooks configuration |
209
+ | `enable_makefile` | bool | `true` | Include Makefile with common commands |
210
+ | `enable_docker` | bool | `true` | Include Dockerfile and docker-compose |
211
+ | `generate_env` | bool | `true` | Generate `.env.example` file |
212
+ | `python_version` | string | `"3.12"` | Python version for the project |
213
+
214
+ ---
215
+
216
+ ## Deployment
217
+
218
+ | Variable | Type | Default | Description | Dependencies |
219
+ |----------|------|---------|-------------|--------------|
220
+ | `ci_type` | enum | `"github"` | CI/CD system. Values: `github`, `gitlab`, `none` | - |
221
+ | `use_github_actions` | bool | `true` | GitHub Actions is selected | Computed from `ci_type` |
222
+ | `use_gitlab_ci` | bool | `false` | GitLab CI is selected | Computed from `ci_type` |
223
+ | `enable_kubernetes` | bool | `false` | Include Kubernetes manifests | - |
224
+ | `reverse_proxy` | enum | `"traefik_included"` | Reverse proxy config. Values: `traefik_included`, `traefik_external`, `none` | Requires Docker |
225
+ | `include_traefik_service` | bool | `true` | Include Traefik container in docker-compose | Computed from `reverse_proxy` |
226
+ | `include_traefik_labels` | bool | `true` | Include Traefik labels on services | Computed from `reverse_proxy` |
227
+
228
+ **Reverse Proxy Options:**
229
+ - `traefik_included`: Full Traefik setup included in docker-compose.prod.yml (default)
230
+ - `traefik_external`: Services have Traefik labels but no Traefik container (for shared Traefik)
231
+ - `none`: No reverse proxy, ports exposed directly (use your own nginx/caddy/HAProxy)
232
+
233
+ ---
234
+
235
+ ## Frontend
236
+
237
+ | Variable | Type | Default | Description | Dependencies |
238
+ |----------|------|---------|-------------|--------------|
239
+ | `frontend` | enum | `"none"` | Frontend framework. Values: `nextjs`, `none` | - |
240
+ | `use_frontend` | bool | `false` | Any frontend is enabled | Computed from `frontend` |
241
+ | `use_nextjs` | bool | `false` | Next.js is selected | Computed from `frontend` |
242
+ | `frontend_port` | int | `3000` | Port for frontend development server | Requires frontend |
243
+ | `backend_port` | int | `8000` | Port for backend server | - |
244
+
245
+ ---
246
+
247
+ ## Variable Naming Conventions
248
+
249
+ The template uses consistent naming patterns:
250
+
251
+ | Pattern | Meaning | Example |
252
+ |---------|---------|---------|
253
+ | `use_X` | Boolean flag, X is selected | `use_jwt`, `use_postgresql` |
254
+ | `enable_X` | Boolean flag, feature is enabled | `enable_redis`, `enable_cors` |
255
+ | `X_Y` | Grouped settings | `db_pool_size`, `rate_limit_requests` |
256
+ | `logfire_X` | Logfire instrumentation for X | `logfire_fastapi`, `logfire_database` |
257
+
258
+ ## Computed Variables
259
+
260
+ Many `use_*` and `enable_*` variables are computed from their parent enum variable:
261
+
262
+ ```
263
+ database = "postgresql"
264
+ → use_postgresql = true
265
+ → use_mongodb = false
266
+ → use_sqlite = false
267
+ → use_database = true
268
+ ```
269
+
270
+ These computed variables are used in Jinja2 conditionals within templates:
271
+
272
+ ```jinja2
273
+ {% if cookiecutter.use_postgresql %}
274
+ # PostgreSQL-specific code
275
+ {% endif %}
276
+ ```
@@ -0,0 +1,93 @@
1
+ {
2
+ "generator_name": "fastapi-fullstack",
3
+ "_generator_version_note": "Value below is overwritten by generator at runtime",
4
+ "generator_version": "DYNAMIC",
5
+ "generated_at": "",
6
+ "project_name": "my_project",
7
+ "project_slug": "{{ cookiecutter.project_name.lower().replace('-', '_') }}",
8
+ "project_description": "A FastAPI project",
9
+ "author_name": "Your Name",
10
+ "author_email": "your@email.com",
11
+ "database": "postgresql",
12
+ "use_postgresql": true,
13
+ "use_mongodb": false,
14
+ "use_sqlite": false,
15
+ "use_database": true,
16
+ "db_pool_size": 5,
17
+ "db_max_overflow": 10,
18
+ "db_pool_timeout": 30,
19
+ "auth": "jwt",
20
+ "use_jwt": true,
21
+ "use_api_key": false,
22
+ "use_auth": true,
23
+ "oauth_provider": "none",
24
+ "enable_oauth": false,
25
+ "enable_oauth_google": false,
26
+ "enable_session_management": false,
27
+ "enable_logfire": true,
28
+ "logfire_fastapi": true,
29
+ "logfire_database": true,
30
+ "logfire_redis": false,
31
+ "logfire_celery": false,
32
+ "logfire_httpx": false,
33
+ "background_tasks": "none",
34
+ "use_celery": false,
35
+ "use_taskiq": false,
36
+ "use_arq": false,
37
+ "enable_redis": false,
38
+ "enable_caching": false,
39
+ "enable_rate_limiting": false,
40
+ "rate_limit_requests": 100,
41
+ "rate_limit_period": 60,
42
+ "rate_limit_storage": "memory",
43
+ "rate_limit_storage_memory": true,
44
+ "rate_limit_storage_redis": false,
45
+ "enable_pagination": true,
46
+ "enable_sentry": false,
47
+ "enable_prometheus": false,
48
+ "enable_admin_panel": false,
49
+ "admin_environments": "dev_staging",
50
+ "admin_env_all": false,
51
+ "admin_env_dev_only": false,
52
+ "admin_env_dev_staging": true,
53
+ "admin_env_disabled": false,
54
+ "admin_require_auth": true,
55
+ "enable_websockets": false,
56
+ "enable_file_storage": false,
57
+ "enable_ai_agent": false,
58
+ "ai_framework": "pydantic_ai",
59
+ "use_pydantic_ai": true,
60
+ "use_langchain": false,
61
+ "llm_provider": "openai",
62
+ "use_openai": true,
63
+ "use_anthropic": false,
64
+ "use_openrouter": false,
65
+ "enable_conversation_persistence": false,
66
+ "enable_webhooks": false,
67
+ "websocket_auth": "none",
68
+ "websocket_auth_jwt": false,
69
+ "websocket_auth_api_key": false,
70
+ "websocket_auth_none": true,
71
+ "enable_cors": true,
72
+ "enable_orjson": true,
73
+ "enable_i18n": false,
74
+ "include_example_crud": true,
75
+ "enable_pytest": true,
76
+ "enable_precommit": true,
77
+ "enable_makefile": true,
78
+ "enable_docker": true,
79
+ "reverse_proxy": "traefik_included",
80
+ "include_traefik_service": true,
81
+ "include_traefik_labels": true,
82
+ "ci_type": "github",
83
+ "use_github_actions": true,
84
+ "use_gitlab_ci": false,
85
+ "enable_kubernetes": false,
86
+ "generate_env": true,
87
+ "python_version": "3.12",
88
+ "frontend": "none",
89
+ "use_frontend": false,
90
+ "use_nextjs": false,
91
+ "frontend_port": 3000,
92
+ "backend_port": 8000
93
+ }