Calorie Tracker is a robust application designed to assist users in monitoring their daily calorie intake and expenditure. The backend is powered by Laravel, with additional features implemented using PHPNative, while the frontend is developed using React and TypeScript. The application includes functionalities such as chart visualization, Total Daily Energy Expenditure (TDEE) calculations, and more.
- Backend: Laravel framework with PHPNative for specific features.
- Frontend: React with TypeScript.
- Database: MySQL (or other supported databases).
- Build Tool: Vite.
- Testing: PHPUnit for backend testing; Jest and React Testing Library for frontend testing.
- PHP >= 8.4
- Composer
- Node.js >= 22
- npm
- MySQL (or another supported database)
- Git
git clone <repository-url>
cd caloriecomposer installnpm installCopy the .env.example file to .env:
cp .env.example .envUpdate the .env file with your database credentials and other necessary configurations.
php artisan key:generatephp artisan migrateFor development:
npm run devFor production:
npm run buildcomposer require nativephp/electronphp artisan native:installphp artisan native:serveThis project is licensed under the MIT License. You are free to use, modify, and distribute the software, provided proper attribution is given to the original authors. For more details, refer to the LICENSE file included in the repository.
The application utilizes a food dataset for nutritional information, located at database/seeders/data/foods_data.csv. Due to limitations with the seeder functionality, the dataset must be imported manually. Follow these steps:
- Open the application.
- Navigate to
Tools > Import Dataset(shortcut: Ctrl + I) and select the filedatabase/seeders/data/foods_data.csv.
This project was developed for research purposes, exploring the capabilities of PHPNative. Special thanks to V0.dev, DeepSeek, ChatGPT, and GitHub Copilot for their support in completing this project.