Skip to content

Latest commit

 

History

History
66 lines (43 loc) · 1.92 KB

README.md

File metadata and controls

66 lines (43 loc) · 1.92 KB

Frontend

Table of Contents

Technologies

Development

Aura.ai's frontend uses Next.js for building an interactive user interface. It is advisable to use Docker for working with the frontend instead of using the development server to ensure a successful deployment as Docker build uses next build than next dev which is responsible for linting and type-checking.

Pre-requisites

  1. Node.js: JavaScript runtime and package management for frontend. Installing Node.js automatically installs npm, required for package management.
  2. Docker: (optional) Supports containerization of frontend for easier deployment.

Steps

Manual

  1. Ensure you have Node.js and Docker (optional) on your system:
node -v
npm -v
docker -v
  1. Install the needed dependencies for the project after cloning the project by the following command:
git clone https://github.com/arunpranav-at/aura.ai
cd aura.ai/frontend
npm i --legacy-peer-deps
  1. Configure the needed environment variables as per .env.sample file

  2. Using the development server is acceptable for faster iterations during local development. Start the development server with the following command:

npm run dev

The frontend should be accessible at https://localhost:3000

  1. Build for production and test it using the following command:
npm run build
npm run start

Docker

  1. Build a Docker image with the following command after configuring the necessary environment variables (assuming you're using aura.ai/frontend as the working directory):
docker build --build-arg NEXT_PUBLIC_BACKEND_URL=$NEXT_PUBLIC_BACKEND_URL -t aura-ai-frontend:latest .
  1. Run the image with the following command:
docker run --network host aura-ai-frontend:latest 

The frontend should be accessible at http://localhost:3000