Skip to content

Finarva is a robust backend platform built with NestJS, designed to empower financial agents in delivering personalized and scalable financial services to microentrepreneurs. The system offers secure user authentication, comprehensive client management, and the creation of tailored investment plans—including options such as small-cap and large-cap

License

Notifications You must be signed in to change notification settings

techySPHINX/Finarva

Repository files navigation

🚀 Finarva AI Backend: The Financial OS for Microentrepreneurs

NestJS PostgreSQL Prisma OpenAI Gemini Swagger

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.


🌟 Core Features

  • 🤖 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.

🏗️ Tech Stack

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

📂 Folder Structure

📦 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

🚀 Getting Started

✅ Prerequisites

  • Node.js v18+
  • PostgreSQL (Local or Docker)
  • Prisma CLI
  • OpenAI / Gemini API Key
  • Pinecone API Key

📦 Installation

git clone https://github.com/your-username/finarva-ai-backend
cd finarva-ai-backend
npm install

⚙️ Setup .env File

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

🔁 Prisma Setup

npx prisma generate
npx prisma db push

▶️ Run Dev Server

npm run start:dev

📖 API Documentation

Access the interactive Swagger documentation at:

http://localhost:3000/api

Explore all endpoints, test requests, and view schemas.


🧪 Testing & Linting

npm run lint        # Run linter
npm run test        # Run unit tests

📜 License

This project is licensed under the MIT License.


🤝 Contributing

We welcome contributions! Please follow the standard GitHub flow: fork, branch, commit, and pull request.


🚀 Empowering the next generation of microentrepreneurs through intelligence.

About

Finarva is a robust backend platform built with NestJS, designed to empower financial agents in delivering personalized and scalable financial services to microentrepreneurs. The system offers secure user authentication, comprehensive client management, and the creation of tailored investment plans—including options such as small-cap and large-cap

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages