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 🙏

© 2025 – Pkg Stats / Ryan Hefner

create-tsmart-web-app

v1.0.0

Published

CLI tool to create tsmart Next.js web app

Downloads

3

Readme

Create TSmart Web App

A powerful CLI tool to create modern Next.js web applications with TypeScript, Supabase authentication, and separate admin/user dashboards.

Features

  • Next.js 15 - Latest React framework with App Router
  • 🔐 Supabase Auth - Complete authentication system with Google OAuth
  • 👥 Dual Dashboards - Separate admin and user interfaces
  • 🎨 Modern UI - Tailwind CSS with shadcn/ui components
  • 📱 Responsive Design - Mobile-first approach
  • 🛡️ Security Headers - Production-ready security configuration
  • 🧪 Type Safety - Full TypeScript support
  • 📊 Analytics Ready - Google Analytics integration
  • 🚀 Deploy Ready - Optimized for Vercel deployment

Quick Start

npx create-tsmart-web-app my-app
cd my-app
npm run dev

Usage

Create a new project

npx create-tsmart-web-app my-project-name

Skip dependency installation

npx create-tsmart-web-app my-project --skip-install

What's Included

📁 Project Structure

my-app/
├── app/
│   ├── (auth)/
│   │   ├── signin/
│   │   └── signup/
│   ├── admin/           # Admin dashboard
│   ├── dashboard/       # User dashboard
│   ├── api/
│   ├── globals.css
│   ├── layout.tsx
│   └── page.tsx
├── components/
│   ├── ui/              # shadcn/ui components
│   ├── layout/          # Layout components
│   └── shared/          # Shared components
├── lib/
│   ├── supabase/        # Supabase configuration
│   ├── auth/            # Authentication utilities
│   └── utils.ts         # Utility functions
└── public/              # Static assets

🔧 Built-in Features

  • Authentication Pages: Login, signup with Google OAuth
  • Protected Routes: Middleware-based route protection
  • Role-based Access: Admin and user role separation
  • Responsive Layouts: Mobile-friendly navigation
  • Error Handling: 404 and error pages
  • Loading States: Built-in loading components
  • Health Check: API health monitoring
  • SEO Optimized: Meta tags and OpenGraph

🎨 UI Components

  • Button, Input, Label, Card components
  • Dashboard and Admin layouts
  • Navigation and sidebar components
  • Responsive design patterns
  • Dark mode support (CSS variables)

Configuration

Environment Variables

After creating your project, configure these environment variables in .env.local:

# Application
NEXT_PUBLIC_APP_URL=http://localhost:3000
NEXT_PUBLIC_APP_NAME=TSmart

# Supabase
NEXT_PUBLIC_SUPABASE_URL=your-supabase-url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-supabase-anon-key
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key

# Google OAuth
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret

# NextAuth
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your-secret-key-here-minimum-32-chars

Supabase Setup

  1. Create a new Supabase project
  2. Get your project URL and anon key
  3. Configure Google OAuth in Supabase Auth settings
  4. Set up user profiles table (optional)
-- Optional: Create profiles table for user roles
CREATE TABLE profiles (
  id UUID REFERENCES auth.users ON DELETE CASCADE,
  role TEXT DEFAULT 'user',
  created_at TIMESTAMP WITH TIME ZONE DEFAULT timezone('utc'::text, now()) NOT NULL,
  PRIMARY KEY (id)
);

Available Scripts

  • npm run dev - Start development server
  • npm run build - Build for production
  • npm run start - Start production server
  • npm run lint - Run ESLint
  • npm run type-check - Run TypeScript check

Deployment

Vercel (Recommended)

npm run build
vercel --prod

Docker

npm run docker:build
npm run docker:run

Customization

Styling

The project uses Tailwind CSS with custom CSS variables for theming. Modify app/globals.css to customize colors and styles.

Authentication

Authentication is handled by Supabase. You can customize the auth flow in:

  • app/auth/signin/page.tsx
  • app/auth/signup/page.tsx
  • lib/supabase/ configuration files

Layouts

  • User Dashboard: components/layout/dashboard-layout.tsx
  • Admin Dashboard: components/layout/admin-layout.tsx

Contributing

We welcome contributions! Please see our contributing guidelines.

Support

License

MIT License - see LICENSE file for details.


Built with ❤️ by the TSmart Team