A multi-tenant remote configuration management system built with Next.js, Supabase, and TypeScript. Manage feature flags, A/B tests, and application configurations across multiple tenants with a clean, intuitive interface.
Dashboard - Overview of tenants and configurations
Config Editor - Side-by-side draft and published configuration management
Onboarding - Initial setup and Supabase connection
Settings - Application configuration and tenant management
API Integration - Code examples and endpoint testing
- π’ Multi-Tenant Support - Manage configurations for multiple tenants/organizations with automatic API key generation
- π Draft & Publish Workflow - Create drafts, review changes, and publish when ready with confirmation dialogs
- π Secure API Access - Public API endpoints with RLS (Row Level Security) policies
- π¨ Clean UI - Minimalist white hierarchy design with Tailwind CSS and skeleton loading states
- β‘ Real-time Updates - Built on Supabase for real-time data synchronization
- π§ͺ Test Configurations - Test API endpoints directly from the dashboard with copyable code examples
- π Analytics - Track request counts and usage statistics per tenant
- π Rename Configurations - Easily rename configuration keys with integrated rename functionality
- π Template Library - Pre-built JSON templates for common configuration patterns
- π» Multi-Language Examples - API integration examples in multiple programming languages
- π₯ Health Check - Connection status indicator in the header
- π± Responsive Design - Optimized layouts for various screen sizes
- Framework: Next.js 16 (React 19)
- Database: Supabase (PostgreSQL)
- Styling: Tailwind CSS 4
- Icons: Lucide React
- Language: TypeScript
- Authentication: Supabase Auth
- Node.js 18+ and npm
- A Supabase account and project
- Clone the repository:
git clone <repository-url>
cd masterfabric-remote- Install dependencies:
npm install-
Set up your Supabase project:
- Create a new Supabase project at supabase.com
- Copy your project URL and anon key
- Run the SQL script from
app/onboarding/page.tsxin your Supabase SQL Editor- The script creates all necessary tables, RLS policies, and initial setup
-
Run the development server:
npm run dev- Open http://localhost:3000 in your browser
When you first launch the application:
- You'll be redirected to the Onboarding page
- Enter your Supabase URL and Anon Key
- Test the connection
- Save your credentials
- The app will guide you through the initial setup
masterfabric-remote/
βββ app/ # Next.js app directory
β βββ dashboard/ # Main dashboard page
β βββ config/[id]/ # Config editor page
β βββ onboarding/ # Initial setup page
β βββ settings/ # Settings page
β βββ splash/ # Splash/loading page
βββ components/
β βββ features/ # Feature components
β βββ layout/ # Layout components
β βββ ui/ # Reusable UI components
βββ lib/
β βββ hooks/ # Custom React hooks
β βββ supabase/ # Supabase service layer
β βββ utils/ # Utility functions
βββ migrations/ # Database migrations
βββ types/ # TypeScript type definitions
βββ public/ # Static assets
Displays all configurations with actions (Test, Edit, Delete). Supports filtering by tenant and status.
Side-by-side editor for managing draft and published configurations. Features:
- JSON validation
- Template library with multiple configuration types
- Save draft / Publish workflow
- Confirmation dialogs
- Rename configuration functionality
- Copyable code blocks
Shows API endpoints and code examples in multiple languages (cURL, JavaScript, Python, etc.) for accessing published configurations. Features copy-to-clipboard functionality for easy integration.
Manage tenants with automatic API key generation (with mfr_ prefix), configuration counts, and tenant name suggestions. Supports create, edit, and delete operations.
Once a configuration is published, it's accessible via the public API:
curl -X GET "https://your-project.supabase.co/rest/v1/app_configs?key_name=eq.demoapi&tenant_id=eq.tenant-id&select=published_json" \
-H "apikey: your-anon-key"The public API uses Supabase's anonymous access with RLS policies. Only published configurations (last_published_at IS NOT NULL) are accessible via the public API.
id(UUID)name(TEXT)api_key(TEXT, UNIQUE)created_at,updated_at(TIMESTAMP)
id(UUID)tenant_id(UUID, FK)key_name(TEXT)draft_json(JSONB)published_json(JSONB)last_published_at(TIMESTAMP)request_count(BIGINT)created_at,updated_at(TIMESTAMP)
Based on the latest commits, recent enhancements include:
- β¨ Config Rename Functionality - Integrated rename feature in ConfigEditorClient with EditConfigDialog
- π¨ Enhanced UI Components - Improved Button component with better interaction feedback
- π Template System - Expanded template library with new configuration types
- π API Refactoring - PostgREST RPC function for direct JSON fetching
- π Loading States - Skeleton components replacing loading overlays for better UX
- π Security - Enhanced security headers and SEO metadata
- π± Responsive Improvements - Better layout widths and responsiveness across pages
- π₯ Health Monitoring - Connection status indicator in header
- π Code Copying - Copy-to-clipboard functionality in CodeBlock components
npm run dev- Start development servernpm run build- Build for productionnpm start- Start production servernpm run lint- Run ESLint
- TypeScript strict mode enabled
- ESLint configuration for Next.js
- Tailwind CSS 4 for styling
- Component-based architecture
- Skeleton loading states for better UX
- Create Draft: Edit configuration JSON in the draft panel
- Save Draft: Save changes without publishing
- Publish: After saving a draft, publish to make it live
- Confirmation: Publish dialog with options before making changes live
- Create multiple tenants (e.g., Mobile App, Web App)
- Each tenant has its own API key
- Configurations are scoped to tenants
- Track usage per tenant
- Automatic API key generation with
mfr_prefix - Secure random generation
- One-click generation in tenant forms
- Row Level Security (RLS) enabled on all tables
- Authenticated users can manage configurations
- Anonymous users can only read published configs via API
- API keys stored securely in database
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is private and proprietary.
For issues and questions, please contact the development team.
Built with β€οΈ using Next.js and Supabase