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 🙏

© 2026 – Pkg Stats / Ryan Hefner

allen-react-framework

v0.1.0

Published

A comprehensive eLearning framework for React applications

Readme

Allen React Framework

A modern, accessible, and responsive eLearning framework built with React, TypeScript, and Tailwind CSS.

🚀 Features

  • Modern Architecture: Built with React 18, TypeScript, and modern ES6+ features
  • Professional UI/UX: Beautiful, responsive design with Tailwind CSS
  • Accessibility First: WCAG compliant with proper ARIA labels and keyboard navigation
  • Component-Based: Extensible interaction system with a base class architecture
  • Responsive Design: Mobile-first approach with progressive enhancement
  • Type Safety: Full TypeScript support with comprehensive type definitions

🏗️ Architecture

Core Components

  • BaseInteraction: Abstract base class for all interactions
  • MultipleChoiceInteraction: Full-featured multiple choice with scoring and feedback
  • DragDropInteraction: Interactive drag & drop categorization
  • TextEntryInteraction: Text input with validation and similarity scoring
  • SimpleInteraction: Example implementation showing the framework's capabilities
  • Type System: Comprehensive TypeScript interfaces for configuration and state

Key Features

  • State Management: Built-in state handling with lifecycle hooks
  • Event System: Standardized event handling for state changes and completion
  • Styling System: Tailwind CSS with custom component classes
  • Responsive Utilities: Mobile-first responsive design utilities

🛠️ Technology Stack

  • Frontend: React 18 + TypeScript
  • Styling: Tailwind CSS v4 + PostCSS
  • Build Tool: Webpack 5 + ts-loader
  • Development: Hot reload with webpack-dev-server

📦 Installation

# Clone the repository
git clone <your-repo-url>
cd allen-react-framework

# Install dependencies
npm install

# Start development server
npm start

# Build for production
npm run build

🎯 Usage

Basic Interaction Setup

import { SimpleInteraction } from './interactions/SimpleInteraction';

const config = {
  id: 'demo-1',
  type: 'simple-question',
  title: 'Demo Question',
  description: 'This is a simple demonstration',
  question: 'What is the capital of France?',
  correctAnswer: 'Paris'
};

<SimpleInteraction
  config={config}
  onStateChange={(state) => console.log('State:', state)}
  onComplete={(result) => console.log('Result:', result)}
/>

Using Built-in Interactions

import { MultipleChoiceInteraction } from './interactions/MultipleChoiceInteraction';
import { DragDropInteraction } from './interactions/DragDropInteraction';
import { TextEntryInteraction } from './interactions/TextEntryInteraction';

// Multiple Choice
const mcConfig = {
  id: 'question-1',
  type: 'multiple-choice',
  title: 'Knowledge Check',
  question: 'What is the capital of France?',
  options: [
    { id: '1', text: 'Paris', isCorrect: true },
    { id: '2', text: 'London', isCorrect: false },
    { id: '3', text: 'Berlin', isCorrect: false }
  ],
  scoring: { pointsPerCorrect: 10, pointsPerIncorrect: 0 }
};

<MultipleChoiceInteraction
  config={mcConfig}
  onComplete={(result) => console.log('Score:', result.score)}
/>

// Drag & Drop
const ddConfig = {
  id: 'categorize-1',
  type: 'drag-drop',
  instruction: 'Categorize these items',
  dragItems: [
    { id: '1', content: 'JavaScript', type: 'language' },
    { id: '2', content: 'React', type: 'framework' }
  ],
  dropZones: [
    { id: 'languages', title: 'Languages', accepts: ['language'] },
    { id: 'frameworks', title: 'Frameworks', accepts: ['framework'] }
  ]
};

<DragDropInteraction
  config={ddConfig}
  onComplete={(result) => console.log('Result:', result)}
/>

// Text Entry
const teConfig = {
  id: 'text-1',
  type: 'text-entry',
  question: 'What is your favorite programming language?',
  correctAnswers: ['JavaScript', 'Python', 'TypeScript'],
  allowPartialMatch: true,
  validation: { minLength: 3, maxLength: 20 }
};

<TextEntryInteraction
  config={teConfig}
  onComplete={(result) => console.log('Answer:', result.data.userAnswer)}
/>

Creating Custom Interactions

import { BaseInteraction } from './core/BaseInteraction';

export class CustomInteraction extends BaseInteraction {
  renderContent(): React.ReactNode {
    // Your custom content here
    return <div>Custom Content</div>;
  }

  renderFooter(): React.ReactNode {
    // Your custom footer here
    return <div>Custom Footer</div>;
  }
}

🎨 Styling

The framework uses Tailwind CSS with custom component classes:

  • .interaction-container: Main interaction wrapper
  • .btn: Base button styles
  • .btn-primary: Primary button variant
  • .btn-success: Success button variant
  • .btn-secondary: Secondary button variant
  • .form-input: Form input styling
  • .form-label: Form label styling

♿ Accessibility

  • ARIA Labels: Proper labeling for screen readers
  • Keyboard Navigation: Full keyboard support
  • Focus Management: Clear focus indicators
  • Semantic HTML: Proper heading hierarchy and landmarks
  • High Contrast: WCAG AA compliant color combinations

📱 Responsive Design

  • Mobile First: Designed for mobile devices first
  • Breakpoints: Responsive utilities for sm:, md:, lg:, xl:
  • Touch Friendly: Minimum 44px touch targets
  • Flexible Layouts: Grid and flexbox based responsive layouts

🔧 Development

Project Structure

src/
├── core/           # Base classes and utilities
├── interactions/   # Interaction implementations
├── types/          # TypeScript type definitions
├── styles/         # CSS and Tailwind configuration
└── index.tsx       # Main application entry point

Available Scripts

  • npm start: Start development server
  • npm run build: Build for production
  • npm run test: Run tests (when implemented)

🚀 Roadmap

Phase 1: Foundation ✅

  • [x] BaseInteraction class
  • [x] Tailwind CSS integration
  • [x] Basic interaction types
  • [x] Accessibility features

Phase 2: Enhanced Interactions

  • [ ] Multiple choice interactions
  • [ ] Drag and drop interactions
  • [ ] Form-based interactions
  • [ ] Assessment flows

Phase 3: Advanced Features

  • [ ] XState integration for complex state
  • [ ] Animation system
  • [ ] Analytics and tracking
  • [ ] Performance optimizations

Phase 4: Production Ready

  • [ ] Testing suite
  • [ ] Documentation
  • [ ] Performance monitoring
  • [ ] Deployment tools

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

📄 License

MIT License - see LICENSE file for details

🏢 About

Built by Allen Interactions for creating engaging, accessible eLearning experiences.


Version: 0.1.0
Last Updated: August 2025
Status: Foundation Complete - Ready for Enhancement