AI Flutter-based HR assistant with a Node/Express backend for leave balance, leave application, and HR policy chat. The app routes user messages to either HR APIs or policy Q&A using a shared intent router.
flowchart LR
UserQuery --> IntentRouter
IntentRouter --> LeaveBalanceAPI
IntentRouter --> LeaveApplicationAPI
IntentRouter --> ChatAPI
ChatAPI --> HRKnowledgeBase
ChatAPI --> OptionalLLM
LeaveBalanceAPI --> MongoOrMemory
LeaveApplicationAPI --> Response
HRKnowledgeBase --> Response
MongoOrMemory --> Response
Response --> FlutterUI
Endpoints:
GET /healthGET /metricsGET /leave-balance?employee_id=1001POST /leave-applicationGET /leave-applicationsPOST /chat
See DEMO.md for terminal demo steps, curl commands, sample request/response files, and the Flutter walkthrough.
Set API_KEY to require X-API-Key on HR data and chat endpoints.
Run:
cd hr-backend
npm install
npm test
npm startWith the backend running, use a second terminal:
npm run smokeThe backend uses MongoDB when MONGODB_URI is configured and falls back to
seeded in-memory demo data otherwise. GEMINI_API_KEY is optional; without it,
policy chat returns deterministic knowledge-base answers.
Docker:
cd hr-backend
cp .env.example .env
docker compose up --buildKubernetes manifests live in hr-backend/k8s/deployment.yaml and include
readiness/liveness probes, resource limits, and Secret-backed configuration.
For multi-replica deployments, configure MONGODB_URI so leave applications are
stored outside individual application pods.
Dockerfile, Docker Compose, and Kubernetes configuration are validated by static inspection/YAML parsing in this workspace. Runtime container and cluster validation remains a CI or cloud-environment step.
- Purpose: Flutter HR assistant with a Node backend for leave workflows and policy chat.
- Quickstart: run backend tests, start
npm startinhr-backend, then runnpm run smoke. - Demo path: use
DEMO.mdfor backend curl examples, sample request/response files, and the Flutter walkthrough. - Deployment status: backend tests and smoke tests pass; Flutter analyze/tests pass; backend Docker/Compose/Kubernetes config is present; backend Docker image builds are validated in CI; cloud deployment is pending.
- Remaining gaps: production HR data integration, identity provider, managed MongoDB, managed secrets, cloud deployment, and policy data governance.
- Portfolio index: https://github.com/Adityansh-Chand/ai-engineering-portfolio
Run:
flutter test
flutter analyze
flutter run -d chrome \
--dart-define=HR_API_BASE_URL=http://localhost:3000 \
--dart-define=HR_API_KEY=change-me- BLoC chat flow.
- Shared intent router for tests and production code.
- Backend-hosted chat generation.
- Configurable API base URL via
HR_API_BASE_URL. - Optional frontend API key propagation via
HR_API_KEY. - Backend request IDs, metrics, safe error responses, and leave-application persistence.
- GitHub Actions CI for backend tests/container build and Flutter analyze/tests.
- Local RAG fallback for policy answers.
- Unit tests for routing, model parsing, leave logic, RAG retrieval, and widgets.
MIT