This is a template for an application showcasing integration capabilities using Integration.app. The app is built with Next.js and demonstrates how to implement user authentication and integration token generation.
- Node.js 18+ installed
- Integration.app workspace credentials (Workspace Key and Secret)
- Clone the repository:
git clone <repository-url>
cd <repository-name>- Install dependencies:
npm install
# or
yarn install- Set up environment variables:
# Copy the sample environment file
cp .env-sample .env- Edit
.envand add your Integration.app endpoints for API and IO:
NEXT_PUBLIC_INTEGRATION_APP_API_URL=http://localhost:9000/
NEXT_PUBLIC_INTEGRATION_APP_UI_URL=http://localhost:3001/You can find these credentials in your Integration.app workspace settings.
- Start the development server:
npm run dev
# or
yarn dev- Open http://localhost:3000 in your browser.
/src/app- Next.js app router pages and API routes/users- Example implementation of external data import/api- Backend API routes for users and integration token management
/src/components- Reusable React components/src/lib- Utility functions and helpers/src/models- Data models and types/public- Static assets
The template implements a simple authentication mechanism using a randomly generated UUID as the customer ID. This simulates a real-world scenario where your application would have proper user authentication. The customer ID is used to:
- Identify the user/customer in the integration platform
- Generate integration tokens for external app connections
- Associate imported data with specific customers
The template includes a complete example of importing and managing users from an external application:
- User data model and TypeScript types
- API routes for user import and retrieval
- React components for displaying user data
- Integration with SWR for efficient data fetching
- Example of using the Integration.app client for data import
npm run dev- Start development server with hot reloadnpm run build- Build the application for productionnpm run start- Start the production servernpm run lint- Run ESLint to check code quality
MIT