npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@djangocfg/ext-support

v1.0.7

Published

Support ticket system extension for DjangoCFG

Downloads

699

Readme

DjangoCFG Extension Preview

📦 View in Marketplace📖 Documentation⭐ GitHub

@djangocfg/ext-support

Customer support and ticketing system extension for DjangoCFG.

Part of DjangoCFG — modern Django framework for production-ready SaaS applications.

Features

  • 🎫 Ticket Management - Create, track, and resolve support tickets
  • 💬 Real-time Chat - Live chat support integration
  • 📧 Email Integration - Convert emails to tickets automatically
  • 🏷️ Categories & Tags - Organize tickets with custom categories
  • 👥 Team Assignment - Assign tickets to support agents
  • 📊 Analytics - Track response times and resolution rates
  • 🔔 Notifications - Real-time ticket updates
  • 📎 Attachments - Support for file attachments

Install

pnpm add @djangocfg/ext-support

Usage

Provider Setup

import { SupportExtensionProvider } from '@djangocfg/ext-support/hooks';

export default function RootLayout({ children }) {
  return (
    <SupportExtensionProvider>
      {children}
    </SupportExtensionProvider>
  );
}

Create Support Ticket

import { useSupportContext } from '@djangocfg/ext-support/hooks';

function ContactSupport() {
  const { createTicket, isCreatingTicket } = useSupportContext();

  const handleSubmit = async (e: React.FormEvent<HTMLFormElement>) => {
    e.preventDefault();
    const formData = new FormData(e.currentTarget);

    await createTicket({
      subject: formData.get('subject') as string,
      description: formData.get('description') as string,
      category: 'technical',
      priority: 'medium',
    });
  };

  return (
    <form onSubmit={handleSubmit}>
      <input name="subject" placeholder="Subject" required />
      <textarea name="description" placeholder="Describe your issue" required />
      <button type="submit" disabled={isCreatingTicket}>
        {isCreatingTicket ? 'Submitting...' : 'Submit Ticket'}
      </button>
    </form>
  );
}

View Tickets

import { useSupportContext } from '@djangocfg/ext-support/hooks';

function TicketsPage() {
  const { tickets, isLoadingTickets, updateTicket } = useSupportContext();

  const handleStatusChange = async (ticketId: string, status: string) => {
    await updateTicket(ticketId, { status });
  };

  return (
    <div>
      <h2>Support Tickets</h2>
      {tickets.map(ticket => (
        <div key={ticket.id}>
          <h3>{ticket.subject}</h3>
          <p>{ticket.description}</p>
          <span>Status: {ticket.status}</span>
          <span>Priority: {ticket.priority}</span>
          <select
            value={ticket.status}
            onChange={(e) => handleStatusChange(ticket.id, e.target.value)}
          >
            <option value="open">Open</option>
            <option value="in_progress">In Progress</option>
            <option value="resolved">Resolved</option>
            <option value="closed">Closed</option>
          </select>
        </div>
      ))}
    </div>
  );
}

Ticket Details with Comments

import { useSupportContext } from '@djangocfg/ext-support/hooks';

function TicketDetails({ ticketId }: { ticketId: string }) {
  const { getTicketById, addComment } = useSupportContext();
  const [ticket, setTicket] = useState(null);

  useEffect(() => {
    getTicketById(ticketId).then(setTicket);
  }, [ticketId]);

  const handleAddComment = async (text: string) => {
    await addComment(ticketId, {
      text,
      is_internal: false,
    });
    // Refresh ticket
    getTicketById(ticketId).then(setTicket);
  };

  if (!ticket) return <div>Loading...</div>;

  return (
    <div>
      <h2>{ticket.subject}</h2>
      <p>{ticket.description}</p>

      <div>
        <h3>Comments</h3>
        {ticket.comments?.map(comment => (
          <div key={comment.id}>
            <strong>{comment.author}</strong>
            <p>{comment.text}</p>
            <span>{new Date(comment.created_at).toLocaleString()}</span>
          </div>
        ))}
      </div>

      <textarea
        placeholder="Add a comment..."
        onKeyDown={(e) => {
          if (e.key === 'Enter' && !e.shiftKey) {
            e.preventDefault();
            handleAddComment(e.currentTarget.value);
            e.currentTarget.value = '';
          }
        }}
      />
    </div>
  );
}

Ticket Filters

import { useSupportContext } from '@djangocfg/ext-support/hooks';

function TicketFilters() {
  const { tickets, filterTickets } = useSupportContext();

  const handleFilter = (status: string) => {
    filterTickets({ status });
  };

  return (
    <div>
      <button onClick={() => handleFilter('open')}>
        Open ({tickets.filter(t => t.status === 'open').length})
      </button>
      <button onClick={() => handleFilter('in_progress')}>
        In Progress ({tickets.filter(t => t.status === 'in_progress').length})
      </button>
      <button onClick={() => handleFilter('resolved')}>
        Resolved ({tickets.filter(t => t.status === 'resolved').length})
      </button>
    </div>
  );
}

API Reference

Support Context

  • tickets - List of all tickets
  • createTicket(data) - Create new ticket
  • updateTicket(id, data) - Update ticket
  • deleteTicket(id) - Delete ticket
  • getTicketById(id) - Get ticket details
  • addComment(ticketId, data) - Add comment to ticket
  • assignTicket(ticketId, agentId) - Assign ticket to agent
  • closeTicket(id) - Close ticket
  • reopenTicket(id) - Reopen closed ticket
  • filterTickets(filters) - Filter tickets by criteria
  • isLoadingTickets - Loading state
  • isCreatingTicket - Creation state

Ticket Properties

interface Ticket {
  id: string;
  subject: string;
  description: string;
  status: 'open' | 'in_progress' | 'resolved' | 'closed';
  priority: 'low' | 'medium' | 'high' | 'urgent';
  category: string;
  assigned_to?: string;
  created_at: string;
  updated_at: string;
  comments?: Comment[];
}

License

MIT

Links