Skip to content

tdaniel1925/valor-2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

119 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Valor Financial Specialists - Insurance Back Office Platform

A modern, unified insurance back office platform built for insurance agents, managers, and executives. This platform consolidates multiple third-party systems into a single, intuitive interface.

πŸš€ Tech Stack

  • Framework: Next.js 16.0.3 with App Router
  • Language: TypeScript
  • Styling: Tailwind CSS
  • Database: PostgreSQL (Supabase)
  • ORM: Prisma
  • Authentication: Supabase Auth
  • State Management: React Query (@tanstack/react-query)
  • Form Handling: React Hook Form + Zod validation

πŸ“‹ Features

Phase 1 - Completed βœ…

  • βœ… Next.js 16 project setup with TypeScript
  • βœ… Tailwind CSS configuration
  • βœ… Supabase authentication integration
  • βœ… Prisma ORM setup with comprehensive schema
  • βœ… Protected routes with middleware
  • βœ… Login/authentication pages
  • βœ… Basic dashboard layout
  • βœ… Running on port 3006

Database Schema Implemented

  • Users & Profiles: Complete user management with roles (Agent, Manager, Admin, Executive)
  • Organizations: Hierarchical organization structure
  • Contracts: Carrier contract management
  • Quotes: Multi-type insurance quotes (Term, Whole Life, Annuities, etc.)
  • Cases: Application and case tracking
  • Commissions: Commission tracking and splits
  • Notifications: User notification system
  • Audit Logs: Complete audit trail

Planned Features (From PRD)

  • πŸ”„ Production tracking and analytics
  • πŸ”„ Multi-carrier quoting engine (WinFlex, iPipeline, RateWatch)
  • πŸ”„ Electronic applications (iGo, Firelight)
  • πŸ”„ Case management system
  • πŸ”„ Contract request workflow
  • πŸ”„ Commission reporting
  • πŸ”„ Training and resources (GoCollab)
  • πŸ”„ Custom report builder
  • πŸ”„ Third-party integrations (3Mark, SuranceBay, etc.)

πŸ› οΈ Getting Started

Prerequisites

  • Node.js 18+ installed
  • PostgreSQL database (Supabase account)
  • Git

Installation

  1. Clone the repository (if using Git):
git clone <repository-url>
cd valor-2
  1. Install dependencies:
npm install
  1. Set up environment variables:

    The project uses both .env (for Prisma) and .env.local (for Next.js). Both files are already configured with your Supabase credentials.

  2. Run database migrations (when database credentials are correct):

npx prisma migrate dev
  1. Generate Prisma Client:
npx prisma generate
  1. Start the development server:
npm run dev

The application will be available at http://localhost:3006

πŸ“ Available Scripts

  • npm run dev - Start development server on port 3006
  • npm run build - Build for production
  • npm run start - Start production server on port 3006
  • npm run lint - Run ESLint
  • npm run type-check - Run TypeScript type checking
  • npx prisma studio - Open Prisma Studio (database GUI)
  • npx prisma migrate dev - Create new database migration
  • npx prisma generate - Generate Prisma Client

πŸ—‚οΈ Project Structure

valor-2/
β”œβ”€β”€ app/                      # Next.js App Router
β”‚   β”œβ”€β”€ auth/                # Authentication pages
β”‚   β”‚   β”œβ”€β”€ login/           # Login page
β”‚   β”‚   β”œβ”€β”€ callback/        # OAuth callback
β”‚   β”‚   └── signout/         # Sign out route
β”‚   β”œβ”€β”€ dashboard/           # Dashboard page
β”‚   β”œβ”€β”€ layout.tsx           # Root layout
β”‚   β”œβ”€β”€ page.tsx             # Home page
β”‚   └── globals.css          # Global styles
β”œβ”€β”€ components/              # Reusable React components
β”œβ”€β”€ lib/                     # Library code
β”‚   β”œβ”€β”€ auth/               # Authentication utilities
β”‚   β”‚   β”œβ”€β”€ supabase-client.ts  # Client-side Supabase
β”‚   β”‚   └── supabase-server.ts  # Server-side Supabase
β”‚   β”œβ”€β”€ db/                 # Database utilities
β”‚   β”‚   └── prisma.ts       # Prisma client instance
β”‚   β”œβ”€β”€ api/                # API client utilities
β”‚   β”œβ”€β”€ utils/              # Helper functions
β”‚   └── validations/        # Zod schemas
β”œβ”€β”€ prisma/                  # Prisma configuration
β”‚   └── schema.prisma        # Database schema
β”œβ”€β”€ types/                   # TypeScript type definitions
β”œβ”€β”€ hooks/                   # Custom React hooks
β”œβ”€β”€ middleware.ts            # Next.js middleware (auth protection)
β”œβ”€β”€ .env                     # Environment variables (Prisma)
β”œβ”€β”€ .env.local              # Environment variables (Next.js)
└── package.json            # Project dependencies

