A modern subscription management SaaS application built with React, TypeScript, and Vite.
- Authentication: Secure signup/login with JWT
- Customer Management: Track and manage your customers
- Subscription Tracking: Monitor active subscriptions and renewals
- Plan Management: Create and manage subscription plans
- Dashboard Analytics: Visual insights with charts and statistics
- Responsive Design: Mobile-first UI with Tailwind CSS
- Google Analytics: Integrated tracking with GA4
- React 18 - UI library
- TypeScript - Type safety
- Vite - Fast build tool
- React Router - Client-side routing
- Axios - HTTP client
- Tailwind CSS - Utility-first CSS
- Recharts - Data visualization
- React GA4 - Google Analytics integration
src/
├── api/ # API client & endpoints
├── auth/ # Authentication context & protected routes
├── components/ # Reusable UI components
├── pages/ # Page components
├── router/ # Route configuration
├── types/ # TypeScript type definitions
└── utils/ # Helper functions (analytics, etc.)
- Node.js 18+
- npm or yarn
- Clone the repository
git clone <repository-url>
cd subly-frontend- Install dependencies
npm install- Configure environment variables
Create a .env file in the root:
VITE_API_URL=http://localhost:5005
VITE_GA_ID=G-XXXXXXXXXX- Start development server
npm run devThe app will be available at http://localhost:5173
npm run buildnpm run preview- Connect your repository to Vercel
- Set environment variables:
VITE_API_URL- Your backend API URLVITE_GA_ID- Google Analytics ID
- Deploy
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production buildnpm run lint- Lint code with ESLint
The app uses JWT tokens stored in localStorage. Protected routes automatically redirect unauthenticated users to /login.
Tailwind CSS is configured with custom utilities. See tailwind.config.js for theme customization.
Google Analytics 4 is integrated to track:
- Page views on route changes
- Custom events (via
logEventutility)
All API calls go through src/api/axios.ts which:
- Automatically injects auth tokens
- Handles 401 redirects
- Shows rate limit alerts (429)
https://subly-silk.vercel.app/
https://github.com/PauSerranoHerraiz/subly-backend
Contributions are welcome! Please open an issue or PR.