A progressive web application that helps you track the daily cost of your purchased items. Calculate how much your possessions cost you per day from the purchase date until now.
- Daily Cost Calculation: Automatically calculates the cost per day for each item
- Total Daily Spending: Shows the sum of all daily costs at a glance
- Item Management:
- Add new items with name, price, and purchase date
- Edit existing items
- Delete items with confirmation
- Data Management:
- Export data to JSON file
- Import data from JSON file
- Data persistence using IndexedDB
- Customization:
- Multiple language support (English, French, Chinese)
- Currency selection (USD, EUR, CNY)
- Modern UI/UX:
- Responsive design for mobile and desktop
- Smooth animations and transitions
- Intuitive navigation
- Mobile-optimized date picker
- Progressive Web App capabilities
- Node.js (v14 or higher)
- npm (comes with Node.js)
- Clone the repository:
git clone https://github.com/leoli-dev/cost-per-day.git
cd cost-per-day
- Install dependencies:
npm install
- Start the development server:
npm start
The app will open in your default browser at http://localhost:3000
.
To create a production build:
npm run build
The build files will be created in the build
folder.
- Click the "+" icon in the bottom navigation
- Enter the item name
- Input the purchase price
- Select the purchase date using the date picker
- Click "Save"
- The home screen displays all your items with their daily cost
- The total daily cost is shown at the top
- Click on any item to expand and see details
- Click on an item to expand it
- Click the "Edit" button
- Modify the details as needed
- Click "Save" to update
- Navigate to the edit page of an item
- Click the "Delete Item" button
- Confirm the deletion in the popup dialog
- Go to the Settings page by clicking the gear icon
- Under "Data Management":
- Click "Export Data" to download your data as a JSON file
- Click "Import Data" to upload a previously exported JSON file
- Go to the Settings page
- Change language: Select from English, French, or Chinese
- Change currency: Select from USD ($), EUR (€), or CNY (¥)
- Frontend: React, React Router
- State Management: React Context API
- Styling: Tailwind CSS
- Storage: IndexedDB
- Internationalization: i18next
- Icons: React Icons
The application works on all modern browsers including:
- Chrome (and Chromium-based browsers)
- Firefox
- Safari
- Edge
The app is designed with a mobile-first approach and includes:
- Touch-friendly interface
- Native date picker on mobile devices
- Responsive layout for all screen sizes
- PWA support for installation on home screen
This project is licensed under the MIT License - see the LICENSE file for details.