Skip to content

Major Architecture Restructuring

Choose a tag to compare

@luozongbao luozongbao released this 10 Sep 02:43
· 74 commits to release since this release
e54c6f3

๐Ÿ“‹ MyAPIs Release Notes

Current Release: Version 2.0.0

Release Date: September 10, 2025
Status: Stable Release


๏ฟฝ Version 2.0.0 - Major Architecture Restructuring

Released: September 10, 2025

๐ŸŒŸ Major Changes

๐Ÿ—๏ธ Complete Project Restructuring

  • New Architecture: Reorganized from individual tool folders to clean public/ and api/ separation
  • Clean URLs: Beautiful, organized URL structure with /public/ for interfaces and /api/ for endpoints
  • Enhanced Navigation: Streamlined access to tools, APIs, and documentation
  • Better Organization: Logical separation of concerns for easier maintenance and deployment

๏ฟฝ๐Ÿ“š Dynamic API Documentation System

  • Server-Agnostic URLs: Documentation automatically adapts to any server domain using PHP $_SERVER variables
  • Centralized Documentation: All API specs moved to public/api-specs/ directory
  • Interactive Examples: Working code samples that use the current server's URL
  • No More Hardcoded URLs: Eliminated hardcoded domain references throughout the project

๐Ÿ”ง API Accuracy Corrections

  • Parameter Verification: All API documentation parameters verified against actual implementations
  • Corrected Examples: Fixed numerous parameter name mismatches and incorrect examples
  • Consistent Responses: Standardized response formats across all tools
  • Updated Endpoints: All API endpoints updated to new /api/tool-name/ format

๐Ÿ› Bug Fixes

๐ŸŒ Web Interface Corrections

  • Fixed API Calls: Updated all JavaScript fetch() calls to use correct API endpoints
  • Navigation Fixes: Corrected all internal links to work with new structure
  • Username Generator: Fixed API endpoint calls and response handling
  • PromptPay QR Generator: Resolved API communication issues
  • Random Generator: Fixed randomization API calls
  • Fortune Teller: Resolved prediction file path issues

๐Ÿ”— File Path Corrections

  • Fortune Teller API: Fixed predictions directory path from /../predictions/ to /predictions/
  • Asset Links: Updated all asset references to work with new structure
  • Documentation Links: Corrected all cross-references between tools and docs

๐Ÿ“ New File Structure

myapis/
โ”œโ”€โ”€ public/                   # User-facing interfaces
โ”‚   โ”œโ”€โ”€ index.php            # Main landing page
โ”‚   โ”œโ”€โ”€ *.php                # Individual tool interfaces
โ”‚   โ””โ”€โ”€ api-specs/           # API documentation
โ”œโ”€โ”€ api/                     # Backend API implementations
โ”‚   โ””โ”€โ”€ */index.php          # Individual API endpoints
โ”œโ”€โ”€ README.md                # Updated project documentation
โ””โ”€โ”€ RELEASE.md               # This file

๐Ÿ”„ Breaking Changes

  • URL Structure: All URLs changed from /tool-name/ to /public/tool-name.php
  • API Endpoints: All APIs moved from /tool-name/api/ to /api/tool-name/
  • Documentation: API docs moved from /tool-name/spec.php to /public/api-specs/tool-name.php
  • Navigation: All internal links updated to reflect new structure

โœ… Verification & Testing

  • API Testing: All endpoints verified with curl and browser testing
  • Web Interface Testing: All tools tested for functionality and user experience
  • Documentation Accuracy: All examples and parameters verified against actual code
  • Cross-Browser Testing: Verified compatibility across modern browsers
  • Mobile Testing: Ensured responsive design works on all devices

๐Ÿ› ๏ธ Technical Improvements

  • Cleaner Architecture: Better separation of concerns between frontend and backend
  • Easier Deployment: Simplified deployment with clear public/api structure
  • Better Maintainability: More organized codebase for easier updates
  • Enhanced Security: Improved input validation and error handling
  • Performance: Optimized file structure for better loading times

