A cool cross-platform application for managing food allergy information, built with Kivy and CoPilot.
FoodAllergyShield/
├── src/ # Source code
│ └── foodallergyshield/ # Main application package
│ ├── __init__.py # Package initialization
│ ├── __main__.py # CLI entry point
│ ├── app.py # Briefcase entry point
│ ├── food_allergy_shield.py # Main application logic
│ ├── database_manager.py # Database operations
│ └── food_allergy_shield.kv # UI layout (Kivy)
├── assets/ # Static assets
│ ├── icon.ico # Application icon (Windows)
│ ├── presplash.png # Splash screen image
│ └── img/ # Other images
├── data/ # Data files
│ ├── food_allergies.db # SQLite database
│ ├── food_allergies_export.csv # Sample export
│ └── sample_data.csv # Sample data
├── docs/ # Documentation
├── archive/ # Archived original files
├── build/ # Briefcase build output
├── dist/ # Distribution packages
├── logs/ # Application logs
├── tools/ # Development tools
├── run_dev.py # Development runner (Python)
├── run_dev.bat # Development runner (Windows)
├── run_dev.sh # Development runner (Unix/Linux)
├── pyproject.toml # Project configuration (Briefcase)
├── requirements.txt # Python dependencies
└── README.md # This file
Windows:
# Double-click or run:
run_dev.batPython (all platforms):
python run_dev.pyUnix/Linux/macOS:
chmod +x run_dev.sh
./run_dev.shUse the provided build scripts that handle both building and DLL copying:
# Windows Command Prompt
scripts\build_complete.bat
# PowerShell (more detailed output)
.\scripts\build_complete.ps1# Development testing
briefcase dev
# Create/update build
briefcase create
# Build executable
briefcase build
# Copy necessary DLLs (required for Windows)
.\scripts\post_build.ps1
# Run executable
briefcase run
# Create installer package
briefcase packageNote: On Windows, the build scripts automatically copy necessary SDL2, GLEW, and ANGLE DLLs to fix runtime issues. See
scripts/README.mdfor details.
- Python 3.8+
- Kivy 2.3.0+
- Briefcase (for packaging)
Install dependencies:
pip install -r requirements.txt
pip install briefcase # For packaging- Edit files in
src/foodallergyshield/ - Test with
python run_dev.py(automatically copies database fromdata/) - For packaging:
briefcase update && briefcase build
- Development: Database automatically copied from
data/food_allergies.dbtosrc/foodallergyshield/when running development scripts - Distribution: Database (
food_allergies.db) is included in the MSI package - Data Directory: Sample data and main database stored in
data/
- Source Code: All Python code goes in
src/foodallergyshield/ - Assets: Images, icons in
assets/ - Data: Database files, CSV data in
data/ - Documentation: Markdown files in
docs/
src/foodallergyshield/app.py- Main application logicsrc/foodallergyshield/database_manager.py- Database operationssrc/foodallergyshield/food_allergy_shield.kv- UI layoutpyproject.toml- Briefcase configuration
The project creates:
- Windows:
Food Allergy Shield-1.0.0.msiinstaller - Executable:
Food Allergy Shield.exestandalone
- Development: Use
run_dev.pyfor quick testing - Production: Use
scripts\build_complete.batorbriefcase build+scripts\post_build.ps1
- "DLL load failed" errors: Use the build scripts in
scripts/folder - they automatically copy required DLLs - "'NoneType' object has no attribute 'size'": Fixed in current version with proper error handling
- Application won't start: Run
scripts\build_complete.ps1for detailed build process and error checking
The scripts/ directory contains automated build tools:
build_complete.bat/.ps1- Complete build with DLL copyingpost_build.bat/.ps1/.sh- DLL copying only (after manual build)- See
scripts/README.mdfor detailed usage instructions
MIT License - see LICENSE file for details.
