A comprehensive referral management platform built with React, Node.js, and PostgreSQL. This application provides businesses and referrers with tools to manage leads, track earnings, resolve disputes, and monitor campaign performance.
- Enhanced Dashboard: Real-time analytics with performance charts and recent referrals
- Lead Management: Track referral status and earnings
- Earnings Tracking: View pending and paid earnings with withdrawal functionality
- Share Referrals: Generate QR codes and AI-powered message templates
- Dispute Resolution: Submit and track dispute cases
- Campaign Creation: Create and manage referral campaigns
- Lead Tracking: Monitor incoming referrals and conversions
- Payment Management: Process referrer payouts
- Performance Analytics: Track campaign ROI and conversion rates
- Admin Overview: Comprehensive dashboard with system analytics
- User Management: Monitor referrer and business accounts
- Dispute Management: Review and resolve disputes
- Financial Oversight: Track all payouts and earnings
- React 18 with TypeScript
- Tailwind CSS for styling
- Shadcn/ui component library
- TanStack Query for data fetching
- Recharts for analytics visualization
- Wouter for routing
- Node.js with Express
- TypeScript for type safety
- Drizzle ORM for database operations
- PostgreSQL for data persistence
- Passport.js for authentication
- PostgreSQL with comprehensive schema
- Real-time data synchronization
- Proper relationships and constraints
- Sample data initialization
The application uses a well-structured PostgreSQL database with the following entities:
- Users: Referrers, businesses, and administrators
- Leads: Customer referrals with tracking
- Campaigns: Business marketing campaigns
- Earnings: Referrer compensation tracking
- Disputes: Conflict resolution system
- Activities: System audit trail
- Node.js 18+
- PostgreSQL database
- Environment variables configured
- Clone the repository:
git clone https://github.com/jxspam/Networking-Earnings-App.git
cd Networking-Earnings-App- Install dependencies:
npm install- Set up environment variables:
# Database configuration
DATABASE_URL=your_postgresql_connection_string
PGHOST=your_db_host
PGPORT=your_db_port
PGUSER=your_db_user
PGPASSWORD=your_db_password
PGDATABASE=your_db_name- Initialize the database:
npm run db:push- Start the development server:
npm run devThe application will be available at http://localhost:5000
├── client/ # React frontend
│ ├── src/
│ │ ├── components/ # Reusable UI components
│ │ ├── pages/ # Application pages
│ │ ├── hooks/ # Custom React hooks
│ │ └── lib/ # Utility functions
├── server/ # Express backend
│ ├── index.ts # Server entry point
│ ├── routes.ts # API routes
│ ├── storage.ts # Database operations
│ └── db.ts # Database connection
├── shared/ # Shared types and schemas
│ └── schema.ts # Drizzle database schema
└── attached_assets/ # UI design references
POST /api/login- User authenticationPOST /api/register- User registrationPOST /api/logout- User logout
GET /api/users- Get all usersGET /api/user- Get current user
GET /api/leads- Get all leadsPOST /api/leads- Create new leadPUT /api/leads/:id- Update lead
GET /api/campaigns- Get all campaignsPOST /api/campaigns- Create campaign
GET /api/earnings- Get all earningsPUT /api/earnings/:id- Update earning status
GET /api/disputes- Get all disputesPOST /api/disputes- Create dispute
GET /api/analytics/overview- System analytics
- Professional blue gradient header design
- Responsive layout for all screen sizes
- Status badges with color-coded indicators
- Interactive charts and data visualizations
- Modern card-based layout
- Login/registration with role selection
- Session management
- Protected routes
- User role-based access control
- Real-time data fetching from PostgreSQL
- Comprehensive CRUD operations
- Data validation and error handling
- Automatic sample data initialization
- Lead conversion tracking
- Earnings calculation
- Campaign performance metrics
- Dispute resolution workflow
# Push schema changes
npm run db:push
# Generate migrations (if needed)
npx drizzle-kit generate
# View database studio
npx drizzle-kit studio- TypeScript for type safety
- ESLint configuration
- Consistent code formatting
- Component-based architecture
The application is designed to work with:
- Replit Deployments (recommended)
- Vercel for frontend hosting
- Railway or Supabase for PostgreSQL
- Docker containerization support
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is proprietary software developed for referral management use cases.
For technical support or feature requests, please open an issue in the GitHub repository.
Built with ❤️ using modern web technologies