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.