✨ Finarva AI Backend is a robust and scalable platform built with NestJS, PostgreSQL, and Prisma, designed to empower microentrepreneurs with intelligent financial and operational tools.
- 🤖 AI Merchant Assistant: Utilizes LLMs, RAG, and Pinecone DB to offer dynamic, context-aware guidance that streamlines business operations, boosts topline growth, and helps merchants adhere to marketplace best practices.
- 💡 AI-Powered Financial Advisory: Delivers personalized investment and insurance advice, driven by OpenAI GPT-4 and Gemini Pro models.
- 📊 Expense Tracking & Management: Helps microentrepreneurs manage their business finances effectively.
- 🌊 Cash Flow Analysis & Forecasting: Provides insights into cash flow and predicts future financial health.
- 💰 Micro-loan & Credit Facilitation: Connects entrepreneurs with potential funding opportunities.
- 📦 Supply Chain Management: Helps businesses track their inventory and manage their supply chain.
- 📈 Business Analytics & Reporting: Offers a consolidated view of business performance.
- 🧠 Personalized, Multilingual Quizzes: Engages users with tailored quizzes in their native language.
- 👤 Client Management: Manages detailed client profiles and preferences.
- 📚 Smart Learning Recommendations: Recommends relevant content based on user behavior.
- 🌍 Multi-language Support: Serves 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 | PostgreSQL + Prisma |
AI Models | OpenAI GPT-4 / Gemini Pro |
Vector DB | Pinecone |
Documentation | Swagger + class-validator |
Deployment | Ready for Docker / CI-CD Pipelines |
📦 src
├── ai # AI Integration layer (Gemini/OpenAI)
├── auth # Authentication and authorization
├── cash-flow # Cash flow analysis and forecasting
├── clients # Client module (profile, preferences)
├── expenses # Expense tracking and management
├── insurance # Insurance suggestion logic
├── inventory # Inventory and supply chain management
├── investment # Investments & recommendations
├── learning # Content learning logic
├── loans # Micro-loan and credit facilitation
├── merchant-assistant# AI-powered merchant assistant
├── prisma # Prisma schema & database setup
├── quiz # Quiz suggestion, history & records
├── reporting # Business analytics and reporting
└── vector-store # Pinecone vector store integration
- Node.js v18+
- PostgreSQL (Local or Docker)
- Prisma CLI
- OpenAI / Gemini API Key
- Pinecone API Key
git clone https://github.com/your-username/finarva-ai-backend
cd finarva-ai-backend
npm install
Create a .env
file in the root with the following content:
DATABASE_URL="postgresql://user:password@localhost:5432/finarva"
OPENAI_API_KEY=sk-xxx
GEMINI_API_KEY=your-gemini-key
PINECONE_API_KEY=your-pinecone-key
npx prisma generate
npx prisma db push
npm run start:dev
Access the interactive Swagger documentation at:
http://localhost:3000/api
Explore all endpoints, test requests, and view schemas.
npm run lint # Run linter
npm run test # Run unit tests
This project is licensed under the MIT License.
We welcome contributions! Please follow the standard GitHub flow: fork, branch, commit, and pull request.
🚀 Empowering the next generation of microentrepreneurs through intelligence.