This project is a package registry designed for internal use by developers at ACME Corp. It provides functionality to:
- Upload packages
- Update packages with new versions
- Query package details
- Calculate the cost of a package and its dependencies
Ensure you have the following tools installed before proceeding:
- AWS CLI
- AWS SAM CLI
- Docker
- Node.js and npm (to build and run the application)
- Clone this repository to your local machine:
git clone https://github.com/rtjord/ECE461-Phase2.git
cd ECE461-Phase2
- Install required dependencies for both the backend and frontend:
- Backend:
cd backend
npm install
- Frontend:
cd ../frontend
npm install
- Backend:
To build the backend application, run one of the following commands from the backend
folder:
- For general environments:
npm run build
- For Linux environments:
npm run build:linux
To build the frontend application, run the following command from the frontend
folder:
npm run build
-
Set Up AWS Environment: Ensure you are signed into your AWS account as an administrator using the AWS CLI.
-
Deploy the Backend: Navigate to the
backend
folder and run:sam deploy --guided
Follow the prompts to complete the deployment process.
-
Set Up AWS Amplify:
- Navigate to AWS Amplify in the AWS Management Console.
- Follow the prompts to deploy the frontend from the
dev
branch.
-
Configure Environment Variables:
- Navigate to API Gateway > Stages > dev in the AWS Management Console and copy the invoke URL.
- In Amplify, create an environment variable named
NEXT_PUBLIC_API_BASE_URL
and set its value to the invoke URL.
-
Verify Deployment:
- Visit the Amplify-provided URL to confirm the frontend is functioning as expected.
- In backend/src/handlers/tests/end_to_end/config.ts, set the base url to the url provided by API Gateway. Then run the following commands
cd backend
npm run test:e2e
- Test the frontend by running these commands:
cd frontend
npm test