Environment Variables File

Create a file named .env in the root of your project with this minimal configuration:

.env

NODE_ENV="development" # production NEXT_PUBLIC_WEB_URL="http://localhost:3000" JWT_SECRET="3VkxI2WUXwXt57wfFomkw2coX6uZ8fl6" SUPERADMINS="[email protected],[email protected]" # Database DATABASE_URL="postgresql://{USER}:{PASS}@localhost:5432/{DB_NAME}?schema=public" # Email EMAIL_HOST= EMAIL_PORT= EMAIL_USER= EMAIL_PASS= EMAIL_FROM= # Google OAuth GOOGLE_CLIENT_ID= GOOGLE_CLIENT_SECRET= GOOGLE_REDIRECT_URI=
VariableDescriptionRequired
NODE_ENVThe environment name (development or production)Yes
NEXT_PUBLIC_WEB_URLThe web URLYes
JWT_SECRETThe secret key for JWT; generated randomlyYes
SUPERADMINSThe superadmins' email addresses (comma-separated)No
DATABASE_URLThe database connection string ¹)Yes
EMAIL_HOSTThe email host ²)No
EMAIL_PORTThe email port ²)No
EMAIL_USERThe email user ²)No
EMAIL_PASSThe email password ²)No
EMAIL_FROMThe email from ²)No
GOOGLE_CLIENT_IDThe Google client ID ³)No
GOOGLE_CLIENT_SECRETThe Google client secret ³)No
GOOGLE_REDIRECT_URIThe Google redirect URI ³)No

You may add more variables as needed. Make sure to keep the file secure and don't commit it to the repository.

Read how to set up each configuration: