PantrySync is a web application designed for families and shared households to manage pantry items efficiently. The app helps prevent duplicate purchases and notifies users when items are low on stock. It simplifies household inventory management and encourages collaboration among members.
- Features
- Technologies Used
- Getting Started
- Setup
- Usage
- External API
- Screenshots
- What I Learned
- Acknowledgments
- Household Management:
- Create or join a household using unique join codes.
- Admins can remove members and manage household settings.
- Pantry Item Tracking:
- Add, update, and remove items.
- Track stock levels and receive alerts for low-stock items.
- Roles:
- Household Admin: Manages the household, including join codes and member removal.
- Member: Participates in managing pantry items.
- Authentication:
- Secure user accounts using ASP.NET Identity.
- Backend:
- ASP.NET Core with Entity Framework Core
- PostgreSQL with pgAdmin
- ChompAPI integration for product data
- Frontend:
- React with Vite
- Reactstrap for styling
- Authentication:
- ASP.NET Identity
To run this project locally, follow these steps:
- Install the following tools:
- Set up an API key for ChompAPI.
- Clone the repository:
git clone https://github.com/yourusername/pantry-tracker.git cd pantry-tracker - Set up your environment variables:
Create an
appsettings.jsonfile with the following:{ "ConnectionStrings": { "DefaultConnection": "Host=localhost;Database=pantrytracker;Username=yourusername;Password=yourpassword" }, "ChompApiKey": "your-chomp-api-key" } - Apply migrations and start the backend:
dotnet ef database update dotnet run
- Navigate to the frontend directory:
cd client - Install dependencies:
npm install
- Start the development server:
npm run dev
Run commands to update the database schema as needed:
dotnet ef migrations add MigrationName
dotnet ef database updateUse environment variables for sensitive data:
CHOMP_API_KEY=your-chomp-api-key
CONNECTION_STRING=Host=localhost;Database=pantrytracker;Username=yourusername;Password=yourpassword- Create a Household: Admins can create a household and generate a join code.
- Manage Members: Admins can remove members from the household.
- Join a Household: Use the join code to become a part of the household.
- Track Pantry Items: Add, update, and remove pantry items.
Pantry Tracker integrates with ChompAPI to fetch product data.
Building PantrySync taught me valuable lessons in full-stack development, project management, and problem-solving:
- Backend:
- Gained proficiency in setting up RESTful APIs using ASP.NET Core.
- Learned to configure PostgreSQL with migrations using Entity Framework Core.
- Frontend:
- Enhanced skills in React, including state management with hooks.
- Styled components with Reactstrap for a modern UI.
- Authentication:
- Implemented secure authentication with ASP.NET Identity.
- APIs:
- Integrated external APIs (ChompAPI) for dynamic product data.
- Problem-Solving:
- Debugged cross-origin issues and refined database queries.
- Added meaningful error handling and user feedback for better UX.
- Reactstrap: Simplified building UI components.
- ASP.NET Core: Provided robust backend capabilities.
- ChompAPI: Allowed integration of real-world product data.