How to Build Your First Web App with neoSuite
neoSuite provides everything you need to build a subscription-based SaaS application. This tutorial will guide you through creating your first web app with integrated subscription management.
What You'll Build
By the end of this tutorial, you'll have a working SaaS application with:
- User authentication and registration
- Subscription plans and billing
- Feature access control
- Customer dashboard
- Analytics and reporting
Step 1: Project Setup
Create a new project and install the necessary dependencies:
mkdir my-saas-app
cd my-saas-app
npm init -y
npm install @neobrillia/neobrightsuite-sdk express
Step 2: Configure neoSuite
Set up your neoSuite configuration:
const { NeoBrightSuite } = require('@neobrillia/neobrightsuite-sdk');
const suite = new NeoBrightSuite({
apiKey: process.env.NEO_BRIGHTSUITE_API_KEY,
environment: 'sandbox',
});
Step 3: Create Subscription Plans
Define your subscription tiers using the neoBilling module:
await suite.billing.createPlan({
name: 'Starter',
price: 29,
interval: 'month',
features: ['basic-analytics', 'email-support'],
});
Step 4: Implement User Registration
Set up user registration with neoAttract:
app.post('/register', async (req, res) => {
const user = await suite.attract.createLead({
email: req.body.email,
name: req.body.name,
});
// Handle user creation
});
Step 5: Add Subscription Management
Implement subscription creation and management:
app.post('/subscribe', async (req, res) => {
const subscription = await suite.billing.createSubscription({
customerId: req.user.id,
planId: req.body.planId,
});
});
Step 6: Implement Feature Access Control
Use neoAccess to control feature availability:
const hasAccess = await suite.access.checkFeature({
userId: req.user.id,
feature: 'advanced-analytics',
});
Step 7: Add Analytics
Track key metrics with neoInsights:
const metrics = await suite.insights.getMetrics({
startDate: '2024-01-01',
endDate: '2024-12-31',
});
Conclusion
You now have a fully functional SaaS application! Continue building by adding more features, customizing the UI, and preparing for launch.

