This is a thin frontend UI for Kaapi backend — a platform that acts as a middleware layer, enabling platforms like Avni, Glific, and Dalgo to seamlessly integrate AI functionality.
- Pre-requisite
- Clone Frontend Repo
- Installation
- Available Scripts
- Pre-commit Hooks
- Deploying Release on EC2 with CD
- Learn More
asdf plugin-add nodejs
asdf installgit clone git@github.com:ProjectTech4DevAI/kaapi-frontend.gitYou need to set up the Kaapi backend service and follow the instructions there.
💡 Note: Ensure the backend is running and accessible before starting the frontend.
You need to set up the Kaapi Guardrails service and follow the instructions there.
💡 Note: The Guardrails service must be running and accessible whenever you use the Guardrails module in the frontend.
-
Copy
.env.exampleto.envin the project root:cp .env.example .env
-
Do not modify
.envunless absolutely required. -
Install dependencies:
npm install # or yarn
npm run dev
# or
yarn devVisit http://localhost:3000 to open the app.
npm install # Install dependencies (also sets up pre-commit hooks via husky)
npm run dev # Run app in development mode
npm run build # Create optimized production build
npm run start # Start the production server
npm run lint # Run ESLint on the entire project
npm test # Run tests
npm run test:coverage # Run tests with coverage reportThis project uses Husky and lint-staged to enforce code quality before every commit.
- ESLint is executed on all staged
*.ts,*.tsx,*.js, and*.jsxfiles. Any lint errors must be fixed before the commit is accepted.
Hooks are installed automatically when you run:
npm installThis works because the prepare script in package.json runs husky after every install.
If you need to bypass the hook in exceptional cases:
git commit --no-verify -m "your message"Deployments are automated via a GitHub Actions CD pipeline that SSHes into the EC2 instance, pulls the latest code, builds, and restarts the server.
| Trigger | Environment |
|---|---|
Push to main |
Staging |
Tag matching v*.*.* (e.g. v1.0.0) |
Production |
Staging — on every push to main, the pipeline automatically:
- SSHes into the EC2 instance
- Runs
git pullto fetch the latest code - Runs
npm run buildto create an optimized production build - Restarts the pm2 server to apply the new build
Production — on every version tag (e.g. v1.0.0, v2.1.0), the pipeline automatically:
- SSHes into the EC2 instance
- Runs
git fetch --tagsand checks out the tag - Runs
npm run buildto create an optimized production build - Restarts the pm2 server to apply the new build
- 🌐 Kaapi
- 📄 One Pager
- 📄 Next.js Documentation - learn about Next.js features and API.
- 📄 Learn Next.js - an interactive Next.js tutorial.
- 💬 Discord