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.
- Node.js: JavaScript runtime and package management for frontend. Installing Node.js automatically installs
npm
, required for package management. - Docker: (optional) Supports containerization of frontend for easier deployment.
- Ensure you have Node.js and Docker (optional) on your system:
node -v
npm -v
docker -v
- 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
-
Configure the needed environment variables as per
.env.sample
file -
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
- Build for production and test it using the following command:
npm run build
npm run start
- 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 .
- Run the image with the following command:
docker run --network host aura-ai-frontend:latest
The frontend should be accessible at http://localhost:3000