Build & Deploy a SaaS App
This tutorial takes you from zero to a live SaaS application. You’ll scaffold a project, explore what’s included, and deploy it.
What You’ll Build
Section titled “What You’ll Build”A project management app with:
- Landing page for marketing
- User authentication (email + social login)
- Dashboard with projects, tasks, and team management
- Full CRUD operations with optimistic UI
- Mobile-responsive layout
Prerequisites
Section titled “Prerequisites”- Node.js 18+
- Python 3.8+
- npm, pnpm, or yarn
Step-by-Step
Section titled “Step-by-Step”-
Install the CLI
Terminal window pip install varitykitVerify it works:
Terminal window varitykit doctorYou should see all checks passing:
✓ Python version: 3.11.0✓ Node.js version: 20.0.0✓ npm version: 10.0.0✓ All checks passed! -
Scaffold the project
Terminal window varitykit init my-saas-appcd my-saas-appThis creates a Next.js project from the SaaS Starter template.
-
Install dependencies
Terminal window npm install -
Start the dev server
Terminal window npm run devOpen http://localhost:3000.
You’ll see a landing page. Click “Get Started” to go to the login page, then sign in with your email. After login, you’ll see the dashboard.
-
Explore the dashboard
Try these:
- Projects: Create a project, edit its status, delete it
- Tasks: Add tasks, change priorities, mark as done
- Team: Add team members, assign roles
- Cmd+K: Open the command palette to search across everything
All data operations use optimistic updates — the UI updates instantly, then syncs with the database.
-
Build for production
Terminal window npm run buildThis creates a static export in the
out/directory. -
Deploy
Terminal window varitykit app deployOutput:
Analyzing your app...✓ Detected: Next.js app (static)✓ Building and uploading...Deploying...████████████████████ 100%✓ Deployed successfully!✓ Live at: https://your-app-url.varity.appYour app is now live. Share the URL with anyone.
-
Submit to the App Store (optional)
To list your app for users to discover:
Terminal window varitykit app deploy --submit-to-storeThis opens the Developer Portal where you can:
- Set your app name and description
- Choose pricing (free, one-time, or subscription)
- Upload screenshots
- Publish to store.varity.so
What Just Happened?
Section titled “What Just Happened?”When you deployed, Varity:
- Built your Next.js app into static files
- Deployed to globally distributed hosting
- Injected database credentials automatically
- Enabled authentication (users can sign in immediately)
- Made it discoverable (if you submitted to the App Store)
Total time: about 60 seconds for the deploy step.
Next Steps
Section titled “Next Steps”Now that you have a live app, you can:
- Customize the template — Change branding, colors, and content
- Add a new feature — Add a new data model with full CRUD
- Set up payments — Monetize your app with 90/10 revenue split