A modern Contentstack marketplace app that automatically extracts URLs from entry content and generates rich link previews with metadata, images, and descriptions. This React-based application provides an intuitive link preview interface that integrates seamlessly with Contentstack's content management system.
- Automatic URL Detection: Extracts URLs from content fields automatically
- Rich Link Previews: Generates previews with titles, descriptions, and images
- Responsive Design: Adapts to different sidebar widths and screen sizes
- Real-time Updates: Refreshes previews when content is saved
- Error Handling: Graceful fallbacks with retry options
- TypeScript: Fully typed for better development experience
- Modern UI: Clean, professional interface using modern CSS modules
- Node.js (v16 or higher)
- npm
- Contentstack account (for marketplace deployment)
# Clone the repository
git clone https://github.com/contentstack/marketplace-quick-web-lookup-app.git
cd marketplace-quick-web-lookup-app
# Install dependencies
npm install# Start development server
npm run dev
# Run E2E tests
npm run test:e2e
# Run linting
npm run lint# Build the application
npm run build
# The built files will be in the `dist` directorymarketplace-quick-web-lookup-app/
βββ src/
β βββ components/ # Reusable React components
β β βββ AppFailed.tsx # Error boundary component
β β βββ ErrorBoundary.tsx
β β βββ LinkPreview/ # Link preview components
β βββ containers/ # Main app containers
β β βββ App/ # Main app component
β β βββ AppConfiguration/ # App configuration
β β βββ SidebarWidget/ # Entry sidebar widget
β β βββ 404/ # 404 error page
β βββ common/
β β βββ contexts/ # React contexts
β β βββ hooks/ # Custom React hooks
β β βββ locales/ # Internationalization
β β βββ providers/ # Context providers
β β βββ types/ # TypeScript type definitions
β β βββ utils/ # Utility functions
β βββ services/ # API services
β βββ types/ # Type definitions
β βββ utils/ # Utility functions
β βββ assets/ # Static assets
βββ e2e/ # End-to-end tests
βββ public/ # Public assets
βββ config files...
This project includes comprehensive testing:
npm run test:e2e # Run all E2E tests
npm run test:chrome # Run E2E tests in Chrome
npm run test:firefox # Run E2E tests in Firefox
npm run test:safari # Run E2E tests in Safari
npm run test:chrome-headed # Run E2E tests in Chrome with UInpm run lint # Run ESLint
npm run typecheck # TypeScript type checking
npm run format # Format code with PrettierCreate a .env file in the root directory:
VITE_PUBLIC_KEY_BASE_URL=https://app.contentstack.comThe app configuration is defined in the manifest and deployment files for Contentstack marketplace integration.
- Create feature branch from
main - Implement your changes
- Add tests for new functionality
- Update documentation
- Submit pull request
This project uses:
- ESLint for code linting
- Prettier for code formatting
- TypeScript for type safety
- CSS Modules for styling
This project follows Conventional Commits:
feat: add new link preview feature
fix: resolve URL extraction issue
docs: update README with new features
test: add E2E tests for link previews
- Build the application:
npm run build - Package the
distdirectory - Upload to Contentstack marketplace
- Install in your Contentstack stack
-
Go to Contentstack Launch Dashboard
- Navigate to your Contentstack organization
- Access the Launch section
-
Connect GitHub Repository
- Click "Connect Repository"
- Select GitHub and authorize access
- Choose your repository:
marketplace-quick-web-lookup-app - Set build command:
npm run build - Set output directory:
dist
-
Configure Deployment
- Enable automatic deployments on push to main branch
- Set up environment variables if needed
- Configure build settings
-
Deploy
- Push changes to your main branch to trigger automatic deployment
- Or manually trigger deployment from the Launch dashboard
For local development with Contentstack:
- Use Contentstack's local development tools
- Configure your environment variables
- Run
npm run devfor development server
- Install from Contentstack marketplace
- Navigate to entry with URL content
- Open sidebar to see link previews
- Click previews to open links in new tabs
- Refresh previews when content changes
We welcome contributions!
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'feat: add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
# Install dependencies
npm install
# Start development
npm run dev
# Run tests
npm run test:e2eThis project is licensed under the MIT License - see the LICENSE file for details.
- Contentstack for the marketplace platform
- Peekalink API for link preview generation
- React for the UI framework
- Vite for the build tool
- Playwright for E2E testing
- Issues: GitHub Issues
- Documentation: Contentstack Developer Hub
- Community: Contentstack Community
Made with β€οΈ by the Contentstack team