Skip to content

Commit 96a1536

Browse files
Merge branch 'refactor-status-code' of https://github.com/javadzarezadeh/full-stack-fastapi-template into refactor-status-code
2 parents bfb3ad1 + 6c9b1fa commit 96a1536

File tree

99 files changed

+9184
-6860
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+9184
-6860
lines changed

.github/dependabot.yml

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,33 @@ updates:
77
interval: daily
88
commit-message:
99
prefix:
10-
# Python
11-
- package-ecosystem: pip
12-
directory: /
10+
# Python uv
11+
- package-ecosystem: uv
12+
directory: /backend
13+
schedule:
14+
interval: daily
15+
commit-message:
16+
prefix:
17+
# npm
18+
- package-ecosystem: npm
19+
directory: /frontend
1320
schedule:
1421
interval: daily
1522
commit-message:
1623
prefix:
24+
# Docker
25+
- package-ecosystem: docker
26+
directories:
27+
- /backend
28+
- /frontend
29+
schedule:
30+
interval: weekly
31+
commit-message:
32+
prefix:
33+
# Docker Compose
34+
- package-ecosystem: docker-compose
35+
directory: /
36+
schedule:
37+
interval: weekly
38+
commit-message:
39+
prefix:

.github/workflows/generate-client.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
with:
2828
python-version: "3.10"
2929
- name: Install uv
30-
uses: astral-sh/setup-uv@v3
30+
uses: astral-sh/setup-uv@v6
3131
with:
3232
version: "0.4.15"
3333
enable-cache: true
@@ -39,6 +39,9 @@ jobs:
3939
- run: uv run bash scripts/generate-client.sh
4040
env:
4141
VIRTUAL_ENV: backend/.venv
42+
SECRET_KEY: just-for-generating-client
43+
POSTGRES_PASSWORD: just-for-generating-client
44+
FIRST_SUPERUSER_PASSWORD: just-for-generating-client
4245
- name: Add changes to git
4346
run: |
4447
git config --local user.email "[email protected]"

.github/workflows/latest-changes.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
with:
3131
# To allow latest-changes to commit to the main branch
3232
token: ${{ secrets.LATEST_CHANGES }}
33-
- uses: tiangolo/[email protected].1
33+
- uses: tiangolo/[email protected].2
3434
with:
3535
token: ${{ secrets.GITHUB_TOKEN }}
3636
latest_changes_file: ./release-notes.md

.github/workflows/lint-backend.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
with:
2121
python-version: "3.10"
2222
- name: Install uv
23-
uses: astral-sh/setup-uv@v3
23+
uses: astral-sh/setup-uv@v6
2424
with:
2525
version: "0.4.15"
2626
enable-cache: true

.github/workflows/playwright.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,18 @@ jobs:
5959
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled == 'true' }}
6060
with:
6161
limit-access-to-actor: true
62+
- name: Install uv
63+
uses: astral-sh/setup-uv@v6
64+
with:
65+
version: "0.4.15"
66+
enable-cache: true
67+
- run: uv sync
68+
working-directory: backend
69+
- run: npm ci
70+
working-directory: frontend
71+
- run: uv run bash scripts/generate-client.sh
72+
env:
73+
VIRTUAL_ENV: backend/.venv
6274
- run: docker compose build
6375
- run: docker compose down -v --remove-orphans
6476
- name: Run Playwright tests

.github/workflows/test-backend.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
with:
2121
python-version: "3.10"
2222
- name: Install uv
23-
uses: astral-sh/setup-uv@v3
23+
uses: astral-sh/setup-uv@v6
2424
with:
2525
version: "0.4.15"
2626
enable-cache: true

backend/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ WORKDIR /app/
66

77
# Install uv
88
# Ref: https://docs.astral.sh/uv/guides/integration/docker/#installing-uv
9-
COPY --from=ghcr.io/astral-sh/uv:0.4.15 /uv /bin/uv
9+
COPY --from=ghcr.io/astral-sh/uv:0.5.11 /uv /uvx /bin/
1010

1111
# Place executables in the environment at the front of the path
1212
# Ref: https://docs.astral.sh/uv/guides/integration/docker/#using-the-environment

backend/app/api/main.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
from fastapi import APIRouter
22

3-
from app.api.routes import items, login, users, utils
3+
from app.api.routes import items, login, private, users, utils
4+
from app.core.config import settings
45

56
api_router = APIRouter()
6-
api_router.include_router(login.router, tags=["login"])
7-
api_router.include_router(users.router, prefix="/users", tags=["users"])
8-
api_router.include_router(utils.router, prefix="/utils", tags=["utils"])
9-
api_router.include_router(items.router, prefix="/items", tags=["items"])
7+
api_router.include_router(login.router)
8+
api_router.include_router(users.router)
9+
api_router.include_router(utils.router)
10+
api_router.include_router(items.router)
11+
12+
13+
if settings.ENVIRONMENT == "local":
14+
api_router.include_router(private.router)

backend/app/api/routes/items.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from app.api.deps import CurrentUser, SessionDep
88
from app.models import Item, ItemCreate, ItemPublic, ItemsPublic, ItemUpdate, Message
99

10-
router = APIRouter()
10+
router = APIRouter(prefix="/items", tags=["items"])
1111

1212

1313
@router.get("/", response_model=ItemsPublic)

backend/app/api/routes/login.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
verify_password_reset_token,
1919
)
2020

21-
router = APIRouter()
21+
router = APIRouter(tags=["login"])
2222

2323

2424
@router.post("/login/access-token")

0 commit comments

Comments
 (0)