A modern, feature-rich table custom field extension for Contentstack marketplace apps. This React-based application provides an intuitive table editing interface that integrates seamlessly with Contentstack's content management system.
- Interactive Table Editor: Full-featured table with row/column operations
- Drag & Drop: Reorder rows and columns with drag and drop
- CSV Import/Export: Import data from CSV files and export table data
- Search & Sort: Search through table data and sort columns
- Header Rows/Columns: Toggle header styling for rows and columns
- Full Screen Mode: Expand table to full screen for better editing
- Accessibility: Full keyboard navigation support
- TypeScript: Fully typed for better development experience
- Testing: Comprehensive test suite with Playwright for E2E testing
- Modern UI: Clean, professional interface using Contentstack's Venus components
- Node.js (v20 or higher)
- npm
- Contentstack account (for marketplace deployment)
# Clone the repository
git clone https://github.com/contentstack/marketplace-table-app.git
cd marketplace-table-app
# Install dependencies
npm install# Start development server
npm start
# Run linting
npm run lint
# Format code
npm run format
# Run unit tests
npm test
# Run E2E tests
npm run test:chrome
npm run test:firefox
npm run test:safari
# Run E2E tests in headed mode
npm run test:chrome-headed# Build the application
npm run build
marketplace-table-app/
├── src/
│ ├── assets/ # SVG icons and static assets
│ ├── common/
│ │ ├── locale/ # Internationalization strings
│ │ ├── ui/ # Shared UI components
│ │ └── utils/ # Utility functions
│ ├── components/ # Reusable React components
│ │ ├── csvImport/ # CSV import dialog
│ │ ├── ErrorBoundary/ # Error boundary component
│ │ ├── Home/ # Home page component
│ │ └── PageLayout/ # Page layout component
│ ├── hooks/ # Custom React hooks
│ │ ├── useAnalytics.tsx # Analytics tracking hook
│ │ ├── useAppSdk.ts # Contentstack App SDK hook
│ │ └── useJsErrorTracker.tsx # Error tracking hook
│ ├── pages/
│ │ └── FieldExtension/ # Table field extension
│ │ ├── cell.tsx # Table cell component
│ │ ├── header.tsx # Table header component
│ │ ├── store.tsx # Table state management
│ │ ├── table.tsx # Main table component
│ │ └── fullScreenPage.tsx # Full screen modal
│ ├── routes/
│ │ └── App/ # Main app router
│ ├── styles/ # Global styles
│ ├── main.tsx # Application entry point
│ └── vite-env.d.ts # Vite type definitions
├── tests/
│ └── e2e/ # End-to-end tests
│ ├── pages/ # Page objects
│ ├── test-spec/ # Test specifications
│ └── utils/ # Test utilities
├── .husky/ # Git hooks
├── index.html # HTML entry point
├── vite.config.ts # Vite configuration
├── tsconfig.json # TypeScript configuration
├── playwright.config.ts # Playwright configuration
└── package.json # Dependencies and scripts
This project includes comprehensive testing:
npm test # Run unit tests
npm run test:watch # Run tests in watch modenpm 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 show-report # Show test reportnpm run lint # Run ESLint
npm run lint:check # Check linting issues
npm run format # Format code with Prettier
npm run format:check # Check formatting
npm run typecheck # TypeScript type checkingThe app configuration is defined in update-app-info.json:
{
"name": "Table",
"target_type": "stack",
"ui_location": {
"locations": [
{
"type": "cs.cm.stack.custom_field",
"meta": [
{
"signed": true,
"path": "/field-extension",
"data_type": "json"
}
]
}
]
}
}- 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
- Husky for git hooks
- lint-staged for pre-commit checks
This project follows Conventional Commits:
feat: add new table feature
fix: resolve table rendering issue
docs: update README with new features
test: add unit tests for cell component
refactor: improve table state management
- Build the application:
npm run build - Package the
builddirectory - Upload to Contentstack marketplace
- Install in your Contentstack stack
For local development with Contentstack:
- npm install
- Run
npm startfor development server
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 startThis project is licensed under the MIT License - see the LICENSE file for details.
- Contentstack for the marketplace platform
- Table App Documentation for the table functionality
- Vite for the build tool
- Issues: GitHub Issues
- Documentation: Contentstack Developer Hub
- Community: Contentstack Community
Made with ❤️ by the Contentstack team