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,76 @@
1
+ {
2
+ "project_name": "my_project",
3
+ "project_slug": "{{ cookiecutter.project_name.lower().replace('-', '_') }}",
4
+ "project_description": "A FastAPI project",
5
+ "author_name": "Your Name",
6
+ "author_email": "your@email.com",
7
+ "database": "postgresql",
8
+ "use_postgresql": true,
9
+ "use_mongodb": false,
10
+ "use_sqlite": false,
11
+ "use_database": true,
12
+ "db_pool_size": 5,
13
+ "db_max_overflow": 10,
14
+ "db_pool_timeout": 30,
15
+ "auth": "jwt",
16
+ "use_jwt": true,
17
+ "use_api_key": false,
18
+ "use_auth": true,
19
+ "oauth_provider": "none",
20
+ "enable_oauth": false,
21
+ "enable_oauth_google": false,
22
+ "enable_session_management": false,
23
+ "enable_logfire": true,
24
+ "logfire_fastapi": true,
25
+ "logfire_database": true,
26
+ "logfire_redis": false,
27
+ "logfire_celery": false,
28
+ "logfire_httpx": false,
29
+ "background_tasks": "none",
30
+ "use_celery": false,
31
+ "use_taskiq": false,
32
+ "use_arq": false,
33
+ "enable_redis": false,
34
+ "enable_caching": false,
35
+ "enable_rate_limiting": false,
36
+ "rate_limit_requests": 100,
37
+ "rate_limit_period": 60,
38
+ "enable_pagination": true,
39
+ "enable_sentry": false,
40
+ "enable_prometheus": false,
41
+ "enable_admin_panel": false,
42
+ "admin_environments": "dev_staging",
43
+ "admin_env_all": false,
44
+ "admin_env_dev_only": false,
45
+ "admin_env_dev_staging": true,
46
+ "admin_env_disabled": false,
47
+ "admin_require_auth": true,
48
+ "enable_websockets": false,
49
+ "enable_file_storage": false,
50
+ "enable_ai_agent": false,
51
+ "enable_conversation_persistence": false,
52
+ "enable_webhooks": false,
53
+ "websocket_auth": "none",
54
+ "websocket_auth_jwt": false,
55
+ "websocket_auth_api_key": false,
56
+ "websocket_auth_none": true,
57
+ "enable_cors": true,
58
+ "enable_orjson": true,
59
+ "enable_i18n": false,
60
+ "include_example_crud": true,
61
+ "enable_pytest": true,
62
+ "enable_precommit": true,
63
+ "enable_makefile": true,
64
+ "enable_docker": true,
65
+ "ci_type": "github",
66
+ "use_github_actions": true,
67
+ "use_gitlab_ci": false,
68
+ "enable_kubernetes": false,
69
+ "generate_env": true,
70
+ "python_version": "3.12",
71
+ "frontend": "none",
72
+ "use_frontend": false,
73
+ "use_nextjs": false,
74
+ "frontend_port": 3000,
75
+ "backend_port": 8000
76
+ }
@@ -0,0 +1,111 @@
1
+ #!/usr/bin/env python
2
+ """Post-generation hook for cookiecutter template."""
3
+
4
+ import os
5
+ import shutil
6
+ import subprocess
7
+ import sys
8
+
9
+ # Get cookiecutter variables
10
+ use_frontend = "{{ cookiecutter.use_frontend }}" == "True"
11
+ generate_env = "{{ cookiecutter.generate_env }}" == "True"
12
+
13
+ # Remove frontend folder if not using frontend
14
+ if not use_frontend:
15
+ frontend_dir = os.path.join(os.getcwd(), "frontend")
16
+ if os.path.exists(frontend_dir):
17
+ shutil.rmtree(frontend_dir)
18
+ print("Removed frontend/ directory (frontend not enabled)")
19
+
20
+ # Remove .env files if generate_env is false
21
+ if not generate_env:
22
+ backend_env = os.path.join(os.getcwd(), "backend", ".env")
23
+ if os.path.exists(backend_env):
24
+ os.remove(backend_env)
25
+ print("Removed backend/.env (generate_env disabled)")
26
+
27
+ frontend_env = os.path.join(os.getcwd(), "frontend", ".env.local")
28
+ if os.path.exists(frontend_env):
29
+ os.remove(frontend_env)
30
+ print("Removed frontend/.env.local (generate_env disabled)")
31
+
32
+ # Run ruff to auto-fix import sorting and other linting issues
33
+ backend_dir = os.path.join(os.getcwd(), "backend")
34
+ if os.path.exists(backend_dir):
35
+ ruff_cmd = None
36
+
37
+ # Try multiple methods to find/run ruff
38
+ # 1. Check if ruff is in PATH
39
+ ruff_path = shutil.which("ruff")
40
+ if ruff_path:
41
+ ruff_cmd = [ruff_path]
42
+ # 2. Try uvx ruff (if uv is installed)
43
+ elif shutil.which("uvx"):
44
+ ruff_cmd = ["uvx", "ruff"]
45
+ # 3. Try python -m ruff
46
+ else:
47
+ # Test if ruff is available as a module
48
+ result = subprocess.run(
49
+ [sys.executable, "-m", "ruff", "--version"],
50
+ capture_output=True,
51
+ check=False,
52
+ )
53
+ if result.returncode == 0:
54
+ ruff_cmd = [sys.executable, "-m", "ruff"]
55
+
56
+ if ruff_cmd:
57
+ print(f"Running ruff to format code (using: {' '.join(ruff_cmd)})...")
58
+ # Run ruff check --fix to auto-fix issues
59
+ subprocess.run(
60
+ [*ruff_cmd, "check", "--fix", "--quiet", backend_dir],
61
+ check=False,
62
+ )
63
+ # Run ruff format for consistent formatting
64
+ subprocess.run(
65
+ [*ruff_cmd, "format", "--quiet", backend_dir],
66
+ check=False,
67
+ )
68
+ print("Code formatting complete.")
69
+ else:
70
+ print("Warning: ruff not found. Run 'ruff format .' in backend/ to format code.")
71
+
72
+ # Format frontend with prettier if it exists
73
+ frontend_dir = os.path.join(os.getcwd(), "frontend")
74
+ if use_frontend and os.path.exists(frontend_dir):
75
+ # Try to find bun or npx for running prettier
76
+ bun_cmd = shutil.which("bun")
77
+ npx_cmd = shutil.which("npx")
78
+
79
+ if bun_cmd:
80
+ print("Installing frontend dependencies and formatting with Prettier...")
81
+ # Install dependencies first (prettier is a devDependency)
82
+ result = subprocess.run(
83
+ [bun_cmd, "install"],
84
+ cwd=frontend_dir,
85
+ capture_output=True,
86
+ check=False,
87
+ )
88
+ if result.returncode == 0:
89
+ # Format with prettier
90
+ subprocess.run(
91
+ [bun_cmd, "run", "format"],
92
+ cwd=frontend_dir,
93
+ capture_output=True,
94
+ check=False,
95
+ )
96
+ print("Frontend formatting complete.")
97
+ else:
98
+ print("Warning: Failed to install frontend dependencies.")
99
+ elif npx_cmd:
100
+ print("Formatting frontend with Prettier...")
101
+ subprocess.run(
102
+ [npx_cmd, "prettier", "--write", "."],
103
+ cwd=frontend_dir,
104
+ capture_output=True,
105
+ check=False,
106
+ )
107
+ print("Frontend formatting complete.")
108
+ else:
109
+ print("Warning: bun/npx not found. Run 'bun run format' in frontend/ to format code.")
110
+
111
+ print("Project generated successfully!")
@@ -0,0 +1,136 @@
1
+ # {{ cookiecutter.project_name }} Environment Variables
2
+
3
+ # === Project ===
4
+ PROJECT_NAME={{ cookiecutter.project_name }}
5
+ DEBUG=true
6
+ ENVIRONMENT=local
7
+
8
+ {%- if cookiecutter.enable_logfire %}
9
+
10
+ # === Logfire ===
11
+ # Get your token at https://logfire.pydantic.dev
12
+ LOGFIRE_TOKEN=
13
+ LOGFIRE_SERVICE_NAME={{ cookiecutter.project_slug }}
14
+ LOGFIRE_ENVIRONMENT=development
15
+ {%- endif %}
16
+
17
+ {%- if cookiecutter.use_postgresql %}
18
+
19
+ # === PostgreSQL ===
20
+ POSTGRES_HOST=localhost
21
+ POSTGRES_PORT=5432
22
+ POSTGRES_USER=postgres
23
+ POSTGRES_PASSWORD=postgres
24
+ POSTGRES_DB={{ cookiecutter.project_slug }}
25
+ {%- endif %}
26
+
27
+ {%- if cookiecutter.use_mongodb %}
28
+
29
+ # === MongoDB ===
30
+ MONGO_HOST=localhost
31
+ MONGO_PORT=27017
32
+ MONGO_DB={{ cookiecutter.project_slug }}
33
+ # MONGO_USER=
34
+ # MONGO_PASSWORD=
35
+ {%- endif %}
36
+
37
+ {%- if cookiecutter.use_sqlite %}
38
+
39
+ # === SQLite ===
40
+ SQLITE_PATH=./{{ cookiecutter.project_slug }}.db
41
+ {%- endif %}
42
+
43
+ {%- if cookiecutter.use_jwt %}
44
+
45
+ # === JWT Auth ===
46
+ # Generate with: openssl rand -hex 32
47
+ SECRET_KEY=change-me-in-production-use-openssl-rand-hex-32
48
+ ACCESS_TOKEN_EXPIRE_MINUTES=10080
49
+ ALGORITHM=HS256
50
+ {%- endif %}
51
+
52
+ {%- if cookiecutter.use_api_key %}
53
+
54
+ # === API Key Auth ===
55
+ API_KEY=change-me-in-production
56
+ API_KEY_HEADER=X-API-Key
57
+ {%- endif %}
58
+
59
+ {%- if cookiecutter.enable_redis %}
60
+
61
+ # === Redis ===
62
+ REDIS_HOST=localhost
63
+ REDIS_PORT=6379
64
+ # REDIS_PASSWORD=
65
+ REDIS_DB=0
66
+ {%- endif %}
67
+
68
+ {%- if cookiecutter.use_celery %}
69
+
70
+ # === Celery ===
71
+ CELERY_BROKER_URL=redis://localhost:6379/0
72
+ CELERY_RESULT_BACKEND=redis://localhost:6379/0
73
+ {%- endif %}
74
+
75
+ {%- if cookiecutter.use_taskiq %}
76
+
77
+ # === Taskiq ===
78
+ TASKIQ_BROKER_URL=redis://localhost:6379/1
79
+ TASKIQ_RESULT_BACKEND=redis://localhost:6379/1
80
+ {%- endif %}
81
+
82
+ {%- if cookiecutter.enable_sentry %}
83
+
84
+ # === Sentry ===
85
+ SENTRY_DSN=
86
+ {%- endif %}
87
+
88
+ {%- if cookiecutter.enable_file_storage %}
89
+
90
+ # === S3/MinIO Storage ===
91
+ S3_ENDPOINT=
92
+ S3_ACCESS_KEY=
93
+ S3_SECRET_KEY=
94
+ S3_BUCKET={{ cookiecutter.project_slug }}
95
+ S3_REGION=us-east-1
96
+ {%- endif %}
97
+
98
+ {%- if cookiecutter.enable_ai_agent %}
99
+
100
+ # === AI Agent (PydanticAI) ===
101
+ OPENAI_API_KEY=
102
+ AI_MODEL=gpt-4o-mini
103
+ AI_TEMPERATURE=0.7
104
+ {%- endif %}
105
+
106
+ {%- if cookiecutter.enable_cors %}
107
+
108
+ # === CORS ===
109
+ # JSON list of allowed origins (default: localhost:3000, localhost:8080)
110
+ # Note: "*" is blocked in production - specify explicit origins
111
+ CORS_ORIGINS=["http://localhost:3000","http://localhost:8080"]
112
+ {%- endif %}
113
+
114
+ {%- if cookiecutter.enable_docker %}
115
+
116
+ # === Docker Production (Traefik) ===
117
+ # Domain for production deployment
118
+ DOMAIN=example.com
119
+
120
+ # Let's Encrypt email for SSL certificates
121
+ ACME_EMAIL=admin@example.com
122
+
123
+ # Traefik dashboard auth (generate with: htpasswd -nb admin password)
124
+ # TRAEFIK_DASHBOARD_AUTH=admin:$$apr1$$...
125
+
126
+ {%- if cookiecutter.enable_redis %}
127
+ # Redis password for production
128
+ REDIS_PASSWORD=change-me-in-production
129
+ {%- endif %}
130
+
131
+ {%- if cookiecutter.use_celery %}
132
+ # Flower monitoring credentials
133
+ FLOWER_USER=admin
134
+ FLOWER_PASSWORD=change-me-in-production
135
+ {%- endif %}
136
+ {%- endif %}
@@ -0,0 +1,150 @@
1
+ {%- if cookiecutter.use_github_actions %}
2
+ name: CI
3
+
4
+ on:
5
+ push:
6
+ branches: [main, master]
7
+ pull_request:
8
+ branches: [main, master]
9
+
10
+ jobs:
11
+ lint:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+
16
+ - name: Install uv
17
+ uses: astral-sh/setup-uv@v4
18
+ with:
19
+ version: "latest"
20
+
21
+ - name: Set up Python
22
+ run: uv python install {{ cookiecutter.python_version }}
23
+
24
+ - name: Install dependencies
25
+ run: uv sync --directory backend --dev
26
+
27
+ - name: Run ruff check
28
+ run: uv run --directory backend ruff check app tests cli
29
+
30
+ - name: Run ruff format check
31
+ run: uv run --directory backend ruff format app tests cli --check
32
+
33
+ - name: Run mypy
34
+ run: uv run --directory backend mypy app
35
+
36
+ test:
37
+ runs-on: ubuntu-latest
38
+ {%- if cookiecutter.use_postgresql or cookiecutter.enable_redis %}
39
+ services:
40
+ {%- if cookiecutter.use_postgresql %}
41
+ postgres:
42
+ image: postgres:16-alpine
43
+ env:
44
+ POSTGRES_USER: postgres
45
+ POSTGRES_PASSWORD: postgres
46
+ POSTGRES_DB: test_db
47
+ ports:
48
+ - 5432:5432
49
+ options: >-
50
+ --health-cmd pg_isready
51
+ --health-interval 10s
52
+ --health-timeout 5s
53
+ --health-retries 5
54
+ {%- endif %}
55
+ {%- if cookiecutter.enable_redis %}
56
+ redis:
57
+ image: redis:7-alpine
58
+ ports:
59
+ - 6379:6379
60
+ options: >-
61
+ --health-cmd "redis-cli ping"
62
+ --health-interval 10s
63
+ --health-timeout 5s
64
+ --health-retries 5
65
+ {%- endif %}
66
+ {%- endif %}
67
+
68
+ steps:
69
+ - uses: actions/checkout@v4
70
+
71
+ - name: Install uv
72
+ uses: astral-sh/setup-uv@v4
73
+ with:
74
+ version: "latest"
75
+
76
+ - name: Set up Python
77
+ run: uv python install {{ cookiecutter.python_version }}
78
+
79
+ - name: Install dependencies
80
+ run: uv sync --directory backend --dev
81
+
82
+ - name: Run tests
83
+ run: uv run --directory backend pytest tests/ -v --cov=app --cov-report=xml
84
+ env:
85
+ {%- if cookiecutter.use_postgresql %}
86
+ POSTGRES_HOST: localhost
87
+ POSTGRES_PORT: 5432
88
+ POSTGRES_USER: postgres
89
+ POSTGRES_PASSWORD: postgres
90
+ POSTGRES_DB: test_db
91
+ {%- endif %}
92
+ {%- if cookiecutter.enable_redis %}
93
+ REDIS_HOST: localhost
94
+ REDIS_PORT: 6379
95
+ {%- endif %}
96
+
97
+ - name: Upload coverage to Codecov
98
+ uses: codecov/codecov-action@v4
99
+ with:
100
+ files: ./backend/coverage.xml
101
+ fail_ci_if_error: false
102
+
103
+ security:
104
+ name: Security Scan
105
+ runs-on: ubuntu-latest
106
+ steps:
107
+ - uses: actions/checkout@v4
108
+
109
+ - name: Install uv
110
+ uses: astral-sh/setup-uv@v4
111
+ with:
112
+ version: "latest"
113
+
114
+ - name: Set up Python
115
+ run: uv python install {{ cookiecutter.python_version }}
116
+
117
+ - name: Install dependencies
118
+ run: uv sync --directory backend --dev
119
+
120
+ - name: Install pip-audit
121
+ run: uv pip install pip-audit
122
+
123
+ - name: Run pip-audit
124
+ run: uv run pip-audit --require-hashes=false --progress-spinner=off
125
+ working-directory: backend
126
+
127
+ {%- if cookiecutter.enable_docker %}
128
+
129
+ docker:
130
+ runs-on: ubuntu-latest
131
+ needs: [lint, test]
132
+ if: github.event_name == 'push' && github.ref == 'refs/heads/main'
133
+ steps:
134
+ - uses: actions/checkout@v4
135
+
136
+ - name: Set up Docker Buildx
137
+ uses: docker/setup-buildx-action@v3
138
+
139
+ - name: Build Docker image
140
+ uses: docker/build-push-action@v6
141
+ with:
142
+ context: ./backend
143
+ push: false
144
+ tags: {{ cookiecutter.project_slug }}:latest
145
+ cache-from: type=gha
146
+ cache-to: type=gha,mode=max
147
+ {%- endif %}
148
+ {%- else %}
149
+ # GitHub Actions CI is disabled for this project
150
+ {%- endif %}
@@ -0,0 +1,108 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ # Python lib directories (but not frontend src/lib)
18
+ /lib/
19
+ /lib64/
20
+ parts/
21
+ sdist/
22
+ var/
23
+ wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+
28
+ # PyInstaller
29
+ *.manifest
30
+ *.spec
31
+
32
+ # Installer logs
33
+ pip-log.txt
34
+ pip-delete-this-directory.txt
35
+
36
+ # Unit test / coverage reports
37
+ htmlcov/
38
+ .tox/
39
+ .nox/
40
+ .coverage
41
+ .coverage.*
42
+ .cache
43
+ nosetests.xml
44
+ coverage.xml
45
+ *.cover
46
+ *.py,cover
47
+ .hypothesis/
48
+ .pytest_cache/
49
+
50
+ # Translations
51
+ *.mo
52
+ *.pot
53
+
54
+ # Environments
55
+ .env
56
+ .env.local
57
+ .env.*.local
58
+ .venv
59
+ env/
60
+ venv/
61
+ ENV/
62
+ env.bak/
63
+ venv.bak/
64
+
65
+ # IDE
66
+ .idea/
67
+ .vscode/
68
+ *.swp
69
+ *.swo
70
+ *~
71
+
72
+ # mypy
73
+ .mypy_cache/
74
+ .dmypy.json
75
+ dmypy.json
76
+
77
+ # ruff
78
+ .ruff_cache/
79
+
80
+ # Jupyter Notebook
81
+ .ipynb_checkpoints
82
+
83
+ # pytype
84
+ .pytype/
85
+
86
+ # Cython debug symbols
87
+ cython_debug/
88
+
89
+ # Local development
90
+ *.db
91
+ *.sqlite
92
+ *.sqlite3
93
+
94
+ # Logs
95
+ *.log
96
+ logs/
97
+
98
+ # Docker
99
+ .docker/
100
+
101
+ # OS
102
+ .DS_Store
103
+ Thumbs.db
104
+
105
+ # Project specific
106
+ {%- if cookiecutter.use_sqlite %}
107
+ {{ cookiecutter.project_slug }}.db
108
+ {%- endif %}