yarn install
This project uses Prettier
for code formatting to maintain consistent style across all JavaScript and TypeScript files.
Husky
is used as a pre-commit hook. It automatically formats the code and adds the changes to the commit if any formatting inconsistencies are found.
You will need to run the Django backend. Once that is running, specify its URL in the .env
under
NEXT_PUBLIC_BACKEND_URL=<url of django backend>
Next, generate a security secret using https://generate-secret.vercel.app/32
and set it in
NEXTAUTH_SECRET=<secret>
Finally, select an available port on your system and define the URL for this frontend
NEXTAUTH_URL=http://localhost:<port>
Now you can start the application
yarn dev
Open http://localhost:<port>
with your browser to see the result.
Refer to this guide
Make sure you have docker and docker compose installed.
- Install docker
- Install docker compose
All the variables with NEXT_PUBLIC prefix need to be added to the build command. This is because we are running the application as standalone mode
docker build -f Docker/Dockerfile --build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') --build-arg NEXT_PUBLIC_BACKEND_URL="<url of django backend>" -t dalgo_frontend:0.1 .
docker compose -f Docker/docker-compose.yaml --env-file .env up