A general testing and POC application for GoDaddy components, built with React + Express. Used to test UI components and new features.
- Component Testing: Test GoDaddy UI components and libraries
- POC Development: Quick prototyping and proof-of-concept development
- Professional Markdown Editor: Using
@uiw/react-markdown-editorwith live preview - Ad Preview Components: Test GoogleAdPreview and MetaAdPreview components
- File Persistence: Content is saved to a JSON file on the server
- Frontend: React 18 + TypeScript
- Backend: Express.js
- Markdown Editor: @uiw/react-markdown-editor
- Markdown Rendering: react-markdown + remark-gfm
- Styling: CSS3
- File Storage: JSON file on server
testing-app/
├── client/ # React frontend
│ ├── src/
│ │ ├── App.tsx # Main testing component
│ │ └── App.css # Styles
│ └── package.json
├── server/
│ ├── index.js # Express server
│ └── data/ # Data storage (auto-created)
└── package.json # Root package.json
-
Install dependencies:
npm run install-all
-
Start the development servers:
npm run dev
This will start both servers concurrently:
- Backend server on
http://localhost:5000 - Frontend dev server on
http://localhost:3000
Alternative startup options:
- Frontend only:
npm run client - Backend only:
npm run serverornpm start
- Backend server on
-
Open your browser and navigate to
http://localhost:3000
GET /api/content- Retrieve current contentPOST /api/content- Save content (requirestitleandbody)GET /api/health- Health check
- View Mode: Content is displayed as rendered markdown
- Edit Mode: Click "Edit" to switch to editing mode
- Markdown Editor: Use the professional markdown editor with:
- Toolbar: Formatting buttons for common markdown syntax
- Split View: Edit on left, live preview on right
- Syntax Highlighting: Proper highlighting for markdown
- Make Changes: Edit the title and/or markdown content
- Save: Click "Save Changes" to persist changes
- Cancel: Click "Cancel" to discard changes and return to view mode
The @uiw/react-markdown-editor provides:
- Live Preview: Real-time rendering as you type
- Toolbar: Buttons for common formatting (bold, italic, headers, lists, etc.)
- Split-Pane View: Edit and preview side-by-side
- Syntax Highlighting: Proper highlighting for markdown syntax
- Keyboard Shortcuts: Common shortcuts for formatting
- Responsive Design: Works on different screen sizes
Content is stored in server/data/content.json with the following structure:
{
"title": "Blog Post Title",
"body": "# Markdown content\n\nThis is the blog post content..."
}- Frontend only:
npm run client - Backend only:
npm run server - Build for production:
npm run build
This POC demonstrates the core functionality needed for the marketing-agent-mfe blog editing feature:
- Toggle between view/edit modes ✅
- Professional markdown editor with live preview ✅
- Save functionality with API calls ✅
- Cancel functionality ✅
- Change detection ✅
- Loading and error states ✅
- File persistence ✅
- Rich formatting toolbar ✅
To integrate this into the marketing-agent-mfe:
- Replace the Express server with calls to the blog API (
/v1/blog/:blogId/post/:postId) - Integrate with existing BlogPost component - replace the current display-only mode
- Add authentication headers - use the existing
auth_idpcookie - Style to match existing UI - adapt the MDEditor styling to match the current design system
- Add validation - specific to blog post requirements
This library was chosen because it provides:
- Professional UX: Split-pane editing with live preview
- Rich Toolbar: Common formatting options readily available
- Lightweight: Minimal bundle size impact
- TypeScript Support: Full type safety
- Customizable: Easy to style and configure
- Active Maintenance: Well-maintained and popular
This matches exactly what was proposed in the investigation for the marketing-agent-mfe blog editing feature!