A modern React + TypeScript SaaS platform for tracking and optimizing AI search rankings. This application helps businesses monitor their visibility in AI-powered search engines and provides actionable insights for improvement.
- Overview
- Features
- Tech Stack
- Getting Started
- Project Structure
- Architecture
- API Integration
- Dynamic Dashboard System
- Development
- Deployment
ZerveMeData is an enterprise-grade analytics platform that provides:
- AI search ranking tracking and optimization
- Dynamic, template-driven dashboards
- Project and report management
- AI model configuration and monitoring
- Data visualization and exploration
-
Authentication & Authorization
- JWT-based authentication with token expiration
- Protected routes with automatic redirects
- Persistent login state via LocalStorage
-
Project Management
- Hierarchical organization: Organizations → Projects → Reports
- Full CRUD operations for projects and reports
- Soft delete functionality
- Report configuration with customizable fields
-
Dynamic Dashboard System
- Template-driven report rendering from JSON configurations
- Multiple visualization types: metrics, charts, tables, grids
- Support for bar, line, pie, doughnut, and area charts
- HTML content rendering in tables
- Responsive grid layouts
-
AI Model Management
- Create and configure AI models
- Model type categorization
- Integration with report generation
-
Data Exploration
- Dataset browsing and preview
- Domain options with KPI and attribute columns
- Interactive data visualization
- React 18.3.0 - UI framework
- TypeScript 4.9.5 - Type-safe development
- React Router 6.21.1 - Client-side routing
- Material UI 5.6.0 - Component library
- Bootstrap 5.3.3 - Grid system and utilities
- Chart.js 3.9.1 + react-chartjs-2 - Data visualization
- Axios 1.8.2 - HTTP client
- jwt-decode 4.0.0 - JWT token handling
- Create React App 5.0.1
- Jest + React Testing Library
- ESLint + React App configuration
- Node.js 18+ (recommended)
- npm 8+
- Access to the ZerveMeData backend API
- Clone the repository:
git clone <repository-url>
cd zervemedatafe- Install dependencies:
npm install- Configure API credentials:
Create/update
src/configs/credentials.dev.json:
{
"app_api_credentials": {
"host": "https://your-api-host.com"
}
}- Start the development server:
npm startThe app will open at http://localhost:3000
npm start- Runs development servernpm test- Launches test runnernpm run build- Builds production bundlenpm run eject- Ejects from Create React App (one-way operation)
src/
├── components/
│ ├── context_providers/ # React Context providers
│ │ ├── AuthContext.tsx # Authentication state
│ │ ├── UserContext.tsx # User data
│ │ └── ExplorerContext.tsx # Business logic
│ ├── pages/ # Page components
│ │ ├── HomePage/ # Landing page
│ │ ├── login/ # Login page
│ │ ├── explore/ # Main dashboard
│ │ ├── contactus/ # Contact form
│ │ └── subscribe/ # Subscription page
│ ├── reports/ # Report components
│ │ └── DynamicReportRenderer.tsx
│ └── shared/ # Reusable components
│ ├── header/
│ ├── footer/
│ └── components/
├── types/ # TypeScript type definitions
│ └── reportTemplates.ts
├── templates/ # Dashboard JSON templates
│ ├── dashboardTemplate.json
│ └── salesDashboardTemplate.json
├── utils/ # Utility functions
│ ├── templateLoader.ts
│ └── dashboardDataGenerator.ts
├── theme/ # MUI theme configuration
├── configs/ # Configuration files
├── assets/ # Images and static files
├── App.tsx # Root component
└── index.tsx # Application entry point
The application uses React Context API for state management:
-
AuthContext (
src/components/context_providers/AuthContext.tsx)- Manages authentication state
- Handles login/logout
- Token validation and refresh
- Protected route logic
-
ExplorerContext (
src/components/context_providers/ExplorerContext.tsx)- Project, report, and model management
- Dataset operations
- Dashboard data fetching
- API integration layer
-
UserContext (
src/components/context_providers/UserContext.tsx)- User profile data
- User preferences
- Public Routes: Homepage, Login, Contact, Subscribe
- Auto-redirect authenticated users to
/explore
- Auto-redirect authenticated users to
- Protected Routes: Explore, Profile, Models
- Require valid JWT token
- Redirect unauthenticated users to
/login
App (ThemeProvider, ErrorBoundary)
└── LandingPage (Router)
├── AppHeader
├── Routes
│ ├── Public Pages
│ └── Protected Pages
│ └── ExplorePage
│ ├── DashboardSidebar
│ └── Dashboard
│ └── DynamicReportRenderer
└── AppFooter
POST /api/authentication/authorizeUser
Body: { UserNameOrEmail, Password }
Response: { token, userName }-
Projects:
/api/project/*GET /getAllOrgProjectsPOST /createPOST /updatePOST /{id}/softDeleteProject
-
Reports:
/api/report/*POST /createPOST /updatePOST /{id}/softDeleteReport
-
Datasets:
/api/datasets/*GET /getAllDatasetNamesGET /getdata?id={id}&rowLimit={limit}GET /getDatasetDomainOptions?id={id}POST /getvizdata- Dashboard data
-
Models:
/api/models/*GET /getAllModelsGET /getAllModelTypesPOST /createPOST /updatePOST /{id}/softDeleteModel
-
Configuration:
/api/reportdataset/*,/api/Job/*
Dashboard templates are JSON files defining the layout and components:
{
"type": "report",
"title": "Dashboard Title",
"description": "Dashboard description",
"layout": "dashboard",
"sections": [
{
"type": "card",
"component": "Metric",
"title": "Total Sales",
"field": "totalSales",
"format": "currency",
"color": "success",
"width": 6
},
{
"type": "chart",
"component": "Chart",
"title": "Sales Overview",
"chartType": "bar",
"dataField": "salesData",
"xField": "month",
"yField": "sales",
"width": 12,
"height": 300
}
]
}-
Metrics/Text Cards
- Formats: currency, percentage, number, text
- Color themes: primary, success, warning, error, info
- Prefix/suffix support
-
Charts (via Chart.js)
- Types: bar, line, pie, doughnut, area
- Configurable axes and styling
- Responsive sizing
-
Tables
- Sortable columns
- Custom formatters
- HTML content support
- Sticky headers
- Configurable alignment
-
Grids
- Flexible layouts
- Responsive breakpoints
- Nested components
- Define template in JSON (see
src/templates/) - Backend returns template + data via
/api/datasets/getvizdata DynamicReportRendererrenders the dashboard- Components automatically bind to data fields
Example data structure:
{
totalSales: 125000,
salesData: [
{ month: "Jan", sales: 12000 },
{ month: "Feb", sales: 15000 }
]
}- TypeScript strict mode enabled
- ESLint with React App configuration
- Functional components with hooks
- Context API for state management
src/types/reportTemplates.ts- TypeScript interfaces for dashboard systemsrc/components/reports/DynamicReportRenderer.tsx- Core rendering enginesrc/components/context_providers/ExplorerContext.tsx- Business logic layer
- Define component type in
src/types/reportTemplates.ts - Create renderer in
DynamicReportRenderer.tsx - Add switch case in
renderSection() - Update JSON schema for templates
npm test # Run tests in watch mode
npm test -- --coverage # Generate coverage reportBuild the Docker image:
docker build -t zervemedatafe .Run the container:
docker-compose upThe app includes SSL certificate configuration for HTTPS.
npm run buildOutput: build/ directory with optimized static files
Update src/configs/credentials.dev.json for different environments or use environment variables.
- Chrome (latest)
- Firefox (latest)
- Safari (latest)
- Edge (latest)
- Create feature branch from
main - Follow existing code patterns
- Add tests for new features
- Submit pull request with clear description
Proprietary - ZerveMeData
For issues or questions, contact the development team or visit /contactus in the application.