Compensa?
Compare suplementos, protetor solar, hidratante, fraldas, papel higiênico, lava-roupas e ração pelo preço por quantidade.
翻譯準備中
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證AI-Enabled Service Booking & Management Platform - Client side
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗Frontend application for ProServe, built with Next.js, TypeScript, and the App Router. This application provides the user interface for managing services, authentication, dashboards, and other platform features.
src/
├── app/ # App Router pages and layouts
├── components/ # Reusable UI components
├── features/ # Feature-specific modules
├── hooks/ # Custom React hooks
├── lib/ # Shared utilities and configurations
├── services/ # API service functions
├── types/ # TypeScript interfaces and types
├── utils/ # Helper functions
├── constants/ # Application constants
├── styles/ # Global styles
└── middleware.ts # Application middleware
Ensure you have the following installed:
Check versions:
node -v
npm -v
Clone the repository:
git clone <repository-url>
Navigate to the project:
cd proserve-frontend
Install dependencies:
npm install
Create a .env.local file in the project root.
Example:
NEXT_PUBLIC_API_BASE_URL=http://localhost:5000/api
NEXT_PUBLIC_SUPABASE_URL=
NEXT_PUBLIC_SUPABASE_ANON_KEY=
Do not commit
.env.localto source control.
Start the development server:
npm run dev
Application runs at:
http://localhost:3000
npm run build
Start the production server:
npm start
Run ESLint:
npm run lint
| Command | Description |
|---|---|
npm run dev | Start development server |
npm run build | Build the application |
npm start | Run production build |
npm run lint | Run ESLint |
npm test | Run unit tests (Vitest) |
npm run test:watch | Run tests in watch mode |
The frontend communicates with the backend through REST APIs.
Base URL is configured using:
NEXT_PUBLIC_API_BASE_URL
All API calls should be implemented inside:
src/services/
'use client').Example:
interface ButtonProps {
title: string;
}
export default function Button({ title }: ButtonProps) {
return <button>{title}</button>;
}
| Item | Convention |
|---|---|
| Components | PascalCase |
| Hooks | camelCase (useAuth) |
| Functions | camelCase |
| Variables | camelCase |
| Route folders | kebab-case |
| Constants | UPPER_SNAKE_CASE |
Use:
Validation schemas should be stored close to the feature or in a dedicated validation folder.
The services page (src/app/services/page.tsx) keeps only UI. Its logic lives in reusable hooks:
| Hook | What it does |
|---|---|
useServicesData | Loads categories and services, maps API data, falls back to demo data, and cancels in-flight requests (AbortController) on unmount or retry. |
useServiceFilters | Search, category, location and sort state. The URL is the source of truth, so filtered results are shareable and survive refresh. Category/location update the URL immediately; search updates it only after typing stops. |
useDebouncedValue | Returns a value only after it has stopped changing for a delay (300 ms for search). |
Filtering and sorting are pure functions in src/lib/service-filters.ts, so they are tested without rendering. Tests live next to the code in __tests__ folders.
Use:
Avoid unnecessary global state.
Use:
@/components
@/features
@/hooks
@/services
@/utils
@/types
Avoid long relative imports like:
../../../components/Button
Create a new branch:
git checkout -b feature/feature-name
Commit changes:
git add .
git commit -m "feat: add login page"
Push changes:
git push origin feature/feature-name
any.This project is proprietary and intended for internal use unless otherwise specified.