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` directory
marketplace-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 UI
npm run lint # Run ESLint npm run typecheck # TypeScript type checking npm run format # Format code with Prettier
Create a .env file in the root directory:
VITE_PUBLIC_KEY_BASE_URL=https://app.contentstack.com
The 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:e2e
This 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