Next.js frontend for NovaBuddy — an AI-powered study buddy. Upload lecture materials (PDF, Word, PowerPoint, text) and get summaries, quizzes, and an interactive Q&A chatbot powered by Amazon Nova via the NovaBuddy backend.
- Node.js 18+ and npm
- A deployed NovaBuddy backend (see below)
This app talks to the NovaBuddy API. Deploy the backend and get its outputs before running the frontend.
-
Clone and deploy the backend:
git clone https://github.com/Neelpatel1604/NovaBuddy.git cd NovaBuddy/terraform cp terraform.tfvars.example terraform.tfvars # Edit terraform.tfvars if needed terraform init terraform plan terraform apply
-
Note the Terraform outputs — you will need them for the frontend:
api_url— base URL of the HTTP APIcognito_user_pool_id— Cognito User Pool IDcognito_client_id— Cognito App Client IDs3_bucket_name— S3 uploads bucket name
See NovaBuddy for full backend setup, Bedrock access, and creating a test user.
-
Clone and install:
git clone <this-repo-url> cd novabuddyfrontend npm install
-
Create a
.envfile in the project root and fill it with values from your backend deployment (and your AWS credentials for the documents fallback):# From Terraform outputs (NovaBuddy backend) NEXT_PUBLIC_AWS_REGION=us-east-1 NEXT_PUBLIC_API_BASE_URL=https://YOUR_API_ID.execute-api.us-east-1.amazonaws.com NEXT_PUBLIC_COGNITO_USER_POOL_ID=us-east-1_XXXXXXXXX NEXT_PUBLIC_COGNITO_USER_POOL_CLIENT_ID=xxxxxxxxxxxxxxxxxxxxxxxxxx NEXT_PUBLIC_S3_BUCKET_NAME=novabuddy-xxxx-uploads # Optional: only if you use the generated-bucket feature NEXT_PUBLIC_S3_BUCKET_GENERATED_NAME=novabuddy-xxxx-generated # AWS credentials from an IAM user that has S3 permissions (at minimum s3:PutObject, s3:DeleteObject, s3:ListBucket) on the uploads bucket. # Create this IAM user, attach an S3 policy with those actions, then generate an access key and secret and paste them here. NEXT_PUBLIC_AWS_ACCESS_KEY_ID=AKIA... NEXT_PUBLIC_AWS_SECRET_ACCESS_KEY=...
Example with placeholders:
Variable Where to get it NEXT_PUBLIC_AWS_REGIONSame region as your Terraform deploy (e.g. us-east-1)NEXT_PUBLIC_API_BASE_URLTerraform output api_urlNEXT_PUBLIC_COGNITO_USER_POOL_IDTerraform output cognito_user_pool_idNEXT_PUBLIC_COGNITO_USER_POOL_CLIENT_IDTerraform output cognito_client_idNEXT_PUBLIC_S3_BUCKET_NAMETerraform output s3_bucket_nameNEXT_PUBLIC_AWS_ACCESS_KEY_IDIAM user/role with S3 read access to the uploads bucket NEXT_PUBLIC_AWS_SECRET_ACCESS_KEYSame IAM credentials -
Run the dev server:
npm run dev
-
Open http://localhost:3000, sign up or sign in (confirm the user in Cognito if needed), then upload a lecture and use the dashboard.
Copy this to .env and replace the placeholders with your backend and AWS values:
# Region (must match backend)
NEXT_PUBLIC_AWS_REGION=us-east-1
# From Terraform outputs after deploying https://github.com/Neelpatel1604/NovaBuddy
NEXT_PUBLIC_API_BASE_URL=https://xxxxxxxxxx.execute-api.us-east-1.amazonaws.com
NEXT_PUBLIC_COGNITO_USER_POOL_ID=us-east-1_XXXXXXXXX
NEXT_PUBLIC_COGNITO_USER_POOL_CLIENT_ID=xxxxxxxxxxxxxxxxxxxxxxxxxx
NEXT_PUBLIC_S3_BUCKET_NAME=novabuddy-xxxxxxxx-uploads
# Optional
NEXT_PUBLIC_S3_BUCKET_GENERATED_NAME=novabuddy-xxxxxxxx-generated
# AWS credentials for /api/documents (S3 list fallback)
NEXT_PUBLIC_AWS_ACCESS_KEY_ID=AKIAXXXXXXXXXXXXXXXXXX
NEXT_PUBLIC_AWS_SECRET_ACCESS_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxnpm run dev— start development servernpm run build— build for productionnpm run start— run production server
Backend repo: Neelpatel1604/NovaBuddy — serverless API (Lambda, API Gateway, Cognito, S3, DynamoDB, Bedrock Nova). Deploy it first and use its outputs in this app’s .env.