๐Ÿ’ง Version 1.3.1 - API Documentation Enhancement

Released: September 9, 2025

๐ŸŒŸ New Features

๐Ÿ“– Comprehensive API Documentation

  • Interactive API Specs: Added spec.php files for all tools with comprehensive documentation
  • Enhanced Navigation: Added navigation links to API documentation from all web interfaces
  • Consistent Design: Beautiful, responsive documentation pages with consistent styling
  • Complete Examples: Detailed request/response examples for all API endpoints
  • Error Documentation: Comprehensive error codes and troubleshooting guides
  • Integration Examples: Code examples in multiple programming languages

๐Ÿ”— Improved User Experience

  • Main Interface Enhancement: Added "API Docs" buttons to all tool cards
  • Tool Navigation: Added breadcrumb navigation and quick links to API resources
  • Updated Project Structure: Documentation reflects new file organization
  • Enhanced README: Updated main README with documentation links and features

๐Ÿ“ New Files Added

  • health-calculator/spec.php - Health Calculator API Documentation
  • password-generator/spec.php - Password Generator API Documentation
  • username-generator/spec.php - Username Generator API Documentation
  • promptpay-qr-generator/spec.php - PromptPay QR Generator API Documentation
  • fortune-teller/spec.php - Fortune Teller API Documentation
  • randomizer/spec.php - Random Generator API Documentation

๐Ÿ”„ Enhancements

  • Main README Updated: Added documentation column to tools table
  • Interface Improvements: All tools now have consistent navigation
  • Project Structure: Updated documentation to reflect spec.php additions
  • User Flow: Seamless navigation between tools, APIs, and documentation

๐Ÿ’ง Version 1.2.0 - Water Intake Calculator Addition

Released: September 9, 2025

๐ŸŒŸ New Features

๐Ÿฅ Health Calculator - Water Intake Calculator

  • Daily Water Intake Calculator: Personalized water requirements based on multiple factors
  • Comprehensive Factors: Weight, age, gender, activity level, climate, and health conditions
  • Smart Adjustments: Automatic adjustments for different climates and health conditions
  • Detailed Breakdown: Shows water from drinks vs food, number of glasses needed
  • Health Condition Support: Special calculations for pregnancy, breastfeeding, fever, etc.
  • Climate Awareness: Adjustments for cold, temperate, hot, and very hot climates
  • API Integration: Full REST API support with detailed responses

๐Ÿ”„ Enhancements

  • Updated Interface: Added fourth calculator tab for water intake
  • Enhanced Documentation: Complete API documentation with water intake examples
  • Improved Validation: Added validation for water intake specific parameters

๏ฟฝ๐Ÿš€ Version 1.1.0 - Health Calculator Enhancement

Released: September 9, 2025

๐ŸŒŸ Major Updates

๐Ÿฅ Health Calculator (Formerly BMI Calculator)

  • Enhanced Functionality: Expanded from simple BMI calculator to comprehensive health calculator
  • BMI Calculator: Body Mass Index calculation with WHO standard categories
  • BMR Calculator: Basal Metabolic Rate calculation using Mifflin-St Jeor equation
  • Daily Intake Calculator: Personalized caloric needs with macronutrient breakdown
  • Activity Level Integration: 5 activity levels from sedentary to extra active
  • Goal-Based Calculations: Support for weight maintenance, loss, or gain targets
  • Improved UI: Multi-tab interface for seamless switching between calculators
  • Enhanced API: Unified endpoint supporting all calculation types
  • Better Documentation: Comprehensive API documentation with examples for all calculators

๐Ÿ”„ Breaking Changes

  • Folder Renamed: bmi-calculator/ โ†’ health-calculator/
  • API Updates: New parameter structure for BMR and Daily Intake calculations
  • URL Changes: All links updated to reflect new folder structure

๐ŸŽ‰ Version 1.0.0 - Initial Release

Released: September 9, 2025

๐ŸŒŸ New Features

๐Ÿš€ Core Platform

  • Landing Page: Beautiful gradient-based responsive homepage with tool grid
  • Unified Design: Consistent UI/UX across all tools and APIs
  • Mobile Responsive: Full mobile optimization for all interfaces
  • Statistics Dashboard: Real-time platform statistics display

๐Ÿฅ Health Calculator

  • Multi-Calculator Interface: BMI, BMR, and Daily Intake calculators in one tool
  • BMI Calculator: Body Mass Index with WHO standard categories
  • BMR Calculator: Basal Metabolic Rate using Mifflin-St Jeor equation
  • Daily Intake Calculator: Personalized caloric needs with macronutrient breakdown
  • Activity Level Support: 5 activity levels from sedentary to extra active
  • Goal-Based Calculations: Weight maintenance, loss, or gain targets
  • Multi-Unit Support: Metric (kg/cm) and Imperial (lbs/inches)
  • Health Insights: Personalized recommendations for each calculation type
  • REST API: Comprehensive JSON-based health calculation endpoints

๐Ÿ” Password Generator

  • Advanced Generation: Cryptographically secure password creation
  • Customizable Options: Length control (1-128 characters)
  • Character Sets: Lowercase, uppercase, numbers, symbols
  • Security Features: Exclude ambiguous characters, prevent repetition
  • Batch Generation: Generate multiple passwords simultaneously
  • Strength Analysis: Real-time password strength evaluation

๐Ÿ‘ค Username Generator

  • Themed Categories: 6 different word themes for username generation
  • Cross-Theme Combinations: Mix themes for unique usernames
  • Large Word Pool: 100+ adjectives and themed nouns
  • Bulk Generation: Create multiple usernames at once
  • API Integration: RESTful API for programmatic access

๐Ÿ’ณ PromptPay QR Generator

  • EMV Compliance: Full EMV QR Code standard implementation
  • Multiple ID Types: Phone numbers, Tax IDs, e-Wallet IDs
  • QR Code Generation: High-quality QR code image output
  • Base64 Support: Direct base64 image encoding
  • Thai Payment System: Native PromptPay integration

๐Ÿ”ฎ Fortune Teller

  • Multilingual Support: Thai, Chinese, and English predictions
  • 52 Unique Fortunes: Diverse fortune database
  • Life Categories: Love, Career, Health, Finance, General
  • Beautiful Interface: Mystical design with smooth animations
  • Random Selection: Cryptographically secure fortune picking

๐ŸŽฒ Random Generator

  • Multiple Generators: Numbers, dice, coins, playing cards
  • Animated Results: Beautiful CSS animations for interactions
  • Range Control: Flexible number range generation
  • Visual Feedback: Interactive dice, coin flip, and card animations
  • Secure Randomization: Cryptographically secure random generation

๐Ÿ”ง Technical Features

๐Ÿ› ๏ธ Architecture

  • Pure PHP: No external dependencies required
  • RESTful APIs: Consistent JSON-based API responses
  • Error Handling: Comprehensive error management across all tools
  • Input Validation: Robust input sanitization and validation
  • CORS Support: Cross-origin request handling

๐Ÿ”’ Security

  • Secure Random: random_int() for cryptographic security
  • Input Sanitization: SQL injection and XSS prevention
  • Error Responses: Secure error handling without information leakage
  • Validation: Comprehensive input range and type validation

๐Ÿ“ฑ User Experience

  • Responsive Design: Mobile-first approach
  • Loading States: User feedback during API operations
  • Copy Functionality: One-click copying for generated content
  • Visual Feedback: Color-coded results and status indicators
  • Smooth Animations: CSS transitions and hover effects

๐Ÿ“Š Platform Statistics

  • Tools: 6 active tools
  • APIs: 12 REST endpoints
  • Languages: 3 supported languages (Thai, Chinese, English)
  • Response Time: Average < 100ms
  • Uptime Target: 99.9%

๐Ÿ”„ API Endpoints

