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

@crimson-education/replit-sdk

v1.0.2-beta-15

Published

SDK for Replit app integration

Readme

Replit SDK for Crimson App

This SDK facilitates the rapid integration of Replit-hosted applications into the Crimson ecosystem.

Core Principle

The integration functions by passing environment variables and user parameters via URL parameters to the Replit frontend. This data is stored in-memory and persists until the current session ends.

Project Structure

  • api

    (expressRouter.ts): Provides the bindApi function, used to bind /api/function routes to server.js for forwarding API request calls.

    (graphqlProxy.ts): Defines the data structures and schemas used for forwarding GraphQL interface requests.

  • components

    (external-link.tsx): A specialized component designed to handle navigation to external URLs.

  • hooks

    (use-url-params.ts): The core hook for processing parameters passed via iframe. It extracts essential data such as Auth Tokens and Environment API endpoints.

  • functions

    (index.ts): Contains implementations for fundamental API calls, including: fetchLoginUser, getMyStudents

  • utils

    (datadog.ts): Manages the Datadog initialization instance and provides the trackEvent function for analytics.

    (event.ts): Utilities for iframe-to-parent communication using the postMessage API.

    (queryClient.ts): A pre-configured API request client wrapper.

Here is a set of prompts that you may need

Prompts from replit:

 we are going to embed the app on a iframe, so now you need to do all things one by one listed here:
1. install and save package @crimson-education/[email protected]
2. wrap the App with the `IDevProvider` context, like
  ```
  // ...
  import { IDevProvider } from "@crimson-education/replit-sdk/lib/context/dev-context";
  // ...
  function App() {
    return (
      <IDevProvider>
        <QueryClientProvider client={queryClient}>
          <TooltipProvider>
            <Toaster />
            <Router />
          </TooltipProvider>
        </QueryClientProvider>
      </IDevProvider>
    );
  }
  ```
3. set Express proxy endpint, call `bindApi(app)` to bind `/api/function` route in `server/routes.ts`
4. use the ExternalLink component to replace all the <a> tag which has a external link.
5. set dev capp endpoint on top of the app before any api call like ```
import { setStoredParams } from "@crimson-education/replit-sdk/lib/hooks/use-url-params";
setStoredParams({'cappEndpoint': 'http://6d94f1eb.r8.cpolar.top/graphql'});```
6. remove fetch button and staff userId input in every student picker dialog, and set getStoredUserId() as default staffId to load students once the dialog opened.
7. replace the fetchLoginUser and fetchMyStudent function, use the exported functions from the sdk and clean up the redundant server-side endpoints.
8. the fetchStudents api could return duplicated students, remove them to keep unique
9. init datadog, like: ```import { init as datadogInit } from "@crimson-education/replit-sdk/lib/utils/datadog";
datadogInit({ app: '{{here is the replit app name}}' });```
10. use trackEvent function to track all events that you may intrest, ```import { ExternalLink, trackEvent } from "@crimson-education/replit-sdk";
trackEvent('OPEN_COPILOT'); ```