You should have been sent a link to login to an AWS account. Create an IAM user on this account with "AdministratorAccess" and configure the AWS CLI on your local machine to access it by creating an access key and secret key. If you already have the AWS CLI configured for another AWS account you can add these credentials to a new profile. See https://docs.aws.amazon.com/cli/ for information about the AWS CLI.
The example application uses the following resources.
- An Aurora PostgreSQL database, and drizzle ORM to connect to it.
- An S3 Bucket.
- A remix application.
- An api with an endpoint to run migrations.
It uses serverless stack to manage the infrastructure see https://sst.dev/ and https://docs.sst.dev/start/remix
- /drizzle -> configuration for drizzle orm
- /drizzle/migrations -> migrations folder, these are created by running
pnpm migrate
- /functions -> lambda functions
- /app -> the remix application
- /models -> drizzle schema files
- /scripts -> python NLP scripts
- /stacks -> serverless stack infrastructure definitions
- /example_documents -> example pdf files to use for testing
- Clone the repo
- Install the dependencies using
pnpm i
- Deploy the infrastructure using
pnpm sst:dev
. Note that it will be deployed to theus-east-1
region. This requires you to create an IAM user on the AWS account and configure the CLI to access it (see section AWS above). - Call the migrations endpoint to run the migrations on the database. The api url is printed to the console after you run
pnpm sst:dev
in the previous step. The migrations are run by doing aGET
request at the/migrations
endpoint. e.g. openhttps://xwyoqxra1m.execute-api.us-east-1.amazonaws.com/migrate
in a browser - Start the remix app by running
pnpm dev
and view it onlocalhost:3000
The application allows users to create projects on the /create
route in the remix app. Users need to upload a pdf and write a summary about the project. The data scientists in your team have written a script which can automate generating the summary using the pszemraj/pegasus-x-large-book-summary
model which they found on hugging face.
Modify the application so that a user only needs to fill in the project name and upload the file. The summary should get autogenerated by running the script provided.
You can use the sample pdf files in the example_documents
folder for testing.
NOTE: its ok to execute the script in a lambda. Although this won't work in production it works when developing locally on your machine.
see https://d311ynoxc2sp8.cloudfront.net/ for an example of how this should work.
The "Name" on the projects table links to /project/<project_id>
however this route hasn't been implemented. Add route to display the details of the project.