Getting Started
Build your first SynApp Mini App in 5 minutes. This guide will walk you through creating, developing, and deploying a Mini App.
Prerequisites
- Node.js 18+ (Download)
- npm or yarn
- Basic knowledge of React
Step 1: Create Project
Use our CLI tool to scaffold a new project:
Terminal
npm create synapp-miniapp my-first-appYou'll be prompted to choose:
- Template: Basic / Game / Dashboard
- TypeScript: Yes / No
Example Output
🚀 Create SynApp Mini App ? Project name: my-first-app ? Select a template: › Basic App ? Use TypeScript? › Yes ✔ Project created successfully!
Step 2: Install Dependencies
cd my-first-app
npm installThis installs:
react&react-dom@synapp/ui(SynApp SDK)vite(Build tool)
Step 3: Start Development Server
npm run devOpen http://localhost:5173 in your browser.
You should see a welcome screen with a counter demo.
Step 4: Explore the Code
Project Structure
my-first-app/
├── src/
│ └── App.tsx # Your Mini App component
├── package.json # Dependencies
├── vite.config.ts # Build configuration
└── README.md # Project documentation
App.tsx (Simplified)
import { SynAppProvider, SynAppPage, SynAppButton } from '@synapp/ui';
function App() {
return (
<SynAppProvider>
<SynAppPage requireAuth={false} title="My First App">
<div className="p-8">
<h1 className="text-4xl font-bold mb-4">
Welcome to SynApp! 👋
</h1>
<SynAppButton variant="primary">
Click Me
</SynAppButton>
</div>
</SynAppPage>
</SynAppProvider>
);
}
export default App;Step 5: Build for Production
npm run buildThis creates dist/bundle.js - your production-ready Mini App.
dist/
└── bundle.js # Your Mini App bundle (~50-200KB)
Step 6: Deploy to CDN
Option 1: Vercel (Recommended)
# Install Vercel CLI
npm i -g vercel
# Deploy
cd dist
vercel --prodResult: https://your-app.vercel.app/bundle.js
Step 7: Submit to SynApp
- Go to SynApp Submit App
- Fill in the form:
- Name: My First App
- Category: Utilities
- Architecture: v2 Mini App
- Bundle URL:
https://your-cdn.com/bundle.js
- Click Submit
Your app is now live! 🎉
Users can access your Mini App instantly from SynApp.
Next Steps
API Reference
Complete SDK documentation
Learn More
Gaming Hooks
Build games with haptics & sound
Explore
Troubleshooting
"Module not found: @synapp/ui"
Solution:
npm install @synapp/ui"Bundle does not export a default component"
Solution: Ensure your App.tsx has:
export default App; // ✅ Correct
// Not:
export { App }; // ❌ Wrong