πŸ”’ Authentication

The platform uses Supabase Authentication with support for:

  • Email/password login
  • Google OAuth (configured)
  • Multi-factor authentication (MFA)
  • Session management with automatic refresh

Protected routes are automatically secured via Next.js middleware.

πŸ—„οΈ Database

Schema Overview

Core Entities:

  • User - User accounts with roles and status
  • UserProfile - Extended user information (licenses, preferences)
  • Organization - Hierarchical organization structure
  • OrganizationMember - User-organization relationships
  • Contract - Carrier contracts and commission levels
  • Quote - Insurance quotes (all product types)
  • Case - Applications and case management
  • CaseNote - Case communication and notes
  • Commission - Commission tracking and payments
  • Notification - User notifications
  • AuditLog - Complete audit trail

Running Migrations

Note: The initial migration requires valid database credentials. Update the .env file with correct Supabase credentials, then run:

npx prisma migrate dev --name initial_schema

πŸ” Environment Variables

Required environment variables are defined in .env.local:

# Supabase
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key

# Database (Prisma)
DATABASE_URL=your_database_url
DIRECT_URL=your_direct_database_url

# Optional Integrations
WINFLEX_API_KEY=
IPIPELINE_API_KEY=
RATEWATCH_API_KEY=
# ... (more integrations)

πŸ“š Key Technologies

Next.js 16

  • App Router with React Server Components
  • Server Actions for mutations
  • Middleware for authentication
  • Turbopack for faster builds

Prisma ORM

  • Type-safe database queries
  • Automatic migrations
  • Prisma Studio for database management

Supabase

  • PostgreSQL database
  • Authentication & user management
  • Real-time subscriptions (planned)
  • File storage (planned)

🎯 Development Roadmap

Based on the PRD, the development is organized into phases:

Phase 1: Foundation βœ… (COMPLETED)

  • Project setup
  • Authentication
  • Database schema
  • Basic dashboard

Phase 2: Core Features βœ… (COMPLETED)

  • User management
  • Production tracking
  • Analytics dashboard
  • Mobile-responsive UI

Phase 3: Business Operations βœ… (COMPLETED)

  • Contract management
  • Quoting engine
  • Application submission
  • Commission tracking

Phase 4: Integrations βœ… (COMPLETED)

  • βœ… RateWatch API integration (Annuity quotes)
  • βœ… WinFlex API integration (Life insurance quotes)
  • βœ… iPipeline API integration (Term life & e-applications)
  • βœ… Unified quote aggregation service
  • βœ… Webhook handler system
  • βœ… Integration health monitoring
  • βœ… API endpoints for all integrations

Phase 5: Reporting & Analytics

  • Custom report builder
  • Business intelligence
  • Performance metrics

Phase 6: Security & Testing

  • Security hardening
  • Performance optimization
  • Comprehensive testing

Phase 7: Deployment

  • Production deployment
  • Monitoring setup
  • Documentation

🀝 Contributing

This is a private project for Valor Financial Specialists. Development is managed by BotMakers, Inc.

πŸ“„ License

UNLICENSED - Private and proprietary

πŸ†˜ Support

For issues or questions, contact the development team.


Built with ❀️ by BotMakers, Inc.

Last Updated: November 2025

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors