A comprehensive in-app purchase and subscription management system with a modern React frontend and robust TypeScript backend.
Wildberry provides a complete solution for managing in-app purchases, subscriptions, and entitlements. It includes:
- Frontend: Modern React application with Material-UI
- Backend: TypeScript-based API with PostgreSQL
- Authentication: JWT-based auth with API key support
- Analytics: Built-in subscription and revenue analytics
- Audit Logs: Comprehensive activity tracking
wildberry/
├── front-end/ # React frontend application
│ ├── src/ # Source code
│ │ ├── components/ # Reusable UI components
│ │ │ ├── common/ # Shared components
│ │ │ ├── layout/ # Layout components
│ │ │ ├── forms/ # Form components
│ │ │ ├── tables/ # Table components
│ │ │ ├── charts/ # Chart components
│ │ │ └── modals/ # Modal components
│ │ ├── pages/ # Page components
│ │ │ ├── apps/ # App management
│ │ │ ├── auth/ # Authentication
│ │ │ ├── products/ # Product management
│ │ │ ├── offerings/# Offering management
│ │ │ ├── analytics/# Analytics dashboard
│ │ │ └── settings/ # User settings
│ │ ├── hooks/ # Custom React hooks
│ │
│ ├── public/ # Static assets
│ │ ├── images/ # Image assets
│ │ ├── fonts/ # Font files
│ │ └── icons/ # Icon assets
│ ├── package.json # Frontend dependencies
│ ├── tsconfig.json # TypeScript configuration
│ ├── .env.example # Environment template
│
│
├── back-end/ # TypeScript backend API
│ ├── src/ # Source code
│ │ ├── config/ # Configuration files
│ │ ├── modules/ # Feature modules
│ │ │ ├── apps/ # App management
│ │ │ ├── auth/ # Authentication
│ │ │ ├── products/ # Product management
│ │ │ ├── entitlements/# Entitlement handling
│ │ │ ├── offerings/ # Offering management
│ │ │ ├── api-keys/ # API key management
│ │ │ ├── analytics/ # Analytics processing
│ │ │ └── audit-logs/ # Audit logging
│ │ ├── middleware/# Express middleware
│ │ ├── models/ # Database models
│ │ ├── services/ # Business logic
│ │ ├── types/ # TypeScript type definitions
│ │ └── utils/ # Utility functions
│ ├── test/ # Test files
│ │ ├── unit/ # Unit tests
│ │ ├── integration/ # Integration tests
│ │ ├── fixtures/ # Test data
│ │ └── setup/ # Test configuration
│ ├── docs/ # Documentation
│ │ ├── api.md # API documentation
│ │ └── architecture.md # System architecture
│ ├── scripts/ # Build and utility scripts
│ ├── dist/ # Compiled code
│ ├── package.json # Dependencies
│ ├── tsconfig.json # TypeScript configuration
│ └── .env.example # Environment variables template
- Node.js >= 16
- PostgreSQL >= 15
- npm or yarn
Run the entire stack in development mode with hot-reloading:
docker compose -f docker-compose.dev.yaml up -d
This will start:
- Frontend: http://localhost:3001
- Backend API: http://localhost:3000
- pgAdmin: http://localhost:5050
- PostgreSQL: localhost:5432
For production deployment:
docker compose up -d
Start specific services:
# Start only backend services
docker compose up -d backend postgres
# Start only frontend
docker compose up -d frontend
# Start database management
docker compose up -d postgres pgadmin
View logs:
# All services
docker compose logs -f
# Specific service
docker compose logs -f frontend
docker compose logs -f backend
Rebuild services:
# Rebuild all
docker compose build
# Rebuild specific service
docker compose build frontend
docker compose build backend
Stop services:
# Stop all
docker compose down
# Stop and remove volumes
docker compose down -v
- Navigate to the backend directory:
cd back-end
- Install dependencies:
npm install
- Set up environment variables:
cp .env.example .env
# Edit .env with your configuration
- Start the development server:
# Using Docker (recommended)
docker compose -f docker-compose.dev.yaml up -d
# Without Docker
npm run dev
The backend API will be available at:
- API: http://localhost:3000
- pgAdmin: http://localhost:5050 (when using Docker)
- API Documentation: http://localhost:3000/docs
- Navigate to the frontend directory:
cd front-end
- Install dependencies:
npm install
- Set up environment variables:
cp .env.example .env
- Start the development server:
npm start
The frontend will be available at http://localhost:3001
-
Authentication & Authorization
- JWT-based authentication
- API key management
- Role-based access control
-
App Management
- Multiple app support
- Platform-specific configurations
- Bundle ID validation
-
Product Management
- Subscription and one-time purchase support
- Price and currency handling
- Product lifecycle management
-
Entitlements
- Feature-based access control
- Flexible entitlement mapping
- Inheritance and grouping
-
Offerings
- Product bundling
- Dynamic offering configuration
- A/B testing support
-
Analytics
- Revenue tracking
- Subscription metrics
- User behavior analytics
-
Audit Logging
- Comprehensive activity tracking
- Security event logging
- Change history
-
Modern UI/UX
- Material-UI components
- Responsive design
- Dark mode support
-
Dashboard
- Revenue metrics
- Subscription analytics
- User activity tracking
-
Management Interfaces
- Product management
- Subscription handling
- User management
-
Mobile-First Design
- Responsive layouts
- Touch-friendly interfaces
- Adaptive components
Backend:
cd back-end
npm test
Frontend:
cd front-end
npm test
Please read our Contributing Guidelines before submitting pull requests.
Using Docker:
cd back-end
docker compose up -d
Manual deployment:
cd back-end
npm run build
npm start
cd front-end
npm run build
# Deploy the build directory to your hosting service
MIT License - see LICENSE file for details