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

saast

v0.0.1

Published

Modern AI Chat SaaS Template - Build amazing chat applications

Readme

ChatSaaS - Enterprise AI Chat Application Template

ChatSaaS Logo

A production-ready, enterprise-grade SaaS template for building AI chat applications

MIT License React TypeScript Tailwind CSS

Live DemoDocumentationContributing

🚀 Features

💬 Advanced Chat Experience

  • OpenAI-style interface with real-time messaging
  • Conversation management with history and search
  • Mobile-optimized responsive design
  • Keyboard shortcuts and accessibility features
  • Message actions (edit, copy, delete, share)

🎨 Modern UI/UX

  • 4 beautiful themes (Light, Dark, Ocean Blue, Purple Rain)
  • Glassmorphism effects and smooth animations
  • Mobile-first responsive design
  • Touch-friendly interactions
  • Progressive Web App ready

🎯 Rich Content Rendering

  • Markdown with GitHub Flavored Markdown
  • Mermaid diagrams for flowcharts and visualizations
  • Syntax highlighting for 100+ programming languages
  • Code blocks with copy functionality
  • Tables, lists, blockquotes and more
  • Extensible renderer architecture

🔐 Enterprise Authentication

  • JWT-based security with refresh tokens
  • Form validation with Zod schemas
  • Protected routes and role-based access
  • Password strength validation
  • Social login ready (extendable)

🏗️ Production Architecture

  • TypeScript throughout for type safety
  • Error boundaries and comprehensive error handling
  • Performance optimized with code splitting
  • SEO friendly with meta tags and structured data
  • Analytics ready with event tracking
  • Monitoring integration (Sentry ready)

📱 Mobile Excellence

  • Touch gestures and mobile interactions
  • Offline support with service worker
  • App-like experience with PWA features
  • Optimized for slow networks
  • Native sharing support

🛠️ Quick Start

Prerequisites

  • Node.js 18+ and npm 9+
  • Git for version control

Installation

# Clone and navigate to project
cd C:\Projects\saast\client

# Install dependencies
npm install

# Copy environment configuration
cp .env.example .env.local

# Start development server
npm run dev

Demo Account

📦 Scripts

# Development
npm run dev              # Start dev server with hot reload
npm run type-check:watch # Watch TypeScript errors

# Building
npm run build           # Production build with optimizations
npm run build:dev       # Development build
npm run preview         # Preview production build locally

# Code Quality
npm run lint            # Check code quality
npm run lint:fix        # Fix linting issues
npm run format          # Format code with Prettier
npm run type-check      # Check TypeScript types

# Analysis
npm run analyze         # Bundle analyzer
npm run clean          # Clean build artifacts

🏗️ Architecture

Project Structure

src/
├── components/         # Reusable UI components
│   ├── ui/            # Base design system components
│   ├── auth/          # Authentication components
│   ├── chat/          # Chat-specific components
│   └── layout/        # Layout and navigation
├── pages/             # Route-based page components
├── store/             # Global state management (Zustand)
├── services/          # API services and external integrations
├── hooks/             # Custom React hooks
├── utils/             # Utility functions and helpers
├── types/             # TypeScript type definitions
├── config/            # Environment and app configuration
└── styles/            # Global styles and themes

Key Technologies

  • React 19 - Modern React with concurrent features
  • TypeScript 5.8 - Full type safety
  • Tailwind CSS 3.4 - Utility-first styling
  • Zustand 5 - Lightweight state management
  • React Router 6 - Client-side routing
  • React Hook Form + Zod - Form handling with validation
  • Vite 6 - Fast build tool and dev server

🎨 Theming System

Built-in Themes

  1. Light Theme - Clean and professional
  2. Dark Theme - Easy on the eyes
  3. Ocean Blue - Cool blue tones
  4. Purple Rain - Vibrant gradients

Custom Themes

// Add new theme in src/store/settingsStore.ts
const customTheme: Theme = {
  id: 'custom',
  name: 'Custom Theme',
  mode: 'dark',
  colors: {
    primary: '#your-color',
    secondary: '#your-color',
    // ... other colors
  },
};

🔧 Configuration

Environment Variables

