# weight-tracker-miniprogram **Repository Path**: CodeTV/weight-tracker-miniprogram ## Basic Information - **Project Name**: weight-tracker-miniprogram - **Description**: 基于微信小程序原生和云开发的模式,开发的一款体重记录小程序,帮助用户轻松追踪和管理体重数据。 - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2026-02-28 - **Last Updated**: 2026-03-12 ## Categories & Tags **Categories**: Uncategorized **Tags**: 微信小程序, 云开发 ## README # Weight Tracking Mini Program A weight tracking mini program based on WeChat Cloud Development, helping users easily track and manage weight data. ## Features - **Weight Logging**: Quickly record daily weight data - **Data Visualization**: Intuitively view weight trend patterns - **Cloud Storage**: Utilizes WeChat Cloud Development for secure and reliable data storage - **Cloud Function Support**: Backend logic is handled via cloud functions ## Technology Stack - **Frontend**: WeChat Mini Program - **Backend**: WeChat Cloud Development - **Database**: Cloud Database (CloudBase Database) - **Cloud Functions**: Node.js Cloud Functions - **Dependencies**: - `@cloudbase/node-sdk`: Cloud Development Node.js SDK - `@cloudbase/database`: Cloud Database SDK - `lodash`: JavaScript utility library ## Project Structure ``` ├── cloudfunctions/ │ └── record/ # Weight recording cloud function │ ├── index.js # Cloud function entry point │ └── node_modules/ # Cloud function dependencies ├── .vscode/ │ └── settings.json # VSCode configuration └── LICENSE # Project license ``` ## Cloud Function Description ### record Cloud Function Handles weight data recording and storage. - **Location**: `cloudfunctions/record/index.js` - **Functionality**: - Receives and processes weight recording requests - Stores data in the cloud database ## Installation and Deployment ### Prerequisites 1. WeChat Developer Tool 2. WeChat Mini Program AppID 3. Cloud Development enabled ### Deployment Steps 1. **Create a Cloud Development Environment** - Create a cloud development environment in the WeChat Developer Tool - Obtain the environment ID 2. **Upload Cloud Functions** - Right-click the `cloudfunctions/record` directory in the WeChat Developer Tool - Select "Upload and Deploy: Install Dependencies in Cloud" 3. **Initialize Database** - Create a data collection in the Cloud Development Console (e.g., `weight_records`) ## Usage Instructions 1. Open the mini program 2. Enter your current weight 3. Click the save button 4. View historical records and weight trends ## License MIT License ## Notes - Ensure the cloud development environment ID is correctly configured - Cloud function dependencies are automatically installed during deployment - It is recommended to regularly back up important data