Skip to main content
Clients are partner-managed accounts with limited dashboard access, focusing on their allocated credits and event creation capabilities.

Client Account Structure

Clients are created and managed by partners:
interface ClientProfile {
  id: string;
  full_name: string;
  email: string;
  credits: number;          // Allocated by partner
  role: 'client';
  partner_id: string;       // Linked to partner
  total_generations: number;
  created_at: timestamp;
}
Clients cannot purchase credits directly - all credit allocations come from their parent partner account.

Dashboard Features

Limited Navigation

Client dashboard includes only:

My Events

Events created by the client

Credit Balance

Current available credits

Profile Settings

Basic account information

Generation History

Past AI photo generations

Credit Display

Always-visible credit counter:
<div className="flex items-center gap-2">
  <Zap className="w-5 h-5 text-yellow-400" />
  <span className="font-bold">{profile.credits.toLocaleString()}</span>
  <span className="text-xs text-white/40">créditos</span>
</div>
When credits reach 0, clients cannot create new events or generate photos. Contact partner for top-up.

Event Management

Creating Events

Same workflow as partners, but:
  • Credits deducted from client balance (not partner)
  • Client branding applied (if configured)
  • Limited to client’s style access
const handleCreateEvent = async (eventData) => {
  // Verify client has sufficient credits
  if (profile.credits < eventData.credits_allocated) {
    showToast('Créditos insuficientes. Contacta a tu proveedor.', 'error');
    return;
  }
  
  // Create event
  const { data, error } = await supabase
    .from('events')
    .insert({
      ...eventData,
      client_id: profile.id,
      partner_id: profile.partner_id  // Maintain partner link
    });
  
  // Deduct credits
  await supabase
    .from('profiles')
    .update({ 
      credits: profile.credits - eventData.credits_allocated 
    })
    .eq('id', profile.id);
};

Event Limitations

Clients have restricted event controls:
  • Create events from credit balance
  • Edit event branding
  • Select AI styles
  • Download QR codes
  • View event gallery
  • Monitor credit usage

Partner Relationship

Linked Partner Info

Client profile shows parent partner:
const PartnerInfo = ({ profile }) => {
  const [partner, setPartner] = useState(null);
  
  useEffect(() => {
    supabase
      .from('partners')
      .select('company_name, contact_email')
      .eq('id', profile.partner_id)
      .single()
      .then(({ data }) => setPartner(data));
  }, [profile.partner_id]);
  
  return (
    <div className="bg-white/5 p-4 rounded-xl">
      <p className="text-xs text-white/40 mb-1">Proveedor</p>
      <p className="font-bold">{partner?.company_name}</p>
      <a href={`mailto:${partner?.contact_email}`} className="text-xs text-accent">
        Contactar
      </a>
    </div>
  );
};

Credit Requests

Clients can request credits from partner:
1

Low Credit Alert

Notification when balance drops below threshold
2

Contact Partner

Click “Request Credits” button to email partner
3

Partner Processes

Partner receives request and can top-up via dashboard
4

Credits Added

Client receives notification when credits arrive

Simplified Interface

No Financial Features

Client dashboard excludes:
  • Payment methods
  • Invoice history
  • Commission rates
  • Revenue analytics
  • Wallet management

Focused UX

Streamlined for event creation:
const ClientDashboard = ({ profile }) => {
  return (
    <div className="max-w-4xl mx-auto">  {/* Narrower than partner dashboard */}
      <CreditBalance credits={profile.credits} />
      <EventsList clientId={profile.id} />
      <QuickCreateEvent />
    </div>
  );
};

Inherited Branding

Clients inherit partner branding settings:
logo_url
string
Partner logo displayed in client events
primary_color
string
Partner brand color applied to all UI
style_presets
array
Partner’s default style selections
Clients can override on per-event basis:
event.config = {
  ...partner.config,           // Inherit partner defaults
  ...clientCustomizations     // Override with client prefs
}

Notifications

Client-specific notifications:

Low Credits

Alert when balance drops below 100 credits

Event Ending Soon

Reminder 24h before event end date

Credits Added

Notification when partner tops up balance

Event Milestones

Celebrate 50, 100, 500 generations

Usage Analytics

Limited analytics for clients:

Personal Stats

  • Total events created
  • Total generations
  • Credits used vs. allocated
  • Most popular styles

Event Performance

Per-event breakdown:
const eventStats = {
  generations_count: 142,
  credits_used: 142,
  credits_remaining: 58,
  most_used_style: "John Wick - Baba Yaga",
  peak_hour: "20:00-21:00",
  average_session: "3.5 minutes"
};

Profile Settings

Editable Fields

full_name
string
Display name
avatar_url
string
Profile picture (future)

Readonly Fields

email
string
Login email (contact partner to change)
role
string
Account type: client
partner_id
string
Parent partner account

Support & Help

Client dashboard includes:
Direct email link to parent partner support

Future Enhancements

Planned features for client accounts:
  • Self-service credit requests
  • Favorite style presets
  • Event templates
  • Guest list management
  • Custom email notifications

Build docs developers (and LLMs) love