[Feature] Add portfolio cache management, validation schemas, and views tracking#113
Merged
Gautam25Raj merged 3 commits intoMay 31, 2026
Merged
Conversation
- Implemented `invalidatePublicPortfolioCaches` and `revalidatePublicPortfolios` functions for managing portfolio cache. - Enhanced Prisma database connection settings for improved performance. - Updated slug validation to include additional reserved usernames. - Created billing-related validation schemas using Zod for checkout and webhook events. - Developed portfolio validation schemas for content and drafts, ensuring data integrity. - Added tests for API key validation, flexible authentication middleware, billing webhook processing, and portfolio validation. - Implemented views tracking for portfolios and share links, including buffering and flushing logic with Redis.
…nagement - Introduced new tables: Subscription, PortfolioPublication, BillingWebhookEvent, PortfolioAsset, and PortfolioViewDaily. - Added columns for cloud sync and user management in existing tables. - Implemented unique and regular indexes to optimize query performance across various tables. - Updated the ApiKey model to include user ownership and enforce relational integrity. - Added slug functionality for share links and documents to improve user experience. - Enhanced the schema with new enums for subscription and portfolio statuses. - Implemented migrations to ensure database structure aligns with the updated Prisma schema.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces portfolio cache management utilities, expands validation coverage across billing and portfolio workflows, and adds scalable views tracking infrastructure for portfolios and share links.
The update also improves database performance configuration and strengthens platform-level data integrity.
Features
Portfolio Cache Management
invalidatePublicPortfolioCachesutilityrevalidatePublicPortfoliosutilityPortfolio Validation
Billing Validation
Views Tracking System
Improvements
Database Performance
Slug Validation
Testing
Notes
Type of Change
Checklist