Compare commits

...
10 Commits
Author SHA1 Message Date
mazxd 009e16162e ci: first commit
Lint Backend / lint-backend (push) Waiting to run
Playwright Tests / changes (push) Waiting to run
Playwright Tests / test-playwright (2, 4) (push) Blocked by required conditions
Playwright Tests / test-playwright (3, 4) (push) Blocked by required conditions
Playwright Tests / test-playwright (4, 4) (push) Blocked by required conditions
Playwright Tests / merge-playwright-reports (push) Blocked by required conditions
Playwright Tests / alls-green-playwright (push) Blocked by required conditions
Test Backend / test-backend (push) Waiting to run
Test Docker Compose / test-docker-compose (push) Waiting to run
Deploy to Staging / deploy (push) Waiting to run
Playwright Tests / test-playwright (1, 4) (push) Blocked by required conditions
2025-03-24 22:12:06 +08:00
github-actions 9f2c3d24a2 📝 Update release notes
[skip ci]
2025-03-19 12:53:35 +00:00
Zhengyang Cui 54ca043e27 ♻️ Remove redundant field in inherited class (#1520) 2025-03-19 13:52:49 +01:00
github-actions 521e6e4eda 📝 Update release notes
[skip ci]
2025-03-19 12:49:36 +00:00
Diego Tellez 05bebffba1 🐛 Close sidebar drawer on user selection (#1515) 2025-03-19 13:48:37 +01:00
github-actions 6efd3ba9a0 📝 Update release notes
[skip ci]
2025-02-22 21:59:52 +00:00
Joel Pérez c067292fec 🐛 Fix required password validation when editing user fields (#1508) 2025-02-22 21:59:31 +00:00
github-actions b64e374d76 📝 Update release notes
[skip ci]
2025-02-21 20:29:19 +00:00
Alejandra d18cf4b6be 🎨 Add minor UI tweaks in Skeletons and other components (#1507) 2025-02-21 21:29:00 +01:00
github-actions e46b8d9421 📝 Update release notes
[skip ci]
2025-02-21 20:11:36 +00:00
17 changed files with 117 additions and 64 deletions
+7
View File
@@ -0,0 +1,7 @@
# Add directories or file patterns to ignore during indexing (e.g. foo/ or *.csv)
.vscode
node_modules/
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
+9 -9
View File
@@ -13,14 +13,14 @@ FRONTEND_HOST=http://localhost:5173
# Environment: local, staging, production
ENVIRONMENT=local
PROJECT_NAME="Full Stack FastAPI Project"
STACK_NAME=full-stack-fastapi-project
PROJECT_NAME="BaiPanSou"
STACK_NAME=BaiPanSou
# Backend
BACKEND_CORS_ORIGINS="http://localhost,http://localhost:5173,https://localhost,https://localhost:5173,http://localhost.tiangolo.com"
SECRET_KEY=changethis
FIRST_SUPERUSER=admin@example.com
FIRST_SUPERUSER_PASSWORD=changethis
SECRET_KEY=baomihua200712
FIRST_SUPERUSER=mzaxd0712@gmail.com
FIRST_SUPERUSER_PASSWORD=200712
# Emails
SMTP_HOST=
@@ -32,11 +32,11 @@ SMTP_SSL=False
SMTP_PORT=587
# Postgres
POSTGRES_SERVER=localhost
POSTGRES_SERVER=192.168.1.99
POSTGRES_PORT=5432
POSTGRES_DB=app
POSTGRES_USER=postgres
POSTGRES_PASSWORD=changethis
POSTGRES_DB=bps_dev
POSTGRES_USER=mzaxd
POSTGRES_PASSWORD=rootroot
SENTRY_DSN=
+1
View File
@@ -4,3 +4,4 @@ node_modules/
/playwright-report/
/blob-report/
/playwright/.cache/
backend/.idea/
+8
View File
@@ -0,0 +1,8 @@
__pycache__
app.egg-info
*.pyc
.mypy_cache
.coverage
htmlcov
.cache
.venv
-1
View File
@@ -75,7 +75,6 @@ class ItemUpdate(ItemBase):
# Database model, database table inferred from class name
class Item(ItemBase, table=True):
id: uuid.UUID = Field(default_factory=uuid.uuid4, primary_key=True)
title: str = Field(max_length=255)
owner_id: uuid.UUID = Field(
foreign_key="user.id", nullable=False, ondelete="CASCADE"
)
+30
View File
@@ -0,0 +1,30 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
openapi.json
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
/playwright/.auth/
@@ -129,7 +129,6 @@ const EditUser = ({ user }: EditUserProps) => {
</Field>
<Field
required
invalid={!!errors.password}
errorText={errors.password?.message}
label="Set Password"
@@ -148,7 +147,6 @@ const EditUser = ({ user }: EditUserProps) => {
</Field>
<Field
required
invalid={!!errors.confirm_password}
errorText={errors.confirm_password?.message}
label="Confirm Password"
+1 -1
View File
@@ -49,7 +49,7 @@ const Sidebar = () => {
<DrawerBody>
<Flex flexDir="column" justify="space-between">
<Box>
<SidebarItems />
<SidebarItems onClose={() => setOpen(false)} />
<Flex
as="button"
onClick={() => {
+1 -6
View File
@@ -19,12 +19,7 @@ const UserMenu = () => {
<Flex>
<MenuRoot>
<MenuTrigger asChild p={2}>
<Button
data-testid="user-menu"
variant="solid"
maxW="150px"
truncate
>
<Button data-testid="user-menu" variant="solid" maxW="sm" truncate>
<FaUserAstronaut fontSize="18" />
<Text>{user?.full_name || "User"}</Text>
</Button>
@@ -1,29 +1,30 @@
import { Skeleton, Table } from "@chakra-ui/react"
import { Table } from "@chakra-ui/react"
import { SkeletonText } from "../ui/skeleton"
const PendingItems = () => (
<Table.Root size={{ base: "sm", md: "md" }}>
<Table.Header>
<Table.Row>
<Table.ColumnHeader w="30%">ID</Table.ColumnHeader>
<Table.ColumnHeader w="30%">Title</Table.ColumnHeader>
<Table.ColumnHeader w="30%">Description</Table.ColumnHeader>
<Table.ColumnHeader w="10%">Actions</Table.ColumnHeader>
<Table.ColumnHeader w="sm">ID</Table.ColumnHeader>
<Table.ColumnHeader w="sm">Title</Table.ColumnHeader>
<Table.ColumnHeader w="sm">Description</Table.ColumnHeader>
<Table.ColumnHeader w="sm">Actions</Table.ColumnHeader>
</Table.Row>
</Table.Header>
<Table.Body>
{[...Array(5)].map((_, index) => (
<Table.Row key={index}>
<Table.Cell>
<Skeleton h="20px" />
<SkeletonText noOfLines={1} />
</Table.Cell>
<Table.Cell>
<Skeleton h="20px" />
<SkeletonText noOfLines={1} />
</Table.Cell>
<Table.Cell>
<Skeleton h="20px" />
<SkeletonText noOfLines={1} />
</Table.Cell>
<Table.Cell>
<Skeleton h="20px" />
<SkeletonText noOfLines={1} />
</Table.Cell>
</Table.Row>
))}
@@ -1,33 +1,34 @@
import { Skeleton, Table } from "@chakra-ui/react"
import { Table } from "@chakra-ui/react"
import { SkeletonText } from "../ui/skeleton"
const PendingUsers = () => (
<Table.Root size={{ base: "sm", md: "md" }}>
<Table.Header>
<Table.Row>
<Table.ColumnHeader w="20%">Full name</Table.ColumnHeader>
<Table.ColumnHeader w="25%">Email</Table.ColumnHeader>
<Table.ColumnHeader w="15%">Role</Table.ColumnHeader>
<Table.ColumnHeader w="20%">Status</Table.ColumnHeader>
<Table.ColumnHeader w="20%">Actions</Table.ColumnHeader>
<Table.ColumnHeader w="sm">Full name</Table.ColumnHeader>
<Table.ColumnHeader w="sm">Email</Table.ColumnHeader>
<Table.ColumnHeader w="sm">Role</Table.ColumnHeader>
<Table.ColumnHeader w="sm">Status</Table.ColumnHeader>
<Table.ColumnHeader w="sm">Actions</Table.ColumnHeader>
</Table.Row>
</Table.Header>
<Table.Body>
{[...Array(5)].map((_, index) => (
<Table.Row key={index}>
<Table.Cell>
<Skeleton h="20px" />
<SkeletonText noOfLines={1} />
</Table.Cell>
<Table.Cell>
<Skeleton h="20px" />
<SkeletonText noOfLines={1} />
</Table.Cell>
<Table.Cell>
<Skeleton h="20px" />
<SkeletonText noOfLines={1} />
</Table.Cell>
<Table.Cell>
<Skeleton h="20px" />
<SkeletonText noOfLines={1} />
</Table.Cell>
<Table.Cell>
<Skeleton h="20px" />
<SkeletonText noOfLines={1} />
</Table.Cell>
</Table.Row>
))}
@@ -47,10 +47,7 @@ const ChangePassword = () => {
<Heading size="sm" py={4}>
Change Password
</Heading>
<Box
as="form"
onSubmit={handleSubmit(onSubmit)}
>
<Box as="form" onSubmit={handleSubmit(onSubmit)}>
<VStack gap={4} w={{ base: "100%", md: "sm" }}>
<PasswordInput
type="current_password"
+6 -1
View File
@@ -1,4 +1,9 @@
import { MutationCache, QueryCache, QueryClient, QueryClientProvider } from "@tanstack/react-query"
import {
MutationCache,
QueryCache,
QueryClient,
QueryClientProvider,
} from "@tanstack/react-query"
import { RouterProvider, createRouter } from "@tanstack/react-router"
import React, { StrictMode } from "react"
import ReactDOM from "react-dom/client"
+12 -12
View File
@@ -61,17 +61,17 @@ function UsersTable() {
<Table.Root size={{ base: "sm", md: "md" }}>
<Table.Header>
<Table.Row>
<Table.ColumnHeader w="20%">Full name</Table.ColumnHeader>
<Table.ColumnHeader w="25%">Email</Table.ColumnHeader>
<Table.ColumnHeader w="15%">Role</Table.ColumnHeader>
<Table.ColumnHeader w="20%">Status</Table.ColumnHeader>
<Table.ColumnHeader w="20%">Actions</Table.ColumnHeader>
<Table.ColumnHeader w="sm">Full name</Table.ColumnHeader>
<Table.ColumnHeader w="sm">Email</Table.ColumnHeader>
<Table.ColumnHeader w="sm">Role</Table.ColumnHeader>
<Table.ColumnHeader w="sm">Status</Table.ColumnHeader>
<Table.ColumnHeader w="sm">Actions</Table.ColumnHeader>
</Table.Row>
</Table.Header>
<Table.Body>
{users?.map((user) => (
<Table.Row key={user.id} opacity={isPlaceholderData ? 0.5 : 1}>
<Table.Cell w="20%" color={!user.full_name ? "gray" : "inherit"}>
<Table.Cell color={!user.full_name ? "gray" : "inherit"}>
{user.full_name || "N/A"}
{currentUser?.id === user.id && (
<Badge ml="1" colorScheme="teal">
@@ -79,14 +79,14 @@ function UsersTable() {
</Badge>
)}
</Table.Cell>
<Table.Cell w="25%">{user.email}</Table.Cell>
<Table.Cell w="15%">
<Table.Cell truncate maxW="sm">
{user.email}
</Table.Cell>
<Table.Cell>
{user.is_superuser ? "Superuser" : "User"}
</Table.Cell>
<Table.Cell w="20%">
{user.is_active ? "Active" : "Inactive"}
</Table.Cell>
<Table.Cell w="20%">
<Table.Cell>{user.is_active ? "Active" : "Inactive"}</Table.Cell>
<Table.Cell>
<UserActionsMenu
user={user}
disabled={currentUser?.id === user.id}
+7 -7
View File
@@ -85,19 +85,19 @@ function ItemsTable() {
<Table.Root size={{ base: "sm", md: "md" }}>
<Table.Header>
<Table.Row>
<Table.ColumnHeader w="30%">ID</Table.ColumnHeader>
<Table.ColumnHeader w="30%">Title</Table.ColumnHeader>
<Table.ColumnHeader w="30%">Description</Table.ColumnHeader>
<Table.ColumnHeader w="10%">Actions</Table.ColumnHeader>
<Table.ColumnHeader w="sm">ID</Table.ColumnHeader>
<Table.ColumnHeader w="sm">Title</Table.ColumnHeader>
<Table.ColumnHeader w="sm">Description</Table.ColumnHeader>
<Table.ColumnHeader w="sm">Actions</Table.ColumnHeader>
</Table.Row>
</Table.Header>
<Table.Body>
{items?.map((item) => (
<Table.Row key={item.id} opacity={isPlaceholderData ? 0.5 : 1}>
<Table.Cell truncate maxW="30%">
<Table.Cell truncate maxW="sm">
{item.id}
</Table.Cell>
<Table.Cell truncate maxW="30%">
<Table.Cell truncate maxW="sm">
{item.title}
</Table.Cell>
<Table.Cell
@@ -107,7 +107,7 @@ function ItemsTable() {
>
{item.description || "N/A"}
</Table.Cell>
<Table.Cell width="10%">
<Table.Cell>
<ItemActionsMenu item={item} />
</Table.Cell>
</Table.Row>
+1 -1
View File
@@ -124,4 +124,4 @@ test("Redirects to /login when token is wrong", async ({ page }) => {
await page.goto("/settings")
await page.waitForURL("/login")
await expect(page).toHaveURL("/login")
})
})
+11
View File
@@ -2,6 +2,17 @@
## Latest Changes
### Fixes
* 🐛 Close sidebar drawer on user selection. PR [#1515](https://github.com/fastapi/full-stack-fastapi-template/pull/1515) by [@dtellz](https://github.com/dtellz).
* 🐛 Fix required password validation when editing user fields. PR [#1508](https://github.com/fastapi/full-stack-fastapi-template/pull/1508) by [@jpizquierdo](https://github.com/jpizquierdo).
### Refactors
* ♻️ Remove redundant field in inherited class. PR [#1520](https://github.com/fastapi/full-stack-fastapi-template/pull/1520) by [@tzway](https://github.com/tzway).
* 🎨 Add minor UI tweaks in Skeletons and other components. PR [#1507](https://github.com/fastapi/full-stack-fastapi-template/pull/1507) by [@alejsdev](https://github.com/alejsdev).
* 🎨 Add minor UI tweaks. PR [#1506](https://github.com/fastapi/full-stack-fastapi-template/pull/1506) by [@alejsdev](https://github.com/alejsdev).
## 0.8.0
### Features