Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

antho8101/RefSpring

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

1,020 Commits

🌟 RefSpring

Next-generation affiliate platform

Manage your affiliate campaigns with style and efficiency

React TypeScript Tailwind Firebase
License Stars Issues Last Commit

✨ Features

🎯 Campaign Management

  • Create and configure affiliate campaigns
  • Real-time activation/deactivation
  • Customizable destination URLs
  • Live performance tracking

πŸ‘₯ Affiliate Management

  • Add and organize your partners
  • Automatic tracking link generation
  • Custom short links for each affiliate
  • Automatic commission calculation

πŸ“Š Advanced Analytics

  • Real-time dashboard with key metrics
  • Track clicks, conversions, and revenue
  • Conversion rates by campaign and affiliate
  • Complete performance history

πŸ”— Smart Links

  • Automatic short link generation
  • Conditional redirection (active/paused campaigns)
  • Precise click and conversion tracking
  • Fraud protection

πŸš€ Quick Start

Prerequisites

  • Node.js 18+ and npm
  • Firebase account for database

Installation

# Clone the repository
git clone https://github.com/your-username/refspring.git
cd refspring
# Install dependencies
npm install
# Configure Firebase
# Create a .env file with your Firebase keys based on .env.example:
cp .env.example .env
# Then edit .env with your values
# Start development server
npm run dev

The application will be accessible at http://localhost:8080


πŸ—οΈ Architecture

Tech Stack

  • Frontend: React 18 + TypeScript + Vite
  • Styling: Tailwind CSS + shadcn/ui
  • Backend: Firebase (Firestore + Auth)
  • State Management: TanStack Query
  • Routing: React Router Dom

Project Structure

src/
β”œβ”€β”€ components/ # Reusable UI components
β”‚ β”œβ”€β”€ ui/ # shadcn/ui components
β”‚ β”œβ”€β”€ Dashboard.tsx # Main dashboard page
β”‚ └── Campaign*.tsx # Campaign management
β”œβ”€β”€ hooks/ # Custom hooks
β”‚ β”œβ”€β”€ useAuth.tsx # Authentication
β”‚ β”œβ”€β”€ useCampaigns.ts # Campaign management
β”‚ └── useTracking.ts # Link tracking
β”œβ”€β”€ pages/ # Application pages
β”‚ β”œβ”€β”€ TrackingPage.tsx # Link redirection
β”‚ └── ShortLinkPage.tsx # Short links
β”œβ”€β”€ lib/ # Configuration and utilities
└── types/ # TypeScript definitions

πŸ“ˆ How Tracking Works

RefSpring uses an advanced tracking system:

  1. Link Generation: Each affiliate receives a unique link
  2. Smart Redirection: Clicks are tracked before redirection
  3. Paused Campaigns: Display information page instead of redirecting
  4. Real-time Analytics: Instant metrics updates

Example Generated Link

https://your-domain.com/s/ABC123
β”‚ └── Unique short code
└── Automatic redirection to campaign URL

🎨 User Interface

Modern Dashboard

  • Responsive design with smooth animations
  • Real-time metrics (clicks, conversions, revenue)
  • Intuitive management of campaigns and affiliates
  • Consistent theme with Tailwind CSS

UX Features

  • One-click link copying
  • Toast notifications for actions
  • Expandable/collapsible cards
  • Visual status badges

πŸ”§ Firebase Configuration

  1. Create a Firebase project
  2. Enable Firestore and Authentication
  3. Configure security rules
  4. Add your keys to .env

Firestore Structure

campaigns/
β”œβ”€β”€ {campaignId}/
β”‚ β”œβ”€β”€ name: string
β”‚ β”œβ”€β”€ isActive: boolean
β”‚ β”œβ”€β”€ targetUrl: string
β”‚ └── ...
affiliates/
β”œβ”€β”€ {affiliateId}/
β”‚ β”œβ”€β”€ name: string
β”‚ β”œβ”€β”€ email: string
β”‚ └── ...
clicks/
β”œβ”€β”€ {clickId}/
β”‚ β”œβ”€β”€ campaignId: string
β”‚ β”œβ”€β”€ affiliateId: string
β”‚ β”œβ”€β”€ timestamp: Date
β”‚ └── ...

πŸš€ Deployment

Manual Deployment

# Production build
npm run build
# Deploy to your preferred platform
# (Vercel, Netlify, Firebase Hosting, etc.)

πŸ“ License

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


πŸ‘¨β€πŸ’» Contributing

Contributions are welcome! Please see our CONTRIBUTING.md guide.


πŸ”’ Security

For information about reporting vulnerabilities, see SECURITY.md.


πŸ“ž Support


Made with ❀️ by the RefSpring team

Revolutionize your affiliate marketing today!

About

πŸš€ Modern affiliate marketing platform built with React & TypeScript. Track campaigns, manage affiliates, and monitor performance with real-time analytics.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /