Skip to content

Commit

Permalink
Merge branch 'main' into serena-more-frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
utselmeg committed Apr 16, 2024
2 parents a522442 + 09b28d1 commit 299500a
Show file tree
Hide file tree
Showing 5 changed files with 6,114 additions and 106 deletions.
34 changes: 28 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ In this project, we aim to enhance students’ course selection experience by au

1. Enter the `backend` directory, create a virtual environment, activate it, and install the dependencies. Make sure you have Python 3.10+ installed.

```bash
cd backend
python -m venv bluebook_env
source bluebook_env/bin/activate
pip install -r requirements.txt
```
```bash
cd backend
python -m venv bluebook_env
source bluebook_env/bin/activate (windows: .\bluebook_env\Scripts\activate)
pip install -r ../requirements.txt
```

2. You will also need to create `.env` in the the `backend` directory that contains your API key to OpenAI and the MongoDB URI. The `.env` file should look like this:

Expand Down Expand Up @@ -109,3 +109,25 @@ python app.py
"response": "To learn more about personal finance, you can start by taking courses or workshops that focus on financial management, budgeting, investing, and retirement planning. Some universities and educational platforms offer online courses on personal finance, such as ECON 436: Personal Finance and ECON 361: Corporate Finance. Additionally, you can explore resources like books, podcasts, and websites dedicated to personal finance advice and tips. It may also be helpful to consult with a financial advisor or planner for personalized guidance on managing your finances effectively."
}
```
## Deployment

The website is hosted using CloudFront distribution through AWS which is routed to a web server running on Elastic Beanstalk. The code for the frontend and backend are contained in two separate S3 buckets. To update the frontend, we run the following script and disable

```cd frontend
export REACT_APP_API_URL=/api
npm run build
aws s3 sync out/ s3://bluebook-ai-frontend --acl public-read
```
To enable continuous syncing of the CloudFront distribution with the frontend-associated S3 bucket we write the following invalidation rule.

```
aws cloudfront create-invalidation --distribution-id bluebook-ai-frontend --paths "/*"
```

For running the Elastic Beanstalk web server, we use the aws EB CLI and run the follow commands in the backend/ folder

```
eb init
eb deploy
```

Loading

0 comments on commit 299500a

Please sign in to comment.