A starter template for building AI DIAL applications with modern web technologies.
- Next.js 15 - React framework with App Router
- Nx - Smart monorepo build system
- Tailwind CSS - Utility-first CSS framework
- @epam/ai-dial-ui-kit - AI DIAL UI components
- NextAuth.js - Authentication for Next.js
- TypeScript - Type-safe JavaScript
- Vitest - Fast unit testing framework
- Node.js >= 20
- npm or pnpm
-
Clone the repository:
git clone https://github.com/your-org/ai-dial-frontend-template.git cd ai-dial-frontend-template -
Install dependencies:
npm install
-
Set up environment variables:
cp apps/ai-dial-app/.env.template apps/ai-dial-app/.env.local
Edit
.env.localwith your configuration:NEXTAUTH_URL=http://localhost:3000 NEXTAUTH_SECRET=your-secret-key # Generate with: openssl rand -base64 32 -
Start the development server:
npm run dev
-
Open http://localhost:3000 in your browser.
ai-dial-frontend-template/
├── apps/
│ └── ai-dial-app/ # Next.js application
│ ├── src/
│ │ ├── app/ # App Router pages and layouts
│ │ │ ├── api/ # API routes
│ │ │ ├── layout.tsx # Root layout
│ │ │ └── page.tsx # Home page
│ │ └── utils/ # Utility functions
│ │ └── auth/ # Authentication utilities
│ ├── tailwind.config.js
│ ├── next.config.js
│ └── tsconfig.json
├── nx.json # Nx configuration
├── package.json
├── tsconfig.base.json
└── eslint.config.mjs
| Command | Description |
|---|---|
npm run dev |
Start development server |
npm run build |
Build for production |
npm run start |
Start production server |
npm run lint |
Run ESLint |
npm run test |
Run tests |
This template includes NextAuth.js with pre-configured support for:
- GitHub OAuth
- Google OAuth
- Azure AD
- Keycloak
To enable a provider, add the required environment variables to .env.local.
-
Create a GitHub OAuth App at https://github.com/settings/developers
-
Add to
.env.local:AUTH_GITHUB_CLIENT_ID=your-client-id AUTH_GITHUB_SECRET=your-client-secret
Create new pages in apps/ai-dial-app/src/app/:
// apps/ai-dial-app/src/app/about/page.tsx
export default function AboutPage() {
return <h1>About</h1>;
}import { DialPrimaryButton, DialNeutralButton } from '@epam/ai-dial-ui-kit';
export default function MyComponent() {
return (
<div>
<DialPrimaryButton label="Primary Action" onClick={() => {}} />
<DialNeutralButton label="Secondary Action" onClick={() => {}} />
</div>
);
}The template includes a pre-configured Tailwind setup with AI DIAL design tokens:
<div className="bg-layer-1 text-primary p-4 rounded-lg border border-secondary">
<h2 className="text-accent-primary">Styled Content</h2>
</div>- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the Apache License 2.0.