Optivise is a visual experimentation platform that allows users to create and manage A/B tests on their websites using a visual editor with Firebase data persistence.
- Authentication: Simple login flow with auto-generated user IDs
- Visual Editor:
- Real-time DOM inspector with hover highlighting
- Click elements to create experiments
- Different colors for different element types (layout, headers, interactive, etc.)
- Inspector toggle on/off
- Experiment Management:
- Create experiments with rich configuration
- AI-generated or manual variants
- Text, design (CSS), or layout changes
- Element, section, or page-level scope
- Firebase Firestore persistence
- Pages:
- Visual Editor - Interactive website inspector
- Experiments - View and manage all experiments
- Users - User management (structure ready)
- Data, Analytics - Placeholder pages
- Collapsible Sidebar: Hierarchical navigation with smooth animations
- SDK Integration: Connect to external websites via postMessage
optivise/
βββ apps/
β βββ dashboard/ # Next.js 14 application
β βββ app/
β β βββ login/ # Authentication page
β β βββ dashboard/ # Visual Editor
β β βββ experiments/ # Experiments list & details
β β βββ users/ # Users management
β βββ components/
β β βββ ui/ # shadcn/ui components
β β βββ Header.tsx
β β βββ Sidebar.tsx
β β βββ WebsitePane.tsx
β β βββ SDKInspectorOverlay.tsx
β β βββ ExperimentSidePanel.tsx
β βββ lib/
β β βββ firebase/ # Firestore integration
β β β βββ config.ts
β β β βββ experiments.ts
β β βββ inspector/ # DOM inspection utilities
β β βββ stores/ # Zustand state management
β β βββ sdk-bridge.ts # SDK communication
β βββ hooks/
β βββ public/
βββ FIREBASE_IMPLEMENTATION.md # Firebase setup documentation
βββ README.md
- Framework: Next.js 14 (App Router)
- Language: TypeScript
- Styling: Tailwind CSS
- UI Components: Radix UI (shadcn/ui)
- State Management: Zustand
- Database: Firebase Firestore
- Icons: Lucide React
- Node.js 18+
- Firebase project with Firestore enabled
# Install dependencies
npm install
# Run development server
cd apps/dashboard
npm run devThe dashboard will be available at http://localhost:3000
- Navigate to
http://localhost:3000 - Enter your credentials (optional: project name and website URL for SDK)
- Click sign in - a unique user ID will be auto-generated
- Go to Visual Editor (sidebar)
- Enable the Inspector toggle
- Hover over elements on your website
- Click an element to open the experiment panel
- Fill in experiment details:
- Name and description
- Number of variants (1-5)
- Generation mode (AI or Manual)
- Variant type (Text, Design, Layout)
- Experiment scope (Element, Section, Page)
- Duration (7, 14, 21, or 30 days)
- Click "Create Experiment"
- Data is saved to Firebase Firestore
- Navigate to "Experiments" in sidebar
- See all your created experiments
- Click any experiment to view full details
- Status badges show experiment state
For external websites:
- Add the Optivise SDK script tag
- Include
data-projectattribute - SDK communicates via postMessage
- Dashboard loads website with
?optivise_edit=true
Create apps/dashboard/lib/firebase/config.ts with your Firebase credentials:
const firebaseConfig = {
apiKey: "your-api-key",
authDomain: "your-project.firebaseapp.com",
projectId: "your-project-id",
// ... other config
};users/
{userId}/
experiments/
{experimentId}/
- name: string
- description: string
- numVariants: number
- generationMode: "ai" | "manual"
- variantType: "text" | "design" | "layout"
- experimentScope: "element" | "section" | "page"
- duration: number
- selectedElement: object
- status: "Not Started" | "In Progress" | "Completed"
- createdAt: Timestamp
- updatedAt: Timestamp
- Hover highlighting with element-specific colors:
- Blue: Layout elements (div, section, main)
- Purple: Headers/footers
- Pink: Headings (h1-h6)
- Green: Interactive elements (buttons, links, inputs)
- Yellow: Text elements (p, span, label)
- Red: Media (img, video, svg)
- Cyan: Lists (ul, ol, li)
- Click to pin selection
- Smooth animations
- Inspector toggle on/off
- Slide-in animation
- Rich configuration options
- Firebase integration
- Loading states and error handling
- Success notifications
- Collapsible sidebar with hierarchical structure
- Smooth animations (300ms transitions)
- Active state highlighting
- User profile display
- Settings and help sections
cd apps/dashboard
npm run buildDeploy to Vercel, Netlify, or any Next.js hosting provider.
Set up proper security rules in Firebase Console:
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /users/{userId}/experiments/{experiment} {
allow read, write: if request.auth != null && request.auth.uid == userId;
}
}
}- Login with auto-generated user IDs
- Visual Editor with DOM inspector
- Hover highlighting with element-type colors
- Click-to-create experiments
- Experiment configuration panel
- Firebase Firestore integration
- Experiments list with real data
- Experiment detail pages
- SDK integration for external websites
- Collapsible sidebar navigation
- Loading and error states
- Toast notifications
- Firebase Authentication
- Edit/delete experiments
- Experiment status transitions
- Analytics dashboard
- Data visualization
- User management
- Export functionality
- Real-time collaboration
Proprietary - Optivise Β© 2025
Built by Sidiq Moltafet
Note: This is a working MVP with core functionality. Additional features and optimizations are planned for future releases.