Skip to content

Danservfinn/churnsaver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

177 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Churn Saver

License: MIT Node.js Version pnpm Version PostgreSQL Version

A comprehensive customer retention platform that helps businesses identify at-risk customers and automate recovery workflows to reduce churn.

πŸš€ Project Overview

Churn Saver is an intelligent customer retention platform designed to help businesses proactively identify customers at risk of churning and implement automated recovery strategies. Our platform combines real-time analytics, AI-powered insights, and automated workflows to maximize customer retention and lifetime value.

Key Features

  • Automated Churn Detection: AI-powered algorithms identify customers at risk of churning based on usage patterns and behavior
  • Intelligent Recovery Workflows: Automated multi-channel recovery sequences with personalized incentives
  • Real-time Analytics Dashboard: Comprehensive KPIs and insights into retention metrics
  • Flexible Incentive Management: Configurable incentive programs with budget tracking and ROI analysis
  • Seamless Integrations: Native integration with Whop API and other popular platforms
  • Enterprise-grade Security: Role-based access control, data encryption, and GDPR compliance

Value Proposition

  • Increase Retention Rate: Average recovery rate of >25% for at-risk customers
  • Maximize ROI: Average return on incentive investment of >300%
  • Reduce Time to Recovery: Average recovery time of <7 days from trigger to success
  • Scalable Solution: Built to handle enterprise-level customer volumes

πŸ› οΈ Technology Stack

Backend

  • Runtime: Node.js 18+
  • Framework: Next.js 14 (App Router)
  • Database: PostgreSQL 15+ with Prisma ORM
  • Cache: Redis 6+
  • Message Queue: Built-in (Redis-based)

Frontend

  • Framework: Next.js 14 with React 18
  • Styling: Tailwind CSS
  • UI Components: Radix UI + shadcn/ui
  • State Management: React hooks + Context

Infrastructure

  • Hosting: Vercel (serverless functions, edge network)
  • Database: Supabase (PostgreSQL with RLS)
  • Monitoring: Vercel Analytics, Supabase Dashboard
  • CI/CD: GitHub Actions + Vercel

External Integrations

  • Payment Processing: Whop API
  • Email Delivery: SMTP/Postmark
  • AI Services: OpenRouter (Gemini, GPT)
  • Analytics: Custom events + DataDog

🏁 Quick Start Guide

Prerequisites

Before you begin, ensure you have the following installed:

  • Node.js: Version 18.x or higher
  • pnpm: Version 9.15.9 or higher (package manager)
  • PostgreSQL: Version 14.x or higher
  • Git: Version 2.x or higher
  • GitHub account: For repository access and collaboration

Installation Steps

  1. Clone the Repository

    git clone https://github.com/your-org/churn-saver.git
    cd churn-saver
  2. Install Dependencies

    # Install dependencies using pnpm
    pnpm install
  3. Environment Setup

    # Copy the environment template
    cp .env.example .env.local
    
    # Edit .env.local with your configuration
    # You'll need to configure database connection, API keys, etc.
  4. Database Setup

    # Start PostgreSQL (using Docker recommended)
    docker-compose up -d postgres
    
    # Run database migrations
    pnpm run db:migrate
    
    # Seed development data (optional)
    pnpm run db:seed
  5. Start the Application

    # Start the development server
    pnpm dev
  6. Access the Application

    • Open your browser and navigate to http://localhost:3000
    • The application should now be running locally

πŸ“ Project Structure

Churn Saver follows a monorepo structure with clear separation of concerns:

churn-saver/
β”œβ”€β”€ apps/                   # Application packages
β”‚   └── web/               # Main Next.js web application
β”‚       β”œβ”€β”€ src/           # Source code
β”‚       β”œβ”€β”€ public/        # Static assets
β”‚       β”œβ”€β”€ docs/          # Application-specific documentation
β”‚       └── test/          # Test files
β”œβ”€β”€ docs/                  # Main documentation
β”‚   β”œβ”€β”€ api/              # API documentation
β”‚   β”œβ”€β”€ deployment/       # Deployment guides
β”‚   β”œβ”€β”€ features/         # Feature documentation
β”‚   β”œβ”€β”€ getting-started/  # Setup and installation guides
β”‚   └── security/         # Security documentation
β”œβ”€β”€ infra/                 # Infrastructure and configuration
β”‚   β”œβ”€β”€ migrations/       # Database migrations
β”‚   └── docs/            # Infrastructure documentation
β”œβ”€β”€ supabase/             # Supabase configuration
β”œβ”€β”€ tasks/                # Build and deployment tasks
β”œβ”€β”€ .github/              # GitHub workflows and templates
└── CONTRIBUTING.md       # Contribution guidelines

Key Directories

  • apps/web/: Main Next.js application with all source code
  • docs/: Comprehensive documentation covering all aspects of the platform
  • infra/migrations/: Database schema migrations
  • apps/web/src/server/services/: Business logic and service implementations
  • apps/web/src/components/: React components organized by feature
  • apps/web/src/lib/: Utility libraries and integrations

πŸ“š Documentation Links

We maintain comprehensive documentation to help you get started and make the most of Churn Saver:

πŸ“– Main Documentation

πŸ”Œ API Documentation

πŸš€ Development Guides

🚒 Deployment Documentation

🀝 Contributing Guidelines

We welcome contributions from the community! Please follow our guidelines to ensure a smooth contribution process:

How to Contribute

  1. Read our Contributing Guide - Detailed guidelines for contributors
  2. Fork the Repository - Create your own fork to work on
  3. Create a Feature Branch - Use descriptive branch names
  4. Make Your Changes - Follow our coding standards and conventions
  5. Submit a Pull Request - Include tests and documentation updates

Code of Conduct

Please read and follow our Code of Conduct to ensure a welcoming and inclusive environment for all contributors.

Pull Request Process

  • Ensure your code follows our coding standards
  • Include tests for new functionality
  • Update documentation as needed
  • Use conventional commit messages
  • Request appropriate code reviews

πŸ“„ License Information

This project is licensed under the MIT License. See the LICENSE file for details.

MIT License

Copyright (c) 2025 Churn Saver

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

πŸ† Key Metrics

Metric Target Description
Recovery Rate >25% Percentage of at-risk customers successfully retained
Time to Recovery <7 days Average days from trigger to successful recovery
ROI >300% Return on incentive investment
Uptime 99.9% System availability SLA
Response Time <200ms API response time (p95)

πŸ†˜ Support

Developer Support

  • Documentation: This site (comprehensive guides and API reference)
  • GitHub Issues: Bug reports and feature requests
  • GitHub Discussions: General questions and community support

Production Support

Business Support


Questions? Check our documentation or create a GitHub Discussion.

Found an issue? Please report it so we can improve the platform.

About

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors