Skip to content

Demilade01/Moneta-AI

Repository files navigation

Moneta AI

Moneta AI

Your Intelligent Pricing Analyst

Make confident, data-driven pricing decisions with AI-powered analysis, simulations, and explainable recommendations. No black boxes. Just clarity.

🌐 Live Demo: https://moneta-ai-gamma.vercel.app/


Moneta AI is an intelligent pricing analyst designed to help businesses make confident, data-driven pricing decisions. The system ingests internal pricing, cost, and sales data alongside external market and competitor signals, then analyzes historical patterns to understand how price changes impact demand, revenue, and margins.

✨ Key Features

  • πŸ€– Multi-Agent AI System - 4 specialized AI agents (Data Analyst, Market Analyst, Pricing Strategist, Recommendation Agent) work together using LangGraph
  • 🧠 GPT-4 Powered - Advanced reasoning with OpenAI GPT-4o for intelligent pricing decisions
  • πŸ“Š Pricing Analytics Engine - Price elasticity, competitor analysis, revenue trends, and margin optimization
  • πŸ’‘ Smart Recommendations - AI-generated pricing suggestions with confidence scores, impact projections, and clear reasoning
  • πŸ“ˆ Interactive Dashboards - Real-time visualizations with Recharts for revenue trends, category performance, and competitor comparison
  • πŸ“€ Data Upload System - Drag-and-drop CSV/Excel files with automatic column mapping and validation
  • πŸ” Explainable AI - Full transparency with detailed reasoning for every recommendation
  • πŸ›‘οΈ Full Auditability - Every decision logged and traceable
  • πŸ‘€ User Profile Management - Avatar upload, profile settings, and password management
  • πŸ” Secure Authentication - JWT-based auth with HTTP-only cookies and protected routes

πŸ› οΈ Tech Stack

  • Framework: Next.js 16 (App Router) + React 19
  • Styling: TailwindCSS 4, shadcn/ui, Radix UI
  • Animations: Framer Motion + GSAP
  • AI/Agents: LangChain, LangGraph, OpenAI
  • API: tRPC for type-safe APIs
  • Database: Prisma ORM + PostgreSQL
  • Data Visualization: Recharts + TanStack Table
  • State Management: TanStack Query
  • Forms: React Hook Form + Zod validation
  • Date Handling: date-fns
  • File Parsing: PapaParse (CSV) + xlsx (Excel)
  • Notifications: Sonner (toast notifications)
  • Deployment: Vercel

Getting Started

Prerequisites

  • Node.js 20+
  • npm/yarn/pnpm

Installation

# Install dependencies
npm install

# Set up environment variables
cp .env.example .env

# Add required environment variables to .env:
# DATABASE_URL=your-postgres-connection-string
# JWT_SECRET=your-jwt-secret-key
# OPENAI_API_KEY=your-openai-api-key

# Initialize database
npm run db:generate    # Generate Prisma client
npm run db:push        # Push schema to database (dev)
# OR
npm run db:migrate     # Create migration (production)

# Run development server
npm run dev

Open http://localhost:3000 to see the application.

Environment Variables

Variable Description Required
DATABASE_URL PostgreSQL connection string βœ… Yes
JWT_SECRET Secret key for JWT tokens βœ… Yes
OPENAI_API_KEY OpenAI API key for AI agents βœ… Yes

Get OpenAI API Key: https://platform.openai.com/api-keys

AI Setup

See AI_SETUP.md for detailed information about:

  • Multi-agent architecture
  • How the AI workflow works
  • Customization options
  • Cost estimation
  • Troubleshooting

πŸ—„οΈ Database Schema

The application uses PostgreSQL with Prisma ORM. The schema includes 11 models:

Core Models

  • User - User accounts with authentication, roles, and profile (including avatar)
  • Product - Product catalog with SKU, pricing, and categorization
  • PriceHistory - Historical price changes tracking
  • SalesData - Sales performance metrics by time period
  • CompetitorData - Competitor pricing and market signals

AI & Analytics Models

  • Recommendation - AI-generated pricing recommendations with reasoning, confidence scores, and impact projections
  • Simulation - Price simulation scenarios (what-if analysis)
  • SimulationItem - Products included in a simulation
  • SimulationResult - Projected outcomes from simulations
  • PricingInsight - Automated insights and alerts

Data Management

  • DataUpload - File upload tracking and processing status

All models include proper indexing, relationships, and cascade deletion rules. See prisma/schema.prisma for full details.

πŸ“ Project Structure

