- Create and configure affiliate campaigns
- Real-time activation/deactivation
- Customizable destination URLs
- Live performance tracking
- Add and organize your partners
- Automatic tracking link generation
- Custom short links for each affiliate
- Automatic commission calculation
- Real-time dashboard with key metrics
- Track clicks, conversions, and revenue
- Conversion rates by campaign and affiliate
- Complete performance history
- Automatic short link generation
- Conditional redirection (active/paused campaigns)
- Precise click and conversion tracking
- Fraud protection
- Node.js 18+ and npm
- Firebase account for database
# 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 devThe application will be accessible at http://localhost:8080
- Frontend: React 18 + TypeScript + Vite
- Styling: Tailwind CSS + shadcn/ui
- Backend: Firebase (Firestore + Auth)
- State Management: TanStack Query
- Routing: React Router Dom
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
RefSpring uses an advanced tracking system:
- Link Generation: Each affiliate receives a unique link
- Smart Redirection: Clicks are tracked before redirection
- Paused Campaigns: Display information page instead of redirecting
- Real-time Analytics: Instant metrics updates
https://your-domain.com/s/ABC123
│ └── Unique short code
└── Automatic redirection to campaign URL
- Responsive design with smooth animations
- Real-time metrics (clicks, conversions, revenue)
- Intuitive management of campaigns and affiliates
- Consistent theme with Tailwind CSS
- One-click link copying
- Toast notifications for actions
- Expandable/collapsible cards
- Visual status badges
- Create a Firebase project
- Enable Firestore and Authentication
- Configure security rules
- Add your keys to
.env
campaigns/
├── {campaignId}/
│ ├── name: string
│ ├── isActive: boolean
│ ├── targetUrl: string
│ └── ...
affiliates/
├── {affiliateId}/
│ ├── name: string
│ ├── email: string
│ └── ...
clicks/
├── {clickId}/
│ ├── campaignId: string
│ ├── affiliateId: string
│ ├── timestamp: Date
│ └── ...
# Production build
npm run build
# Deploy to your preferred platform
# (Vercel, Netlify, Firebase Hosting, etc.)This project is licensed under the MIT License. See the LICENSE file for more details.
Contributions are welcome! Please see our CONTRIBUTING.md guide.
For information about reporting vulnerabilities, see SECURITY.md.
- 📧 Email: support@refspring.com
- 🐛 Issues: GitHub Issues
- 💬 Discord: Join the community
Made with ❤️ by the RefSpring team
Revolutionize your affiliate marketing today!