Tool Method Endpoint Description
Health Calculator POST /api/health-calculator/ Calculate BMI, BMR, Daily Intake, and Water Intake
Password Generator POST /api/password-generator/ Generate secure passwords
Username Generator POST /api/username-generator/ Create unique usernames
PromptPay QR POST /api/promptpay-qr-generator/ Generate PromptPay QR codes
Fortune Teller GET /api/fortune-teller/ Get random fortune prediction
Random Generator POST /api/randomizer/ Generate random numbers/objects

๐Ÿ“ File Structure

myapis/
โ”œโ”€โ”€ ๐Ÿ“„ public/index.php (Main landing page)
โ”œโ”€โ”€ ๏ฟฝ public/*.php (Tool web interfaces)  
โ”œโ”€โ”€ ๐Ÿ“ public/api-specs/ (API documentation)
โ”œโ”€โ”€ ๐Ÿ“ api/*/ (API implementations)
โ”œโ”€โ”€ ๏ฟฝ README.md (Project documentation)
โ””โ”€โ”€ ๏ฟฝ RELEASE.md (This file)

๐Ÿงช Testing

  • Manual testing completed for all web interfaces
  • API endpoint testing with various input scenarios
  • Cross-browser compatibility verified
  • Mobile responsiveness tested on multiple devices
  • Security testing for input validation

๐Ÿ“‹ Known Issues

  • None reported for this initial release

๐Ÿ”ฎ Future Roadmap

Version 1.1.0 (Planned)

  • User Authentication: Optional user accounts for saving preferences
  • Rate Limiting: API rate limiting for production use
  • Analytics: Basic usage analytics and reporting
  • Database Integration: Optional database storage for generated content
  • Themes: Multiple UI themes and customization options

Version 1.2.0 (Planned)

  • Additional Tools: Text manipulation, URL shortener, Hash generator
  • API Documentation: Interactive API documentation with Swagger
  • Webhook Support: Webhook integration for external services
  • Bulk Operations: Enhanced bulk generation capabilities
  • Export Features: PDF/CSV export for generated content

Version 2.0.0 (Future)

  • Microservices: Split tools into individual microservices
  • Docker Support: Containerization for easy deployment
  • Advanced Analytics: Detailed usage analytics and insights
  • Plugin System: Extensible plugin architecture
  • Enterprise Features: Advanced security and management features

๐Ÿ”ง System Requirements

Minimum Requirements

  • PHP: 7.0 or higher
  • Web Server: Apache, Nginx, or PHP built-in server
  • Memory: 128MB RAM
  • Storage: 50MB disk space

Recommended Requirements

  • PHP: 8.0 or higher
  • Web Server: Apache 2.4+ or Nginx 1.18+
  • Extensions: GD library for QR code generation
  • Memory: 256MB RAM
  • Storage: 100MB disk space

๐Ÿš€ Deployment

Development

git clone https://github.com/luozongbao/myapis.git
cd myapis
php -S localhost:8000
# Access at http://localhost:8000/public/

Production

  • Deploy to web server document root
  • Configure virtual host/server block to point to the project root (not public folder)
  • Access web interfaces via /public/ path
  • API endpoints available at /api/ path
  • Set appropriate file permissions (644 for files, 755 for directories)
  • Enable PHP and required extensions

๐Ÿ‘ฅ Contributors

๐Ÿ“ž Support

For support, bug reports, or feature requests:

  • Issues: GitHub Issues
  • Documentation: Individual tool README files
  • Contact: Repository maintainer via GitHub

๐Ÿ“ Changelog Format

This changelog follows the format:

  • ๐ŸŒŸ New Features: New functionality and tools
  • ๐Ÿ”ง Technical Improvements: Architecture and performance updates
  • ๐Ÿ› Bug Fixes: Issue resolutions
  • ๐Ÿ“š Documentation: Documentation updates
  • ๐Ÿšจ Breaking Changes: Compatibility-breaking updates
  • ๐Ÿ”’ Security: Security-related updates

Thank you for using MyAPIs! ๐ŸŽ‰

For the latest updates and releases, please check the GitHub repository.