moneta-ai/
β”œβ”€β”€ app/                           # Next.js App Router
β”‚   β”œβ”€β”€ actions/                   # Server actions
β”‚   β”‚   └── auth.ts               # Authentication actions
β”‚   β”œβ”€β”€ api/                       # API routes
β”‚   β”‚   └── trpc/                 # tRPC API endpoint
β”‚   β”‚       └── [trpc]/
β”‚   β”‚           └── route.ts
β”‚   β”œβ”€β”€ auth/                      # Authentication pages
β”‚   β”‚   β”œβ”€β”€ login/                # Login page
β”‚   β”‚   └── signup/               # Sign up page
β”‚   β”œβ”€β”€ dashboard/                 # Dashboard pages
β”‚   β”‚   β”œβ”€β”€ analytics/           # Analytics page
β”‚   β”‚   β”œβ”€β”€ data/                 # Data upload page
β”‚   β”‚   β”œβ”€β”€ pricing/              # Pricing analysis page
β”‚   β”‚   β”œβ”€β”€ recommendations/      # AI recommendations page
β”‚   β”‚   β”œβ”€β”€ settings/             # User settings page
β”‚   β”‚   β”œβ”€β”€ simulations/          # Price simulations page
β”‚   β”‚   β”œβ”€β”€ layout.tsx            # Dashboard layout
β”‚   β”‚   └── page.tsx              # Dashboard overview
β”‚   β”œβ”€β”€ layout.tsx                # Root layout
β”‚   β”œβ”€β”€ page.tsx                  # Landing page
β”‚   └── globals.css                # Global styles
β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ charts/                    # Chart components
β”‚   β”‚   β”œβ”€β”€ category-breakdown-chart.tsx
β”‚   β”‚   β”œβ”€β”€ competitor-comparison-chart.tsx
β”‚   β”‚   └── revenue-trend-chart.tsx
β”‚   β”œβ”€β”€ dashboard/                 # Dashboard components
β”‚   β”‚   β”œβ”€β”€ header.tsx            # Dashboard header
β”‚   β”‚   └── sidebar.tsx           # Dashboard sidebar
β”‚   β”œβ”€β”€ providers/                 # React providers
β”‚   β”‚   └── trpc-provider.tsx     # tRPC provider
β”‚   β”œβ”€β”€ sections/                  # Landing page sections
β”‚   β”‚   β”œβ”€β”€ navbar.tsx
β”‚   β”‚   β”œβ”€β”€ hero.tsx
β”‚   β”‚   β”œβ”€β”€ features.tsx
β”‚   β”‚   β”œβ”€β”€ how-it-works.tsx
β”‚   β”‚   β”œβ”€β”€ analytics-preview.tsx
β”‚   β”‚   β”œβ”€β”€ trust.tsx
β”‚   β”‚   β”œβ”€β”€ cta.tsx
β”‚   β”‚   β”œβ”€β”€ footer.tsx
β”‚   β”‚   └── animated-background.tsx
β”‚   └── ui/                        # shadcn UI components
β”œβ”€β”€ lib/
β”‚   β”œβ”€β”€ client/                    # Client-side utilities
β”‚   β”‚   β”œβ”€β”€ auth.tsx              # Auth hooks and utilities
β”‚   β”‚   β”œβ”€β”€ trpc.ts               # tRPC client setup
β”‚   β”‚   └── trpc-usage-example.tsx
β”‚   β”œβ”€β”€ generated/                 # Generated code
β”‚   β”‚   └── prisma/               # Generated Prisma client
β”‚   β”œβ”€β”€ server/                    # Server-side code
β”‚   β”‚   β”œβ”€β”€ ai/                   # AI agent system
β”‚   β”‚   β”‚   β”œβ”€β”€ openai-client.ts
β”‚   β”‚   β”‚   β”œβ”€β”€ pricing-agent.ts  # Multi-agent pricing system
β”‚   β”‚   β”‚   └── prompts.ts        # AI prompts
β”‚   β”‚   β”œβ”€β”€ routers/              # tRPC routers
β”‚   β”‚   β”‚   β”œβ”€β”€ _app.ts          # Main app router
β”‚   β”‚   β”‚   β”œβ”€β”€ analytics.ts     # Analytics router
β”‚   β”‚   β”‚   β”œβ”€β”€ auth.ts          # Authentication router
β”‚   β”‚   β”‚   β”œβ”€β”€ products.ts      # Products router
β”‚   β”‚   β”‚   β”œβ”€β”€ recommendations.ts # Recommendations router
β”‚   β”‚   β”‚   β”œβ”€β”€ simulations.ts   # Simulations router
β”‚   β”‚   β”‚   └── upload.ts        # File upload router
β”‚   β”‚   β”œβ”€β”€ utils/                # Server utilities
β”‚   β”‚   β”‚   β”œβ”€β”€ analytics.ts     # Analytics calculations
β”‚   β”‚   β”‚   β”œβ”€β”€ data-validator.ts # Data validation
β”‚   β”‚   β”‚   └── file-parser.ts   # CSV/Excel parsing
β”‚   β”‚   β”œβ”€β”€ auth.ts               # Auth utilities
β”‚   β”‚   β”œβ”€β”€ context.ts            # tRPC context
β”‚   β”‚   └── trpc.ts               # tRPC setup
β”‚   β”œβ”€β”€ prisma.ts                  # Prisma client instance
β”‚   └── utils.ts                   # Shared utilities
β”œβ”€β”€ prisma/
β”‚   └── schema.prisma              # Database schema
β”œβ”€β”€ public/                        # Static assets
β”œβ”€β”€ sample-data/                   # Sample CSV files for testing
β”‚   β”œβ”€β”€ competitor-data.csv
β”‚   β”œβ”€β”€ products.csv
β”‚   └── sales-data.csv
β”œβ”€β”€ middleware.ts                  # Next.js middleware
β”œβ”€β”€ components.json                # shadcn/ui config
└── package.json                   # Dependencies

