- 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 dev
The 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!