A modern desktop application for tracking and predicting child growth using WHO standards and advanced algorithms. Built with Vue 3, TypeScript, Vite, and Electron.
- π Growth Tracking - Track height, weight, and other measurements over time
- π Growth Predictions - Predict adult height using WHO standards and mid-parental height calculations
- π Percentile Calculations - See where your child ranks compared to WHO growth standards
- π± Interactive Charts - Visualize growth trends with ECharts
- π¨βπ©βπ§βπ¦ Multiple Children - Manage multiple child profiles
- πΎ Data Persistence - Local storage with electron-store for desktop, localStorage for web
- π€ Export/Import - Backup and restore your data as JSON
- π¨οΈ Print Reports - Generate printable growth reports
- β‘ Fast Development - Vite for instant HMR
- π Type Safe - Full TypeScript support
- π§ͺ Tested - Vitest for unit and component testing
- π¨ Beautiful UI - Vant mobile components
- π Dark Mode - Theme support
- π§ Code Quality - ESLint + Prettier configured
- Node.js 18+
- npm 9+
# Clone the repository
git clone https://github.com/nobugawakof/cgp.git
cd cgp
# Install dependencies
npm install
# Start development server (web)
npm run dev
# Start Electron app
npm run electron:dev# Build for web
npm run build
# Build Electron app
npm run electron:buildcgp/
βββ electron/ # Electron main process
β βββ main.ts # Main entry point
β βββ preload.ts # Preload scripts
βββ public/ # Static assets
βββ src/
β βββ components/ # Vue components
β β βββ ErrorBoundary.vue
β β βββ GrowthChart.vue
β βββ pages/ # Page components
β β βββ Dashboard.vue
β β βββ AddChild.vue
β β βββ Reports.vue
β β βββ Settings.vue
β βββ router/ # Vue Router config
β βββ stores/ # Pinia stores
β β βββ app.ts # App settings
β β βββ child.ts # Child data management
β β βββ user.ts # User data
β βββ types/ # TypeScript types
β β βββ child.ts # Child-related interfaces
β βββ utils/ # Utility functions
β β βββ growthPrediction.ts # Growth algorithms
β βββ App.vue # Root component
β βββ main.ts # Vue entry point
βββ eslint.config.js # ESLint configuration
βββ .prettierrc # Prettier configuration
βββ vite.config.ts # Vite configuration
βββ package.json
- Click "Add Child" in the sidebar or the FAB button
- Enter child's name, birth date, and gender
- Add current height and weight measurements
- Optionally add parent heights for better predictions
- Select a child from the Dashboard
- Click "Add New Measurement"
- Enter current height and weight
- View updated charts and percentiles
- Go to Reports page
- View detailed growth charts
- See percentile rankings
- Print or share reports
- Go to Settings
- Export data for backup
- Import data from backup
- Clear all data if needed
# Run tests
npm run test
# Run tests with UI
npm run test:ui
# Run tests once
npm run test:run
# Coverage report
npm run test:coverage| Script | Description |
|---|---|
npm run dev |
Start Vite dev server |
npm run build |
Build for production |
npm run electron:dev |
Start Electron in dev mode |
npm run electron:build |
Build Electron app |
npm run test |
Run Vitest in watch mode |
npm run lint |
Lint and fix code |
npm run format |
Format code with Prettier |
npm run type-check |
TypeScript type checking |
- Framework: Vue 3 (Composition API)
- Language: TypeScript
- Build Tool: Vite 7
- Desktop: Electron 39
- State Management: Pinia
- Routing: Vue Router (Hash mode for Electron)
- UI Components: Vant 4
- Charts: ECharts + vue-echarts
- Storage: electron-store + localStorage
- Testing: Vitest + Vue Test Utils
- Linting: ESLint + Prettier
Based on WHO Child Growth Standards (2006), comparing measurements against reference data for each age and gender.
Uses two methods:
-
Mid-Parental Height (MPH): If parent heights are provided
- Boys: (Father + Mother + 13) / 2
- Girls: (Father + Mother - 13) / 2
-
Growth Trajectory: Based on current percentile and expected adult height percentage
Standard formula: Weight (kg) / HeightΒ² (mΒ²)
- Context isolation enabled
- Node integration disabled
- Content Security Policy configured
- No remote code execution
- Local data only (no external APIs)
MIT License - see LICENSE for details
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
This application is for informational purposes only. Growth predictions are estimates based on statistical models and should not replace professional medical advice. Always consult a healthcare provider for concerns about your child's growth and development.
Made with β€οΈ using Vue 3 + Electron