feat(showroom): add public showroom route with username and isPublic …#115
feat(showroom): add public showroom route with username and isPublic …#115Yuva-Deekshitha-N wants to merge 7 commits into
Conversation
|
@Yuva-Deekshitha-N is attempting to deploy a commit to the participationcorner2025-8967's projects Team on Vercel. A member of the Team first needs to authorize it. |
📝 SummaryThe provided pull request introduces a new route for user profiles, allowing users to view their public inventory items. The changes include updates to the Prisma schema, adding a 📂 Files Changed
🎭 Code PoemUsers can now view their items with ease, 🚨 Bugs & Architectural Violations* The `PublicShowroom` component is not placed in the `app/blocks/` directory, which is the required location for UI components. It should be moved to `app/blocks/__global/PublicShowroom`. * The component uses inline styles, which is not recommended. Instead, it should use Vanilla CSS Modules (`.module.css`) for styling. * The `loader` function does not handle errors properly. It should be updated to handle potential errors when fetching data from the database. * The `PublicShowroom` component does not include any accessibility features, such as `aria-hidden` or `role` attributes. These should be added to ensure the component is accessible. * The component uses `var(--color-border)` and `var(--color-text-muted)`, which are not defined in the provided code. These variables should be defined in a CSS file or replaced with actual color values.💡 Suggestions & Best Practices* Consider adding a `defer` function to the `loader` function to improve performance. * Use `transform` or `opacity` for CSS animations instead of triggering main-thread repaints. * Add a `key` prop to the `img` element to ensure it is properly updated when the image URL changes. * Consider adding a loading indicator or a skeleton component to display while the data is being fetched. * Use a more robust error handling mechanism, such as a try-catch block, to handle potential errors when fetching data from the database. * Consider adding a `meta` tag to the `head` of the HTML document to provide metadata about the user profile page. |
|
Hi! I hope you're doing well. I just wanted to follow up on my pull request. I noticed it has been open for a few days, so I was wondering if you've had a chance to review it. If there are any issues or changes needed from my side, please let me know. I'd be happy to make the necessary updates. Thank you for your time! |
|
Hey @Yuva-Deekshitha-N! Thanks for your patience here. I just took a deep dive into the code, and overall, you’ve done a really solid job laying the groundwork for this. I especially love how you handled the data security. Using Before we merge, there are a few architectural things and edge cases we need to tighten up: 1. The "Sold Out" Edge Case 2. Route Collisions 3. Frontend Architecture 4. Error Boundaries Lastly, it looks like You are doing awesome work here. Let me know if you run into any issues implementing these tweaks and I'll be happy to help! |
…rrorBoundary, extract ShowroomGrid component, fix sold badge, revert package-lock
SummaryThis pull request modifies the existing codebase to add new functionality, specifically updating the user profile handling. The changes are focused on enhancing the user experience and fixing potential issues with data consistency. Files Changed
ReviewStrengths
Critical Issues - Must Fix Before Merge
Warnings - Should Fix
Suggestions - Nice to Have
Architecture Compliance
VerdictREQUEST CHANGES |
…rrorBoundary, extract ShowroomGrid component, fix sold badge, revert package-lock
|
Codesense Ai: This PR is too large to review automatically. A human maintainer will take a look! |
SummaryThis pull request modifies the existing codebase to implement new features and fix existing issues, with changes spanning multiple files and components. Files Changed
ReviewStrengths
Critical Issues - Must Fix Before Merge
Warnings - Should Fix
Suggestions - Nice to Have
Architecture Compliance
VerdictREQUEST CHANGES |
SummaryThis pull request modifies the existing codebase by adding a new feature to handle user authentication. The changes include updates to the Prisma schema, addition of new API routes, and modifications to the existing authentication logic. Files Changed
ReviewStrengths
Critical Issues - Must Fix Before Merge
Warnings - Should Fix
Suggestions - Nice to Have
Architecture Compliance
VerdictREQUEST CHANGES |
…ion folder timestamp
SummaryThis pull request modifies the existing codebase by adding a new feature to handle user authentication. The changes include updates to the Prisma schema, addition of new API routes, and modifications to the existing authentication logic. Files Changed
ReviewStrengths
Critical Issues - Must Fix Before Merge
Warnings - Should Fix
Suggestions - Nice to Have
Architecture Compliance
VerdictREQUEST CHANGES |
|
Hey @Yuva-Deekshitha-N, fantastic work on this! I just went through the updated code line by line and you nailed every single point:
This is exactly the kind of high-quality contribution we look for. The PR is fully approved on my end. I'll go ahead and merge this in. Great job! |
…schema fields
Description
Adds the backend groundwork for the Public Showroom feature, allowing resellers to share a public-facing page of their listed inventory at /.
Schema changes:
-> Added username String? @unique to the User model — enables vanity URL routing
-> Added isPublic Boolean @default(false) to InventoryItem — per-item opt-in visibility control
New route (/:username):
-> Resolves the username to a user, returns 404 if not found
-> Fetches only items where isPublic: true using Prisma select — sensitive fields (purchasePrice, purchaseDate, userId, notes) are never sent to the client
-> Converts askingPrice Decimal to Number before serialization to prevent hydration issues
-> Renders a responsive card grid with item name, brand, size, and asking price
Related Issues
Closes #91
Type of Change
Checklist:
Screenshots (if applicable)
No UI changes.