🎨 Design System

Moneta AI uses a premium glassmorphism design language:

  • Pure Black & White color palette
  • Semi-transparent glass cards with backdrop blur
  • Subtle animations (slow, smooth, intentional)
  • Animated backgrounds with gentle glows
  • Modern fintech aesthetic - calm, confident, premium

Development

# Run dev server
npm run dev

# Build for production
npm run build

# Start production server
npm start

# Lint code
npm run lint

# Database commands
npm run db:generate    # Generate Prisma client
npm run db:push        # Push schema changes (dev)
npm run db:migrate     # Create migration (production)
npm run db:studio      # Open Prisma Studio (database GUI)

πŸ—ΊοΈ Roadmap

βœ… Phase 1: UI & Design (Complete)

  • Premium glassmorphism design system
  • Landing page with 6 sections
  • Responsive mobile navigation
  • Authentication pages (login/signup)
  • Dashboard layout with sidebar
  • All priority 1 dashboard pages

βœ… Phase 2: Backend & Database (Complete)

  • Prisma 7 schema with 11 models
  • PostgreSQL database setup
  • tRPC API layer with 6 routers
  • JWT authentication with HTTP-only cookies
  • Protected routes with middleware

βœ… Phase 3: Data Management (Complete)

  • File upload system (CSV/Excel)
  • Automatic column mapping
  • Data validation with Zod
  • Upload history tracking
  • Database import functionality

βœ… Phase 4: Analytics Engine (Complete)

  • Price elasticity calculation
  • Competitor price analysis
  • Revenue & margin analytics
  • Time-series trend analysis
  • Product performance metrics
  • Interactive charts (Recharts)

βœ… Phase 5: AI Agent System (Complete)

  • Multi-agent workflow with LangGraph
  • 4 specialized AI agents (Data, Market, Pricing, Recommendation)
  • OpenAI GPT-4o integration
  • Structured output with function calling
  • Confidence scoring & impact projections
  • AI recommendations page with actions
  • Recommendation tracking & implementation

βœ… Phase 6: User Experience Enhancements (Complete)

  • Enhanced error handling with field-specific messages
  • Password visibility toggles
  • Email autocomplete hints
  • Improved loading states
  • User avatar upload functionality
  • Profile settings with real-time updates
  • Password change functionality

πŸ“‹ Phase 7: Advanced Features (Next)

  • Batch recommendation generation
  • Streaming AI responses for real-time feedback
  • Custom business rules & constraints
  • A/B testing integration
  • Learning from past recommendation outcomes
  • Multi-product optimization
  • Seasonal adjustment factors
  • Team collaboration features
  • API access & webhooks
  • Advanced simulation scenarios
  • Multi-tenant support
  • Integrations (Stripe, Salesforce, etc.)

πŸ“„ Metadata

{
  title: "Moneta AI | Intelligent Pricing Analyst",
  description: "Make confident, data-driven pricing decisions with AI-powered analysis, simulations, and explainable recommendations."
}

🀝 Contributing

This is a private project. For any inquiries, please contact the development team.

πŸ“ License

Private - All Rights Reserved


Built with ❀️ using Next.js, React, and cutting-edge AI technology

About

Moneta AI is an intelligent pricing analyst designed to help businesses make confident, data-driven pricing decisions. The system ingests internal pricing, cost, and sales data alongside external market and competitor signals, then analyzes historical patterns to understand how price changes impact demand, revenue, and margins.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages