This guide covers the technical requirements for building and integrating custom applications into the Weam AI platform.

Core Requirements

Follow these 10 essential standards to ensure your application integrates properly with Weam AI.

Frontend Framework

Use Next.js as the frontend framework for all applications.

Backend Framework

If your application requires backend APIs, use Node.js or Express.js.

Database Configuration

All applications use MongoDB with a specific collection naming convention to prevent conflicts.
Collection Naming Pattern:
app_{appName}_{tableName}
Database Connection Setup:
const mongoUri = process.env.MONGODB_URI;

Authentication Requirements

Access to any application requires user authentication through Weam. Unauthenticated users must see a 404 page.
1

Check User Login Status

Verify authentication before rendering any content.
2

Handle Unauthenticated Users

Return a 404 page if user is not logged in.
3

Use IronSession

Leverage the pre-configured ironSession package for session handling.
Implementation Example:
import { getIronSession } from 'iron-session';
import { sessionOptions } from '../lib/session';

export async function getServerSideProps({ req, res }) {
  const session = await getIronSession(req, res, sessionOptions);
  
  if (!session.user) {
    return {
      notFound: true, // Returns 404 for unauthenticated users
    };
  }
  
  return {
    props: { user: session.user }
  };
}

Data Storage Convention

Always include user context and company identification when storing data to maintain proper access controls.
Required Data Structure:
{
  "user": {
    "id": session.user.id,
    "email": session.user.email
  },
  "companyId": session.user.companyId,
  // Your application-specific data
  ...appData
}

Theming Integration

Applications should match the existing Weam theme for consistent user experience. Use the same CSS variables and component patterns as the main platform.

Routing & Deployment

Base Path Configuration

All applications run behind nginx and require proper path configuration:
URL Structure Examples:
Route TypeExample URL
Pageexample.com/your-app-name/dashboard
APIexample.com/your-app-name/api/message
Make your application discoverable by adding it to the sidebar navigation.
Configuration File: src/seeders/superSolution.json Add a new object following the structure of existing applications. This ensures your application appears automatically in the sidebar navigation.

NGINX Setup Guide

Complete server configuration for production deployment.
1

Update and Install NGINX

sudo apt update
sudo apt install nginx -y
2

Create NGINX Configuration

sudo nano /etc/nginx/sites-available/weam
3

Enable Site and Test Configuration

sudo ln -s /etc/nginx/sites-available/weam /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx
4

Install SSL Certificate Tools

sudo apt install certbot python3-certbot-nginx -y
5

Generate SSL Certificate

sudo certbot --nginx -d os.weam.ai
Final Access URL:
https://example.yourdomain.com

Development Workflow

1

Project Setup

Create your Next.js application following the requirements above
2

Authentication Integration

Implement user authentication checks using ironSession
3

Database Configuration

Configure MongoDB with proper collection naming convention
4

Theme Application

Apply Weam’s visual theme and component patterns
5

Routing Setup

Configure base path and API routes with proper prefixes
6

Sidebar Integration

Add application to sidebar configuration file
7

Production Deployment

Configure nginx proxy rules and SSL certificates

Project Structure

Environment Configuration

# Application Configuration
NEXT_PUBLIC_API_BASE_PATH="/your-app-name"
MONGODB_URI=your-mongodb-connection-string
This integration method ensures your custom applications work within Weam’s existing architecture while maintaining security and consistency.