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