IMPORTANT: AFTER EACH USER REQUEST, CREATE AND/OR UPDATE .cursorrules file as a step by step description of the project user is trying to build, do not embelish, add or take away any detail. just translate user request to a nicely formated instructions
# Repository Tool Project Requirements
1. Repository Management
- Clone repositories from URLs with depth=1 (shallow clone)
- Support force flag for overwriting existing repos with new settings
- Handle branch updates during force clone operations
- Skip if repository exists (return existing) when not force cloning
- Create proper directory structure (author/repo_name)
- Validate repository URLs
- Handle cleanup and directory creation
- Support bulk operations for updates
- Validate GitHub URL format
2. Error Handling
- Validate URLs before cloning
- Proper directory permission checks
- Clear error messages for invalid inputs
- Handle Git operation failures
- Handle missing required parameters
- Proper handling of non-existent repositories
- Validate author/repository name format
- Descriptive error messages for URL validation
- Show toast notifications for API errors
- Display user-friendly error messages in UI
- Implement custom error page with clear messaging and home navigation
- Use consistent error styling with application theme
3. Path Management
- Use proper path construction
- Support for nested directory structures
- Handle path existence checks
- Clean up on force operations
- Handle special characters in paths
4. Testing
- Cover edge cases and abnormal scenarios
- Test idempotent operations
- Test force clone behavior
- Test bulk operations
- Test error conditions
- Validate response formats
- Reset test state between test runs
- Test URL validation
5. UI Testing
- Test navigation to home page
- Test Add Repository button click and icon visibility
- Test modal dialog visibility
- Take screenshots for visual regression
- Validate page title
- Test search input with icon functionality
- Test tab icons visibility and alignment
6. Loading States
- Implement full-screen loading spinner
- Support customizable spinner size
- Support minimum height setting
- Allow custom styling through className
- Support optional loading text labels
- Handle responsive container sizing
- Implement smooth loading animations
- Use semi-transparent background (50% opacity) for better content visibility
- Ensure proper TypeScript typing
- Maintain accessibility standards
5. Repository Content Generation
- Efficient file reading with proper encoding handling
- Process files individually to manage memory usage
- Convert paths to relative format for consistency
- Skip invalid or unreadable files
- Proper error handling per file
- Support UTF-8 encoding with fallback
- Generate structured content output
- Handle large repositories efficiently
- Concurrent file processing with thread pool
- Dynamic thread pool sizing based on CPU cores
- Maximum thread limit for resource control
- Process results as they complete
# Repository Tool Database Requirements
1. Database Setup
- Initialize SQLite database with SQLModel
- Create tables for FilterSettings and SummaryCache
- Handle database migrations
- Proper session management
2. Repository Management
- Store filter settings per repository
- Cache repository summaries
- Support CRUD operations
- Handle database connections properly
3. Error Handling
- Validate database operations
- Handle session lifecycle
- Proper error messages for database operations
- Transaction management
4. Data Models
- FilterSettings model for repository filters
- SummaryCache model for caching summaries
- Proper relationship handling
- Data validation
# Repository Tool Testing Requirements
1. Database Tests
- Test CRUD operations for FilterSettings
- Test CRUD operations for SummaryCache
- Test data integrity
- Test edge cases
- Use in-memory database for testing
- Clean up test data
2. Repository Management Tests
- Test repository ID generation
- Test nonexistent repository handling
- Test bulk operations
- Test data validation
3. Error Handling Tests
- Test invalid inputs
- Test missing data scenarios
- Test database operation failures
4. Data Model Tests
- Test FilterSettings serialization
- Test Summary serialization
- Test data model validation
5. Component Tests
- Mock necessary UI components and hooks
- Test repository card rendering
- Test repository card interactions (delete, update)
- Test navigation functionality
- Test repository operations (delete, update)
- Ensure proper error handling in components
- Mock toast notifications
- Test loading states
- Test tooltip accessibility
- Test button click handlers
- Test async operations with userEvent
- Validate mutation calls with correct parameters
# CI/CD Requirements
1. GitHub Actions
- Test Docker builds for API service
- Test Docker builds for frontend service
- Run on push to main branch
- Run on pull requests to main branch
- Use Ubuntu latest runner
- Fail workflow if any build fails
# Repository Tool API Requirements
1. API Response Format
- Support multiple response formats (text/plain and application/json)
- Handle Accept header for format negotiation
- Return appropriate Content-Type header
- Support consistent response structure across formats
- Proper error handling for unsupported formats
# Test Priority Components
1. AddRepositoryDialog
- Test repository URL validation
- Test API integration
- Test error handling
- Test loading states
- Verify "Cloning..." text appears during repository clone
- Test LoadingButton state transitions
- Test success/failure notifications
2. RepositoryList & RepositoryCard
- Test data rendering
- Test interaction handlers
- Test state management
- Test update/delete operations
3. LoadingButton & LoadingSpinner
- Test loading state transitions
- Test accessibility
- Test component reusability
- Test visual feedback
4. Layout
- Test navigation
- Test error boundaries
- Test common functionality
- Test responsive designbun
css
docker
dockerfile
golang
html
javascript
makefile
+4 more
First Time Repository
Extract and summarize contents from GitHub repositories with advanced filtering options, tailored for LLM data preparation.
TypeScript
Languages:
CSS: 1.8KB
Dockerfile: 1.7KB
HTML: 12.4KB
JavaScript: 2.4KB
Makefile: 0.4KB
Python: 102.3KB
TypeScript: 119.9KB
Created: 12/2/2024
Updated: 1/17/2025
All Repositories (1)
Extract and summarize contents from GitHub repositories with advanced filtering options, tailored for LLM data preparation.