# Unsay Angay / Dapat Ma-Add nga Features (BuildMate) Based sa existing system ug docs (FEATURE_VERIFICATION, MISSING_FEATURES, etc.), ani ang **suggested features** nga makapa-improve sa product ug security. --- ## 1. High priority (completing existing “partial” features) ### Real-time price & availability - **Price history**: Table/migration para sa `price_history` (component_id, price, date); log every price change. - **Availability status**: Naa na `availability_status` sa schema – gamiton sa UI (e.g. “In stock” / “Out of stock” sa component cards ug builder). - **Price/availability updates**: Cron or scheduled job (e.g. Vercel Cron) nga mo-call sa API to refresh prices/availability from retailer or manual admin update. - **Price drop alerts**: Gamit ang `notification_preferences` sa users – email or in-app notification kung naa’y component sa saved build nga ni-drop ang price. ### Locality (retailers / location) - **Retailer info sa UI**: Sa component detail ug builder, show retailer name, address, phone (data naa na sa `retailers`). - **Filter by location**: Optional “near me” or “city/region” filter sa component search or retailer list. - **Map (optional)**: Simple map (e.g. Google Maps / Mapbox) sa retailer page or “Where to buy” section. --- ## 2. Security & account - **Two-factor authentication (2FA)**: TOTP (e.g. Google Authenticator) via Supabase or custom – optional per user sa Settings. - **Rate limiting sa auth APIs**: Login, register, forgot-password – limit attempts per IP/email (similar to admin password) to reduce brute force. - **Session management**: Sa Settings, “Sessions” or “Devices” – list active sessions, “Log out everywhere” option. - **Password strength**: Enforce minimum length/complexity on register and reset-password. --- ## 3. Notifications (gamiton ang existing preferences) - **Email sending**: Profile/Settings naa na `notification_preferences` (build likes, comments, followers, newsletter). Implement actual email sending (e.g. Resend, SendGrid) when those events happen. - **In-app notifications**: Simple “Notifications” dropdown or page – “User X liked your build”, “User Y commented” – store in DB, mark as read. - **Price drop emails**: As above, use notification prefs; send when a component in user’s saved build(s) drops price. --- ## 4. Community & content - **Report build/comment**: “Report” button on builds and comments; store reports in DB; admin can review in Admin (Reports tab). - **Moderation**: Admin/moderator approve or hide reported content; optional “pending” state for new user builds. - **User roles in UI**: Use `moderator` role – e.g. moderators can hide/delete comments or flag builds, but not change user_type. - **Badges or reputation (optional)**: Simple “Top contributor”, “Guide author”, “Verified builder” based on guides submitted, likes, etc. --- ## 5. UX & discovery - **Global search**: Search bar (header) – search builds, guides, components, or users in one place; results page or dropdown. - **Export build**: “Export to PDF” or “Share as image” (summary card) for a build – useful for sharing or saving. - **Saved builds / wishlist**: Aside from “My Builds”, allow “Save for later” (copy of a community build to a list) without full clone. - **Filters on Community Builds**: More filters (e.g. by build type, price range, date range) – partially there; complete and keep consistent with My Builds. --- ## 6. Admin & operations - **Audit log**: Log admin actions (user deleted, build deleted, component updated, etc.) in a table; view in Admin. - **Backup / export**: Admin option to export users or builds (anonymized if needed) for backup or analytics. - **API auth for sensitive routes**: Protect routes like component price update, send-email, etc. with auth or admin check so dili ma-abuse from outside. --- ## 7. Optional / later - **PWA**: manifest + service worker for “Add to home screen” and basic offline (e.g. view cached guides). - **i18n**: Language switcher (e.g. Filipino/English) if targeting broader PH audience. - **Accessibility**: ARIA labels, keyboard nav, focus order – especially on builder and forms. - **Performance**: Image optimization (Next.js Image), lazy load for long lists (e.g. community builds). --- ## Summary table | Area | Feature | Priority | Notes | |-------------------|----------------------------------|------------|--------------------------------| | Price | Price history + alerts | High | Completes “real-time” story | | Price | Availability in UI | High | Schema ready | | Locality | Retailer info + filter/map | High | Completes locality | | Security | 2FA, rate limit auth, sessions | High | Better account security | | Notifications | Email + in-app | Medium | Use existing prefs | | Community | Report + moderation | Medium | Safer community | | UX | Global search, export build | Medium | Discovery + sharing | | Admin | Audit log, protect APIs | Medium | Operations + security | | Optional | PWA, i18n, a11y | Low | When capacity allows | --- Kung asa magsugod: **price history + availability sa UI** ug **retailer info sa component/builder** kay daghan na naa sa schema; dayon **notification emails** ug **report build/comment** para mas complete ang product ug community safety.