diff --git a/.env.local.example b/.env.local.example new file mode 100644 index 0000000..788f309 --- /dev/null +++ b/.env.local.example @@ -0,0 +1,13 @@ +# BACK_END_URL: The base URL of the backend API that the Next.js application communicates with. +# Typically used for server-side API calls in your application. Example: http://localhost:8080 +BACK_END_URL= + +# NEXT_PUBLIC_BASE_URL: A publicly exposed base URL for the backend API. +# Variables prefixed with NEXT_PUBLIC_ are exposed to the browser and used for client-side API calls. +# Example: http://localhost:8080 +NEXT_PUBLIC_BASE_URL= + +# AUTH_SECRET: A secret key used by the authentication library (`auth.js`) for securing tokens. +# This was automatically added by running `npx auth`. +# For production, it is recommended to use a securely generated key. Learn more: https://cli.authjs.dev +AUTH_SECRET= diff --git a/README.md b/README.md index 0c08306..f3b4ce8 100644 --- a/README.md +++ b/README.md @@ -89,20 +89,27 @@ And Many More: FlowInquiry leverages various open-source components, including t ### Setup Instructions -**1. Clone the repository:** +#### 1. Clone the repository: ```bash git clone git@github.com:flowinquiry/flowinquiry-frontend.git cd flowinquiry-frontend ``` -**2. Install dependencies** +#### 2. Install dependencies ```bash pnpm install ``` -**3. Configure application parameters** +#### 3. Configure application parameters\* + +To run the FlowInquiry frontend, users need to provide their input in the local configuration file .env.local. FlowInquiry offers two options for creating this configuration file: + +Using Bash Scripts: Users can run provided Bash scripts, which prompt for inputs, validate the information, and then automatically generate the configuration file. +Editing a Template Manually: A template configuration file (.env.local.example) is provided, allowing users to manually edit and create their .env.local file. This option is recommended for users who cannot run Bash scripts. + +##### 3.1 Creating config file using script Set up the application environment variables by running the following script: @@ -118,6 +125,10 @@ BACK_END_URL=http://localhost:8080 We recommend running the `scripts/all.sh` script, as it streamlines the process by checking your environment settings and performing all necessary configurations, removing the need to execute multiple scripts manually. +##### 3.2 Edit config file manually + +Rename the file [.env.local.example](./.env.local.example) to .env.local, and edit the file content per instructions inline + **4. Start the development server** ```bash