Appearance
Wellysa Partners Portal
A partner management dashboard for Wellysa, built with React and Firebase, enabling partners to manage discount codes, track performance metrics, and access product information.
Tech Stack
Frontend
- React 19.2 with TypeScript
- Vite 7.2 - build tool and dev server
- TailwindCSS 4.1 - utility-first CSS framework
- React Router 7.13 - client-side routing
- i18next + react-i18next - internationalization support
- @tabler/icons-react - icon library
- React Compiler (Babel plugin) - enabled for optimized rendering
Backend
- Firebase 12.8 - authentication, Firestore database, and Cloud Functions
- Firebase Functions (TypeScript) - serverless API endpoints located in
functions/orap/
UI Components
Custom component library including:
- Charts:
DonutChart,LineChart - Forms:
FormField,Input,Label,Button - Layout:
AdminLayout,Header,Sidebar - Utilities:
Badge,ProductBadge,Card,Modal,LanguageSwitcher
Prerequisites
- Node.js (version TBD - check
.nvmrcor confirm with team) - npm or equivalent package manager
- Firebase CLI (
npm install -g firebase-tools) - Firebase project credentials (unverified - confirm with team)
Setup
Clone the repository
bashgit clone <repository-url> cd partners-portalInstall dependencies
bash# Frontend dependencies npm install # Backend dependencies (Firebase Functions) cd functions/orap npm install cd ../..Environment configuration
Copy
.env.exampleto.envand configure required variables:bashcp .env.example .env(unverified - confirm required environment variables with team)
Firebase setup (unverified - confirm Firebase configuration steps)
bashfirebase login firebase use <project-id>
Development
Run frontend dev server
bash
npm run devDefault port: check Vite output (typically http://localhost:5173)
Run Firebase Functions locally
bash
cd functions/orap
npm run serve # (unverified - check functions/orap/package.json for actual script)Build for production
bash
# Frontend build
npm run build
# Preview production build
npm run previewLinting
bash
npm run lintArchitecture Overview
partners-portal/
├── functions/orap/ # Firebase Cloud Functions (Backend API)
│ └── src/
│ ├── discountCodes/ # Discount code management endpoints
│ ├── partnerCodes/ # Partner code CRUD operations
│ ├── products/ # Product catalog endpoints
│ └── users/ # User management endpoints
├── src/ # React application (Frontend)
│ ├── components/
│ │ ├── auth/ # Authentication components (ProtectedRoute)
│ │ ├── layout/ # Layout components (AdminLayout, Header, Sidebar)
│ │ ├── ui/ # Reusable UI components
│ │ └── icons/ # Wellysa branding icons
│ ├── assets/ # Static assets
│ └── App.tsx # Application root
└── public/ # Public static files
└── images/
└── login-graphic.pngKey Features (based on codebase structure)
- Partner Dashboard - admin panel with sidebar navigation
- Discount Code Management - create and manage discount codes
- Partner Code System - partner-specific promotional codes
- Product Catalog - view and manage product information
- User Management - user administration endpoints
- Multi-language Support - language switcher component with i18next
- Analytics & Reporting - donut and line chart visualizations
- Protected Routes - authentication-guarded sections
Firebase Functions API
The backend provides REST/callable functions for:
/discountCodes- discount code CRUD operations/partnerCodes- partner code management/products- product catalog endpoints/users- user management
(Exact endpoint specifications TBD - refer to functions/orap/src/index.ts or API documentation)
Deployment
(Unverified - confirm deployment pipeline with team)
Frontend:
- Firebase Hosting (likely, given Firebase setup)
- Or alternative hosting platform TBD
Backend:
bash
cd functions/orap
firebase deploy --only functionsConfiguration Notes
- React Compiler is enabled - impacts dev and build performance (see
babel-plugin-react-compilerin dependencies) - TypeScript strict mode - check
tsconfig.app.jsonfor specific compiler options - ESLint configuration - see
eslint.config.jsfor linting rules
Development Guidelines
- Place reusable UI components in
src/components/ui/ - Follow existing component structure:
ComponentName/ComponentName.tsx,ComponentName.types.ts,ComponentName.constants.ts,index.ts - Maintain internationalization: add translations for new strings using i18next
- Keep Firebase Functions organized by domain (
discountCodes,partnerCodes, etc.)
Status
Active development (unverified - confirm project status)
Version: 0.0.0 (pre-release - per package.json)
Questions or issues? Contact the Wellysa development team or refer to internal documentation.