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

a-guy

v0.18.0

Published

Website template for Payload

Readme

A-Guy: AI-Powered Educational Platform

A modern, AI-driven learning platform built with Payload CMS, Next.js, and MongoDB Atlas. AGuy is designed as an "AI Operating System" for education — combining a learning management system, intelligent chat with memory, content management, and multi-tenant infrastructure.

Overview

AGuy is not a typical website or LMS. It's a unified platform that integrates:

  • Course Management: Hierarchical content structure (Courses → Chapters → Lessons → Exercises)
  • AI-Powered Chat: Smart tutoring with context awareness and long-term memory
  • PDF Processing: Extract exercises from PDF documents using Vision AI
  • Multi-Tenant: Support for multiple organizations with isolated data
  • Admin Panel: Full-featured CMS with custom components

📖 Read the full introduction — Learn about A-Guy's unique approach, advantages, and technical architecture.

Tech Stack

| Layer | Technology | | ---------- | ---------------------------------- | | CMS & Data | Payload CMS 3.73 | | Frontend | Next.js 15 (App Router) | | Database | MongoDB Atlas (with Vector Search) | | Styling | Tailwind CSS + shadcn/ui | | AI | Google Gemini, OpenAI | | Deployment | Vercel |

Quick Start

Prerequisites

  • Node.js 18+
  • pnpm 9+
  • MongoDB Atlas account (with Vector Search enabled)
  • Google Gemini API key (for AI features)

Setup

# Clone the repository
git clone https://github.com/A-Guy-educ/A-Guy.git
cd A-Guy

# Install dependencies
pnpm install

# Copy environment variables
cp .env.example .env

# Start MongoDB (local) or ensure Atlas is configured
docker-compose up -d

# Generate types and import map
pnpm generate:types
pnpm generate:importmap

# Start development server
pnpm dev

Open http://localhost:3000 to access the application.

Admin Access

The admin panel is available at /admin. Create your first admin user during the initial setup.

Project Structure

src/
├── app/                    # Next.js App Router pages
│   ├── (frontend)/         # Public-facing pages
│   │   ├── courses/       # Course, chapter, lesson pages
│   │   ├── ask/           # AI chat interface
│   │   └── practice/      # Practice exercises
│   └── (payload)/         # Payload admin routes
│       └── admin/          # Admin panel
├── collections/            # Payload CMS collections
├── globals/                # Global configurations
├── hooks/                  # Custom hooks
├── ui/
│   ├── admin/             # Admin panel components
│   └── web/               # Frontend components
├── server/
│   └── payload/           # Payload server code
│       ├── collections/    # Collection configurations
│       ├── endpoints/     # Custom API endpoints
│       ├── jobs/          # Background job tasks
│       └── migrations/    # Database migrations
└── payload.config.ts      # Main Payload configuration

Key Features

Course Hierarchy

The learning content is organized in a hierarchical structure:

  • Course: Top-level learning path
  • Chapter: Thematic unit within a course
  • Lesson: Individual teaching unit
  • Exercise: Atomic learning item (questions, problems, quizzes)

AI Chat with Memory

The platform includes an intelligent chat system that:

  • Maintains conversation context across sessions
  • Stores long-term memories with vector embeddings
  • Provides personalized tutoring based on learning history
  • Supports PDF and image uploads for analysis

PDF to Exercise Pipeline

Convert PDF documents into structured exercises:

  1. Upload PDF document
  2. AI extracts content using Vision models
  3. Content is chunked and stored in memory
  4. Exercises are generated with context awareness

Multi-Tenant Architecture

Built-in support for multiple organizations:

  • Tenant-scoped data isolation
  • Configuration entries per tenant
  • Locale support for courses

Collections

The platform includes the following Payload CMS collections:

| Collection | Purpose | | --------------- | ------------------------- | | users | User accounts with roles | | courses | Learning courses | | chapters | Course chapters | | lessons | Individual lessons | | exercises | Practice exercises | | conversations | Chat history | | memoryItems | Long-term AI memory | | media | File uploads | | pages | Static pages | | posts | Blog posts | | prompts | AI prompt templates | | tenants | Multi-tenant organization |

Environment Variables

# Required
DATABASE_URL=mongodb+srv://...
PAYLOAD_SECRET=your-secret-key

# AI Services
GEMINI_API_KEY=your-gemini-key
OPENAI_API_KEY=your-openai-key

# Multi-tenant (when MCP_ENABLED=true)
DEFAULT_TENANT_SLUG=default
MCP_ENABLED=false

# Optional
MONGODB_MAX_POOL_SIZE=2
CRON_SECRET=your-cron-secret

Development Commands

# Development
pnpm dev              # Start dev server
pnpm dev:full         # Clean restart with type generation

# Database
pnpm db:start         # Start local MongoDB
pnpm db:stop          # Stop local MongoDB
pnpm db:reset         # Reset database

# Code Generation
pnpm generate:types   # Generate Payload types
pnpm generate:importmap # Generate admin import map

# Testing
pnpm test:unit        # Unit tests
pnpm test:int         # Integration tests
pnpm test:e2e         # E2E tests with Playwright
pnpm test             # All tests

# Quality
pnpm typecheck        # TypeScript check
pnpm lint             # Linting
pnpm format:check     # Format check

# Release
pnpm release          # Semantic release

Documentation

Additional documentation is available in the docs/ folder:

AI Agent Support

This project includes AI-optimized documentation for autonomous agents:

  • Pattern Index: .ai-docs/indexes/pattern-index.json - Code patterns by category
  • Documentation Search: Fast keyword-based search
  • Smart Doc Loader: Context-aware documentation loading

Generate indexes:

pnpm ai:generate-all

License

MIT