immersive2/public/api/user
Michael Mainguy 5891dfd6b7 Fix hamburger menu visibility and feature config format
- Fix z-index layering so hamburger menu appears above canvas
  - Lower canvas zIndex from 1000 to 1
  - Add zIndex={100} to Affix and Menu components
  - Add position="bottom-start" to prevent dropdown going off-screen

- Update feature configs to use string states instead of booleans
  - Convert all JSON configs from true/false to "on"/"off"/"coming-soon"/"pro"
  - Fix BASIC_FEATURE_CONFIG to enable core features for logged-in users
  - This fixes menu items not responding to clicks when authenticated

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 12:00:37 -06:00
..
features Fix hamburger menu visibility and feature config format 2025-12-21 12:00:37 -06:00
features-basic.json Fix hamburger menu visibility and feature config format 2025-12-21 12:00:37 -06:00
features-free.json Fix hamburger menu visibility and feature config format 2025-12-21 12:00:37 -06:00
features-none.json Fix hamburger menu visibility and feature config format 2025-12-21 12:00:37 -06:00
features-pro.json Fix hamburger menu visibility and feature config format 2025-12-21 12:00:37 -06:00
README.md Add configurable feature management system with JSON-based feature flags 2025-11-18 06:52:39 -06:00

Feature Configuration Testing

This directory contains static JSON files for testing different user tiers locally.

Available Configurations

Default: features (none tier)

  • What you see: Only the home page
  • All pages and features: Disabled
  • Use case: Unauthenticated users or when API is unavailable

Free Tier: features-free.json

  • Pages: All marketing pages + VR Experience
  • Features: Basic diagram creation, management, immersive mode
  • Limits: 6 diagrams max, 100MB storage
  • No access to: Templates, private/encrypted designs, collaboration

Basic Tier: features-basic.json

  • Pages: All pages available
  • Features: Free features + templates + private designs
  • Limits: 25 diagrams max, 500MB storage
  • No access to: Encrypted designs, collaboration

Pro Tier: features-pro.json

  • Pages: All pages available
  • Features: Everything unlocked
  • Limits: Unlimited (indicated by -1)

How to Test Locally

Method 1: Copy the file you want to test

# Test free tier
cp public/api/user/features-free.json public/api/user/features

# Test basic tier
cp public/api/user/features-basic.json public/api/user/features

# Test pro tier
cp public/api/user/features-pro.json public/api/user/features

# Test none/default (locked down)
cp public/api/user/features-none.json public/api/user/features
# Remove the default file
rm public/api/user/features

# Create a symlink to the tier you want to test
ln -s features-free.json public/api/user/features
# or
ln -s features-basic.json public/api/user/features
# or
ln -s features-pro.json public/api/user/features

What Changes Between Tiers

Feature None Free Basic Pro
Pages (Examples, Docs, Pricing)
VR Experience
Create Diagram
Create From Template
Private Designs
Encrypted Designs
Share/Collaborate
Max Diagrams 0 6 25
Storage 0 100MB 500MB

Backend Implementation (Future)

When you're ready to implement the backend, create an endpoint at:

GET https://www.deepdiagram.com/api/user/features

The endpoint should:

  1. Validate the Auth0 JWT token from Authorization: Bearer <token> header
  2. Query the user's subscription tier from your database
  3. Return JSON matching one of these structures based on their tier
  4. Handle errors gracefully (401 for invalid token, 403 for unauthorized)

The frontend will automatically fall back to the static features file if:

  • User is not authenticated
  • API returns an error
  • Network request fails