# API Configuration
VITE_API_BASE_URL=https://api.yourdomain.com
VITE_ENABLE_MOCK_API=false

# Features
VITE_ENABLE_ANALYTICS=true
VITE_ENABLE_ERROR_REPORTING=true

# Analytics
VITE_GOOGLE_ANALYTICS_ID=GA_MEASUREMENT_ID
VITE_SENTRY_DSN=YOUR_SENTRY_DSN

Feature Flags

Control features via environment variables:

  • VITE_ENABLE_VOICE_RECORDING - Voice input
  • VITE_ENABLE_FILE_UPLOAD - File attachments
  • VITE_ENABLE_ANALYTICS - User analytics
  • VITE_ENABLE_ERROR_REPORTING - Error tracking

🚀 Deployment

Build for Production

npm run build

Deploy to Vercel

npm install -g vercel
vercel --prod

Deploy to Netlify

npm run build
# Deploy dist/ folder to Netlify

Docker Deployment

FROM node:18-alpine as builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build

FROM nginx:alpine
COPY --from=builder /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

🔌 API Integration

Replace Mock API

  1. Update VITE_API_BASE_URL in .env.local
  2. Set VITE_ENABLE_MOCK_API=false
  3. Implement backend endpoints:
    • POST /auth/login - User authentication
    • POST /auth/register - User registration
    • POST /chat/message - Send message to AI

Backend Requirements

// Expected API responses
interface LoginResponse {
  user: User;
  token: string;
}

interface ChatResponse {
  message: {
    id: string;
    content: string;
    role: 'assistant';
    timestamp: string;
  };
}

📊 Performance

Optimization Features

  • Code splitting - Lazy loaded routes and components
  • Bundle analysis - Visualize bundle size
  • Tree shaking - Remove unused code
  • Image optimization - WebP and lazy loading
  • Caching strategy - Service worker and HTTP caching

Performance Monitoring

# Analyze bundle size
npm run analyze

# Check build performance
npm run build -- --stats

🧪 Testing (Coming Soon)

# Unit tests
npm run test

# E2E tests
npm run test:e2e

# Coverage report
npm run test:coverage

🔒 Security

Security Features

  • Content Security Policy (CSP) headers
  • XSS protection with sanitized HTML
  • CSRF protection with token validation
  • Secure authentication with JWT
  • Input validation with Zod schemas

Security Best Practices

  • Environment variables for secrets
  • Sanitized user inputs
  • Secure HTTP headers
  • Regular dependency updates

📱 PWA Features

The app is Progressive Web App ready:

  • Offline support - Works without internet
  • App-like experience - Install on device
  • Push notifications - Engage users
  • Background sync - Sync when online

🌐 Internationalization (Coming Soon)

// i18n ready structure
const messages = {
  en: { welcome: 'Welcome to ChatSaaS' },
  es: { welcome: 'Bienvenido a ChatSaaS' },
  fr: { welcome: 'Bienvenue à ChatSaaS' },
};

🤝 Contributing

We welcome contributions! See our Contributing Guide for details.

Development Workflow

  1. Fork the repository
  2. Create feature branch: git checkout -b feature/amazing-feature
  3. Make changes with tests
  4. Commit: git commit -m 'Add amazing feature'
  5. Push: git push origin feature/amazing-feature
  6. Submit Pull Request

Code Standards

  • TypeScript for all new code
  • ESLint + Prettier for formatting
  • Conventional commits for messages
  • Component documentation required
  • Mobile-first responsive design

📈 Roadmap

Version 1.1 (Q2 2024)

  • [ ] Voice input/output
  • [ ] File upload support
  • [ ] Advanced admin dashboard
  • [ ] Multi-language support

Version 1.2 (Q3 2024)

  • [ ] Real-time collaboration
  • [ ] Plugin system
  • [ ] Advanced analytics
  • [ ] White-label solution

Version 2.0 (Q4 2024)

  • [ ] AI model marketplace
  • [ ] Custom model training
  • [ ] Enterprise SSO
  • [ ] Advanced integrations

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

📞 Support


Built with ❤️ for the developer community

⭐ Star us on GitHub🐦 Follow on Twitter