How dev-pitterpan/painel-web-automacao works
Pitter Pan Festas is a Next.js dashboard for reviewing product-processing history, monitoring integrations, managing Shopify products, and administering users. The main path is dashboard requests through the API to Google Sheets and metric aggregation, then presentation of results. Separate workflows handle Shopify catalog sync and direct product operations, n8n reprocessing, WinThor status sync, and account management. Some UI-to-API wiring and unsampled routes are not shown; those links are omitted unless the README documents them.
Main entry points: auth.ts Identity and catalog state · dashboard/route.ts Dashboard endpoint · shopify-products/route.ts Catalog endpoint · product-editor/route.ts Product editor endpoint
Components 26
Dashboard UI
- Dashboard view
components/DashboardClient.tsx - Reports
components/ReportsClient.tsx - Product catalog UI
components/ShopifyProductsClient.tsx - Product details
components/ProductDetailsDrawer.tsx - Product panel state
components/ProductPanelProvider.tsx - Product thumbnails
components/ProductThumbnail.tsx - Excluded products UI
components/ExcludedProductsClient.tsx - Integration health UI
components/IntegrationHealthClient.tsx - User administration UI
components/UsersClient.tsx
API workflows
- Dashboard endpoint
app/api/dashboard/route.ts - Catalog endpoint
app/api/shopify-products/route.ts - Product editor endpoint
app/api/shopify/product-editor/route.ts - Bulk product actions
app/api/shopify/product-bulk/route.ts - Reprocessing endpoint
app/api/n8n/reprocess/route.ts - WinThor status endpoint
app/api/winthor-products/route.ts - Audit endpoint
app/api/audit/route.ts - User management endpoint
app/api/users/route.ts
Data and integrations
- Processing history
lib/googleSheets.ts - Metric aggregation
lib/metrics.ts - Shopify Admin API
lib/shopify-admin.ts
Identity and administration
- Identity and catalog state
lib/auth.ts
Other components
- Dashboard user
- Shopify
- Google Sheets
- n8n automation
- WinThor export
Connections 26
- Dashboard user → Dashboard view: views
README.md - Dashboard endpoint → Processing history: reads history
app/api/dashboard/route.ts - Dashboard endpoint → Metric aggregation: builds metrics
app/api/dashboard/route.ts - Dashboard endpoint → Identity and catalog state: loads settings
app/api/dashboard/route.ts - Dashboard view → Dashboard endpoint: requests data
- Reports → Dashboard endpoint: loads history
- Product catalog UI → Product details: opens details
components/ShopifyProductsClient.tsx - Product panel state → Product details: renders
components/ProductPanelProvider.tsx - Product thumbnails → Catalog endpoint: fetches details
components/ProductThumbnail.tsx - Catalog endpoint → Identity and catalog state: reads catalog
app/api/shopify-products/route.ts - Product catalog UI → Catalog endpoint: loads catalog
- Product editor endpoint → Identity and catalog state: loads product
app/api/shopify/product-editor/route.ts - Product editor endpoint → Shopify Admin API: updates product
app/api/shopify/product-editor/route.ts - Product editor endpoint → Shopify: edits product
README.md - Bulk product actions → Shopify Admin API: runs bulk actions
app/api/shopify/product-bulk/route.ts - Catalog endpoint → Shopify: accepts catalog sync
README.md - Shopify → Catalog endpoint: sends webhooks
README.md - Reprocessing endpoint → n8n automation: dispatches reprocess
README.md - WinThor export → WinThor status endpoint: uploads statuses
README.md - WinThor status endpoint → Identity and catalog state: stores statuses
app/api/winthor-products/route.ts - Excluded products UI → Identity and catalog state: loads exclusions
- Integration health UI → Dashboard user: shows status
- User management endpoint → Identity and catalog state: manages accounts
app/api/users/route.ts - User administration UI → User management endpoint: administers users
- Audit endpoint → Identity and catalog state: records audit
- Google Sheets → Processing history: provides history
README.md