Create Varity App

2.0.0-beta.22 · active · verified Wed Apr 22

Create Varity App is a command-line interface (CLI) tool designed to bootstrap production-ready web applications with integrated authentication, database, storage, and payment capabilities. Functioning as an 'all-in-one' platform, Varity aims to significantly reduce development and deployment time, boasting '60-second deploys' and claiming 60-80% cost savings compared to traditional cloud setups like AWS. It achieves this through a 'zero-configuration' approach for core services, leveraging internal packages such as `@varity-labs/sdk` for backend interactions and `@varity-labs/ui-kit` for frontend components. The package is currently in a beta state, version `2.0.0-beta.22`, indicating active development and a rapid release cadence for new features and improvements. It targets developers building SaaS products, dashboards, or any web application requiring robust foundational features without extensive manual setup. Key differentiators include its unified platform experience, emphasis on developer experience with React and TypeScript, and a marketplace for monetization.

Common errors

Warnings

Install

Imports

Quickstart

Initializes a new Varity application, installs dependencies, starts the development server, and demonstrates basic database interaction and UI authentication components within the generated project structure.

npx create-varity-app my-awesome-app
cd my-awesome-app
npm install
npm run dev

// Example of using SDK within the created app (e.g., in a React component or API route):
import { db } from '@varity-labs/sdk';
import { AuthProvider, LoginButton } from '@varity-labs/ui-kit';

function MyAppComponent() {
  const handleAddPost = async () => {
    const posts = db.collection('posts');
    const newPost = await posts.add({
      title: 'My First Varity Post',
      content: 'Hello, Varity world!',
      authorId: 'user-123' // Replace with actual user ID from auth context
    });
    console.log('Added post:', newPost);
  };

  return (
    <AuthProvider>
      <div>
        <h1>Welcome to Varity!</h1>
        <LoginButton />
        <button onClick={handleAddPost}>Add Example Post</button>
      </div>
    </AuthProvider>
  );
}

view raw JSON →