✨ A powerful NestJS backend for the Gromo Platform, enabling AI-driven quiz generation, investment advice, insurance suggestions, and personalized learning for India's microentrepreneurs.
- 👤 Client Management – Manage detailed client profiles and preferences
- 🧠 AI-Generated Quiz Suggestions – Personalized quiz generation using Gemini/OpenAI
- 📚 Smart Learning Recommendations – Recommend relevant content based on behavior
- 📈 Investment Engine – Assist with small-cap, gold, equity investments & more
- 🛡️ Insurance Advisory – Intelligent suggestions based on client background
- 🌍 Multi-language Support – Serve localized content to clients in their native languages
- 🧩 Modular & Scalable – Built using a clean, service-repository pattern
- 🧪 Swagger API Docs – Auto-generated, interactive API documentation
Layer | Technology |
---|---|
Backend | NestJS |
Database | MongoDB + Prisma |
AI Models | OpenAI GPT-4 / Gemini Pro |
Documentation | Swagger + class-validator |
Deployment | Ready for Docker / CI-CD Pipelines |
📦 src
├── ai # AI Integration layer (Gemini/OpenAI)
├── client # Client module (profile, preferences)
├── quiz # Quiz suggestion, history & records
├── investment # Investments & recommendations
├── insurance # Insurance suggestion logic
├── learning # Content learning logic
├── common # DTOs, interceptors, validators
└── prisma # Prisma schema & database setup
- Node.js v18+
- MongoDB (Local or Atlas)
- Prisma CLI
- OpenAI / Gemini API Key
git clone https://github.com/techySPHINX/Finarva
cd Finarva
npm install
Create a .env
file in the root with the following content:
DATABASE_URL=mongodb://localhost:27017/gromo
OPENAI_API_KEY=sk-xxx
GEMINI_API_KEY=your-gemini-key
npx prisma generate
npm run start:dev
Access the interactive Swagger documentation at:
http://localhost:3000/api
Explore all endpoints, test requests, and view schemas.
- Uses client profile, quiz history, and language to generate:
- 📊 Quiz Suggestions
- 📚 Content Recommendations
- 🛡️ Investment & Insurance Advice
Easily switch between OpenAI and Gemini via
AiService
.
POST /ai/quiz-suggestions
{
"profile": {
"name": "Ravi",
"age": 32,
"occupation": "Street Vendor",
"interests": ["insurance", "savings"],
"investmentExperience": "beginner"
},
"quizHistory": [],
"language": "hi"
}
POST /ai/learning-suggestions
{
"profile": {
"age": 28,
"occupation": "Tailor",
"investmentExperience": "beginner"
},
"interests": ["mutual funds", "budgeting"]
}
npm run lint # Run linter
npm run test # Run unit tests
- Use
@nestjs/swagger
decorators to auto-generate docs - DTOs are validated with
class-validator
- Prisma handles MongoDB integration with schema enforcement
- Modular folders make future extension a breeze
This project is licensed under the MIT License.
We welcome contributions!
# Clone and create a new branch
git checkout -b feature/your-feature-name
# Make changes, then commit
git commit -m "feat: added investment insight AI"
# Push and open a PR 🚀
git push origin feature/your-feature-name
Made with ❤️ by Jagan Kumar Hotta
🚀 Powering the next generation of microentrepreneurs through intelligence.