-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #109 from rtjord/dev
Update frontend
- Loading branch information
Showing
125 changed files
with
152,323 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
# ECE461-Phase2 Project | ||
|
||
## Overview | ||
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 | ||
|
||
## Prerequisites | ||
Ensure you have the following tools installed before proceeding: | ||
|
||
- [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html) | ||
- [AWS SAM CLI](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/install-sam-cli.html) | ||
- [Docker](https://docs.docker.com/engine/install/) | ||
- [Node.js and npm](https://nodejs.org/) (to build and run the application) | ||
|
||
## Setup Instructions | ||
|
||
### Clone the Repository | ||
1. Clone this repository to your local machine: | ||
`git clone https://github.com/rtjord/ECE461-Phase2.git` | ||
`cd ECE461-Phase2` | ||
|
||
### Install Dependencies | ||
2. Install required dependencies for both the backend and frontend: | ||
- **Backend**: | ||
`cd backend` | ||
`npm install` | ||
- **Frontend**: | ||
`cd ../frontend` | ||
`npm install` | ||
|
||
## Building the Project | ||
|
||
### 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` | ||
|
||
### Frontend | ||
To build the frontend application, run the following command from the `frontend` folder: | ||
`npm run build` | ||
|
||
## Deploying the Project | ||
|
||
### Deploying the Backend | ||
1. **Set Up AWS Environment**: Ensure you are signed into your AWS account as an administrator using the AWS CLI. | ||
|
||
2. **Deploy the Backend**: Navigate to the `backend` folder and run: | ||
`sam deploy --guided` | ||
Follow the prompts to complete the deployment process. | ||
|
||
### Deploying the Frontend | ||
1. **Set Up AWS Amplify**: | ||
- Navigate to AWS Amplify in the AWS Management Console. | ||
- Follow the prompts to deploy the frontend from the `dev` branch. | ||
|
||
2. **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. | ||
|
||
3. **Verify Deployment**: | ||
- Visit the Amplify-provided URL to confirm the frontend is functioning as expected. | ||
|
||
## Verification | ||
- 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 | ||
```sh | ||
cd backend | ||
npm run test:e2e | ||
``` | ||
- Ensure the backend endpoints are functional using tools like Postman or curl. | ||
- Test the frontend by accessing the deployed Amplify URL and interacting with the interface. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
12/09/24 02:18:56 AM : INFO : Testing Directory: /app | ||
12/09/24 02:18:56 AM : Test Start : Running Tests for: ECE461: Autograder Phase 2 | ||
12/09/24 02:18:56 AM : Test Start : Running Tests for: Setup and Reset Test Group | ||
12/09/24 02:18:57 AM : Test Success : > System Tracks Test passed! | ||
12/09/24 02:18:58 AM : Test Fail : > Access Control Track is not present! This is for tracking purpose and will not count towards the grade. | ||
12/09/24 02:18:58 AM : Test Fail : > Unable to Login! (Unstaisfied dependency 'Check if access control track is present') | ||
12/09/24 02:19:01 AM : Test Success : > System Reset Test passed! | ||
12/09/24 02:19:01 AM : Test Success : > No Packages present after reset! | ||
12/09/24 02:19:01 AM : Test Result : Total score: 3 / 5 | ||
|
||
12/09/24 02:19:01 AM : Test Start : Running Tests for: Upload Packages Test Group | ||
12/09/24 02:19:03 AM : Test Success : > Content package 1 upload passed! | ||
12/09/24 02:19:04 AM : Test Success : > Single Package Query Test passed! | ||
12/09/24 02:19:05 AM : Test Success : > Content package 2 upload passed! | ||
12/09/24 02:19:06 AM : Test Success : > Content package 3 upload passed! | ||
12/09/24 02:19:13 AM : Test Success : > Ingest package 1 upload passed! | ||
12/09/24 02:19:22 AM : Test Success : > Ingest package 2 upload passed! | ||
12/09/24 02:19:35 AM : Test Success : > Ingest package 3 upload passed! | ||
12/09/24 02:19:45 AM : Test Success : > Ingest package 4 upload passed! | ||
12/09/24 02:19:46 AM : Test Success : > All Package Query Test passed! | ||
12/09/24 02:19:46 AM : Test Result : Total score: 9 / 9 | ||
|
||
12/09/24 02:19:46 AM : Test Start : Running Tests for: Regex Tests Group | ||
12/09/24 02:19:47 AM : Test Success : > Exact Match Name Regex Test passed! | ||
12/09/24 02:19:48 AM : Test Success : > Extra Chars Name Regex Test passed! | ||
12/09/24 02:19:49 AM : Test Success : > Random String Regex Test passed! | ||
12/09/24 02:19:49 AM : Test Result : Total score: 3 / 3 | ||
|
||
12/09/24 02:19:49 AM : Test Start : Running Tests for: Package Read Test Group | ||
12/09/24 02:19:50 AM : Test Success : > Get Package By Name Test 0 passed! | ||
12/09/24 02:19:50 AM : Test Success : > Get Package By Name Test 1 passed! | ||
12/09/24 02:19:51 AM : Test Success : > Get Package By Name Test 2 passed! | ||
12/09/24 02:19:52 AM : Test Success : > Get Package By Name Test 3 passed! | ||
12/09/24 02:19:52 AM : Test Success : > Get Package By Name Test 4 passed! | ||
12/09/24 02:19:53 AM : Test Success : > Get Package By Name Test 5 passed! | ||
12/09/24 02:19:54 AM : Test Success : > Get Package By Name Test 6 passed! | ||
12/09/24 02:19:55 AM : Test Success : > Get Package By ID Test 0 passed! | ||
12/09/24 02:19:57 AM : Test Success : > Get Package By ID Test 1 passed! | ||
12/09/24 02:19:57 AM : Test Success : > Get Package By ID Test 2 passed! | ||
12/09/24 02:19:58 AM : Test Success : > Get Package By ID Test 3 passed! | ||
12/09/24 02:19:59 AM : Test Success : > Get Package By ID Test 4 passed! | ||
12/09/24 02:20:00 AM : Test Success : > Get Package By ID Test 5 passed! | ||
12/09/24 02:20:01 AM : Test Success : > Get Package By ID Test 6 passed! | ||
12/09/24 02:20:02 AM : Test Success : > Invalid Package Read Test passed! | ||
12/09/24 02:20:02 AM : Test Result : Total score: 15 / 15 | ||
|
||
12/09/24 02:20:02 AM : Test Start : Running Tests for: Update Package Test Group | ||
12/09/24 02:21:14 AM : Test Result : Total score: 6 / 9 (9 hidden) | ||
|
||
12/09/24 02:21:14 AM : Test Start : Running Tests for: Rate packages Test Group | ||
12/09/24 02:21:21 AM : Test Result : Total score: 9 / 22 (8 hidden) | ||
|
||
12/09/24 02:21:21 AM : Test Start : Running Tests for: Package Cost Test Group | ||
12/09/24 02:21:25 AM : Test Result : Total score: 2 / 3 (3 hidden) | ||
|
||
12/09/24 02:21:25 AM : Test Result : Total score: 47 / 66 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
{ | ||
"Package Cost Test Group": { "Total": "2 / 3 (3 hidden)" }, | ||
"Package Read Test Group": { | ||
"Get Package By ID Test Package 0": 1, | ||
"Get Package By ID Test Package 1": 1, | ||
"Get Package By ID Test Package 2": 1, | ||
"Get Package By ID Test Package 3": 1, | ||
"Get Package By ID Test Package 4": 1, | ||
"Get Package By ID Test Package 5": 1, | ||
"Get Package By ID Test Package 6": 1, | ||
"Get Package By Name Test Package 0": 1, | ||
"Get Package By Name Test Package 1": 1, | ||
"Get Package By Name Test Package 2": 1, | ||
"Get Package By Name Test Package 3": 1, | ||
"Get Package By Name Test Package 4": 1, | ||
"Get Package By Name Test Package 5": 1, | ||
"Get Package By Name Test Package 6": 1, | ||
"Invalid Package Read Test": 1, | ||
"Total": "15 / 15 " | ||
}, | ||
"Rate packages Test Group": { "Total": "9 / 22 (8 hidden)" }, | ||
"Regex Tests Group": { | ||
"Exact Match Name Regex Test": 1, | ||
"Extra Chars Name Regex Test": 1, | ||
"Random String Regex Test": 1, | ||
"Total": "3 / 3 " | ||
}, | ||
"Setup and Reset Test Group": { | ||
"Check No Packages after Reset": 1, | ||
"System Reset Test": 1, | ||
"System Tracks Test": 1, | ||
"Total": "3 / 5 " | ||
}, | ||
"Total": "47 / 66 ", | ||
"Update Package Test Group": { "Total": "6 / 9 (9 hidden)" }, | ||
"Upload Packages Test Group": { | ||
"Get Package Query Test": 1, | ||
"Total": "9 / 9 ", | ||
"Upload Content package 1 via Content": 1, | ||
"Upload Content package 2 via Content": 1, | ||
"Upload Content package 3 via Content": 1, | ||
"Upload Ingest package 1 via Ingest": 1, | ||
"Upload Ingest package 2 via Ingest": 1, | ||
"Upload Ingest package 3 via Ingest": 1, | ||
"Upload Ingest package 4 via Ingest": 1 | ||
}, | ||
"autgrader_run_log": "data/5/run/phase2/autograder_09-12-02-18.log", | ||
"end_time": "2024-12-09 02:21:25.249134", | ||
"run_time": "148.646449 seconds", | ||
"start_time": "2024-12-09 02:18:56.602685", | ||
"system_run_log": "data/5/run/phase2/autograder_09-12-02-18.sysout.log" | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,207 @@ | ||
2024-12-08 22:01:26.437: Initializing: Garbage collection every 30 seconds. | ||
2024-12-08 22:01:26.460: Generation: 1 | ||
Invalid value generator random seed: 1733713300.977223 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733713310.4727457 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733713317.6816976 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733713324.7147758 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733713335.2858202 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733713353.993849 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733713496.7903724 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733713515.7361398 | ||
Setting invalid value generator random seed: 12345 | ||
WARNING: replay request not found in sequence request collection | ||
WARNING: replay request not found in sequence request collection | ||
WARNING: replay request not found in sequence request collection | ||
WARNING: replay request not found in sequence request collection | ||
WARNING: replay request not found in sequence request collection | ||
WARNING: replay request not found in sequence request collection | ||
WARNING: replay request not found in sequence request collection | ||
WARNING: replay request not found in sequence request collection | ||
WARNING: replay request not found in sequence request collection | ||
WARNING: replay request not found in sequence request collection | ||
WARNING: replay request not found in sequence request collection | ||
WARNING: replay request not found in sequence request collection | ||
Invalid value generator random seed: 1733713637.5674589 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733713652.263865 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733713662.6797435 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733713670.6954033 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733713680.3170753 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733713689.085616 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733713698.2061288 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733713707.2123857 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733713715.754318 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733713727.9392803 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733713741.9419618 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733713755.0571845 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733713763.5422947 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733713771.358599 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733713778.7762153 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733713788.3352818 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733713798.0575254 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733713823.10169 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733713848.676053 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733713873.372667 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733713896.3309088 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733713930.5096061 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733713943.1246934 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733713954.2511396 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733713973.7115917 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733714011.875766 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733714037.3637686 | ||
Setting invalid value generator random seed: 12345 | ||
2024-12-08 22:14:05.204: Generation: 2 | ||
Invalid value generator random seed: 1733714047.0961378 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733714070.3159316 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733714088.892552 | ||
Setting invalid value generator random seed: 12345 | ||
2024-12-08 22:17:32.903: Generation: 3 | ||
Invalid value generator random seed: 1733714254.4091916 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733714284.5012422 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733714305.566119 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733714313.0236938 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733714338.6270556 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733714375.846497 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733714542.7480822 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733714574.5533307 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733714630.7272775 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733714657.2931755 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733714681.2806973 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733714694.5436518 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733714704.2453642 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733714714.4134047 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733714725.4602757 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733714736.3566318 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733714747.1739564 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733714763.8643274 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733714938.9560878 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733714964.8271773 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733714973.7194088 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733714982.639661 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733714992.4629946 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733715006.1443434 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733715034.4599023 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733715075.81995 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733715130.518416 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733715168.3579838 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733715217.824214 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733715268.5693486 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733715285.5605826 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733715299.7407176 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733715351.5058122 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733715445.4149847 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733715505.385728 | ||
Setting invalid value generator random seed: 12345 | ||
2024-12-08 22:39:02.076: Generation: 4 | ||
Invalid value generator random seed: 1733715543.5095873 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733715590.6864846 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733715637.940816 | ||
Setting invalid value generator random seed: 12345 | ||
2024-12-08 22:44:19.205: Generation: 5 | ||
Invalid value generator random seed: 1733715860.338029 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733715920.4337397 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733715965.0409153 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733715973.5551622 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733716027.2829173 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733716287.1390471 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733716541.1794906 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733716594.6972299 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733716763.8222082 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733716811.9845316 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733716854.3603723 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733716865.944342 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733716878.2365155 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733716890.103146 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733716901.1527233 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733716913.9331145 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733716925.2433324 | ||
Setting invalid value generator random seed: 12345 | ||
Invalid value generator random seed: 1733716944.8096159 | ||
Setting invalid value generator random seed: 12345 | ||
You pressed Ctrl+C! |
Oops, something went wrong.