-
-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Description
Currently, testing performance optimizations and database improvements (like index changes) in Hollo requires testing on production instances with real data. This makes development difficult and risky. We should create a development seeding script to generate realistic test data for local development.
Context
This need became apparent in PR #175 where index optimization testing requires substantial data volume that's not feasible to create manually. The contributor mentioned they couldn't reproduce performance issues in small test instances and needed to test on their actual production server.
Proposed Solution
Create a seeding script that generates realistic development data including:
Core Data
- User profile and settings - Complete user profile with avatar, bio, preferences
- Posts - Various content types (text, images, links, replies, quotes)
- Media attachments - Sample images and files
- Interactions - Likes, bookmarks, shares, replies
Social Graph
- Followers/Following relationships - Realistic social connections
- Mentions and replies - Conversational threads
- Activity timeline - Chronological activity data
Federation Data
- External accounts - Simulated remote users from other instances
- Federated activities - ActivityPub interactions with remote instances
- Delivery queues - Outbound federation activities
Performance Testing Data
- Large datasets - Configurable volume (1K, 10K, 100K posts)
- Time-distributed data - Posts spread across realistic time periods
- Varied content sizes - Mix of short and long posts with media
Implementation Considerations
- CLI interface -
pnpm seed:dev [--size small|medium|large]
- Configurable volume - Allow different dataset sizes
- Faker.js integration - Generate realistic but fake content
- Database transaction safety - Proper cleanup and rollback capabilities
- Development-only - Clear guards against running in production
Benefits
- Performance testing - Test database optimizations locally
- Feature development - Develop UI features with realistic data
- Regression testing - Catch performance regressions early
- Onboarding - New contributors can quickly set up realistic test environment
RangHo
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request