Skip to content

HarlieTran/pp-frontend

Repository files navigation

PantryPal Frontend (pp-frontend)

This repository contains the frontend client for PantryPal. It is a modern application built with React, Vite, and TailwindCSS.

Prerequisites

Before cloning and running the application, ensure you have the following installed on your local machine:

  • Node.js (v20+)

Getting Started

  1. Clone the repository:

    git clone <repo_url>
    cd pp-frontend
  2. Install dependencies:

    npm install
  3. Configure Environment variables: Create a .env file 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's npm run setup script.

    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>

Development

To start the local development server with Hot Module Replacement (HMR):

npm run dev

The application will be accessible at http://localhost:5173.

Deployment

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:

  1. Write/edit code in src/.
  2. Commit your changes: git commit -m "your message"
  3. 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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages