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

super-svelte-skeleton

v0.0.6

Published

Svelte 5 starter with auth, i18n, API layer, offline support, and UI components.

Downloads

782

Readme

My App

Svelte 5 starter with auth, i18n, API layer, offline support, and UI components.


Quick start

npm install
cp .env.example .env
npm run dev

App runs at http://localhost:5173.


Environment variables

Edit .env:

PUBLIC_API_URL="https://api.myapp.com"
PUBLIC_SITE_NAME="My App"

Variables prefixed PUBLIC_ are available in both browser and server. Others are server-only. Restart dev server after changes.


Project structure

src/
├── routes/
│   ├── (auth)/          ← login, register, forgot/reset password
│   ├── (app)/           ← your app pages go here
│   └── +layout.svelte   ← root layout (locale init, snackbar, loader)
├── lib/
│   ├── api/             ← axios client, services, endpoints, types
│   ├── components/      ← reusable UI components
│   ├── shared/
│   │   ├── i18n/        ← translation store (t, locale, setLocale)
│   │   └── config/      ← app constants
│   └── stores/          ← auth, config state
├── hooks.server.ts      ← auth + locale middleware
messages/
├── en.json              ← English translations
├── ar.json              ← Arabic
└── es.json              ← Spanish

Building a page

1. Create the route

src/routes/(app)/dashboard/+page.svelte

2. Write the component

<script lang="ts">
  import { t } from '$shared/i18n';
</script>

<h1>{$t('dashboard_title')}</h1>
<p>{$t('dashboard_subtitle')}</p>

3. Add the translation key

messages/en.json:

{
  "dashboard_title": "Dashboard",
  "dashboard_subtitle": "Welcome back"
}

Run npm run machine-translate to auto-fill ar.json and es.json.


Calling an API

src/lib/api/endpoints/index.ts:

export const ENDPOINTS = {
  USERS: '/users',
};

src/lib/api/services/users.ts:

import { http } from '../http';
import { ENDPOINTS } from '../endpoints';

export const getUsers = () => http.get(ENDPOINTS.USERS);

Use in a component:

<script lang="ts">
  import { getUsers } from '$lib/api/services/users';

  let users = $state([]);
  onMount(async () => {
    const res = await getUsers();
    users = res.data;
  });
</script>

i18n

  • Import t explicitly in each component: import { t } from '$shared/i18n'
  • Use as $t('key') in templates — reactive, updates when language changes
  • Change language: setLocale('ar') (auto-imported, persists to localStorage)
  • RTL is handled automatically — <html dir> updates on language switch

Commands

| Command | What it does | |---|---| | npm run dev | Start dev server | | npm run build | Production build | | npm run preview | Preview production build | | npm run check | TypeScript + Svelte type check | | npm run lint | ESLint | | npm run format | Prettier | | npm run machine-translate | Auto-fill missing translation keys |