This repository contains the frontend client for PantryPal. It is a modern application built with React, Vite, and TailwindCSS.
Before cloning and running the application, ensure you have the following installed on your local machine:
- Node.js (v20+)
-
Clone the repository:
git clone <repo_url> cd pp-frontend
-
Install dependencies:
npm install
-
Configure Environment variables: Create a
.envfile in the root directory and ensure it contains the API and Cognito variables matching your deployed backend. You can copy the variables generated by the backend'snpm run setupscript.VITE_API_URL=https://<your-api-id>.execute-api.<region>.amazonaws.com VITE_COGNITO_REGION=<your-cognito-region> VITE_COGNITO_USER_POOL_ID=<your-user-pool-id> VITE_COGNITO_CLIENT_ID=<your-client-id>
To start the local development server with Hot Module Replacement (HMR):
npm run devThe application will be accessible at http://localhost:5173.
The frontend uses AWS Amplify for fully automated CI/CD deployment.
Unlike the backend which requires manual deployment commands, the frontend is continuously integrated. Any code pushed to the master branch on GitHub will automatically trigger a build and deployment in AWS Amplify.
To deploy your changes:
- Write/edit code in
src/. - Commit your changes:
git commit -m "your message" - Push to GitHub:
git push origin master
AWS Amplify will automatically detect the push, install dependencies, run the Vite build, and deploy the new static assets to the global CDN.