This project is a web application built using Next.js, a React framework with server-rendering capabilities. It can be easily customized and adapted to your needs by following the steps mentioned below.
- ποΈ Architecture Overview
- π Quick Start
- π» Development
- π¨ Build
- π§ͺ Test
- π§βπ» Environment Variables
- π€ Contributing
- π Security
- π License
- π Related Projects
This project uses:
- Next.js with App Router for the frontend framework
- Nx Monorepo for project organization and tooling
- TypeScript for type safety
- Tailwind CSS for styling
- React for building UI components
- NextAuth.js for authentication (optional)
- Node.js >= 22.19.0
- npm >= 11.0.0
npm install
mpn run start
- Node.js >= 22.19.0
- npm >= 11.0.0
- DIAL API access (for backend integration)
-
Clone the repository
git clone https://github.com/epam/statgpt-admin-frontend.git
-
Install Dependencies
npm install
-
Set up env variables
Create
.env
file in the theapps\statgpt-admin-frontend
project directory and add the required variables with appropriate values. These are the only required environment variables. Refer to Environment Variables to learn more.API_URL="ADD_VALUE_HERE" NEXTAUTH_SECRET="ADD_VALUE_HERE"
-
Start Development Environment
npm run start
Once the server is up and running, open http://localhost:4100
in your browser to view the StatGPT Admin application.
npm run build
After running the command, you will see a dist
folder created in your project directory with the optimized output.
To run the unit tests suite for your application, execute the following command:
npm run test
StatGPT Admin uses environment variables for configuration. All environment variables that can be used to configure settings and behavior of the application are included in the .env
file.
Variable | Required | Description | Available Values | Default values |
---|---|---|---|---|
API_URL |
Yes | StatGPT Admin Backend API url. Refer to StatGPT Admin Backend. |
Any string | |
DIAL_API_URL |
Yes | AI DIAL Core API Url. Refer to AI DIAL Core. |
Any string | |
DIAL_API_KEY |
No | AI DIAL Core API Key. Define this variable if authorization using JWT is not configured. Refer to AI DIAL Core to learn how to set up AI DIAL Core and define API keys. |
Any string | |
DISABLE_MENU_ITEMS |
No | List of menu items to hide in the application | Any string |
The table below presents a list of environment variables you can use to configure a specific IDP provider.
NOTE: to test the StatGPT Admin Frontend application in an unauthenticated mode, do not provide any of these variables. The only required variable to launch the application is
NEXTAUTH_SECRET
.
Variable | Required | Description | Available Values | Default values |
---|---|---|---|---|
NEXTAUTH_URL |
Optional. Required for production deployments. |
NextAuth URL | Any string | |
NEXTAUTH_SECRET |
Yes | NextAuth Secret (generate by openssl rand -base64 32 for example) |
Any string | |
AUTH_AUTH0_AUDIENCE |
No | Auth0 Audience | Any string | |
AUTH_AUTH0_CLIENT_ID |
No | Auth0 Client ID | Any string | |
AUTH_AUTH0_HOST |
No | Auth0 Host | Any string | |
AUTH_AUTH0_NAME |
No | Auth0 Name | Any string | |
AUTH_AUTH0_SECRET |
No | Auth0 Secret | Any string | |
AUTH_AUTH0_SCOPE |
No | Auth0 Scope | Any string | openid email profile offline_access |
AUTH_AZURE_AD_CLIENT_ID |
No | A unique identifier for the client application registered in Azure Active Directory (AD). It is used to authenticate the client application when accessing Azure AD resources. | Any string | |
AUTH_AZURE_AD_NAME |
No | A name of the Azure AD tenant. It is used to specify the specific Azure AD instance to authenticate against. | Any string | |
AUTH_AZURE_AD_SECRET |
No | Also known as the client secret or application secret, this parameter is a confidential string that authenticates and authorizes the client application to access Azure AD resources. It serves as a password for the client application. | Any string | |
AUTH_AZURE_AD_TENANT_ID |
No | Tenant ID refers to a globally unique identifier (GUID) that represents a specific Azure AD tenant. It is used to identify and authenticate the Azure AD tenant that the client application belongs to. | Any string | |
AUTH_AZURE_AD_SCOPE |
No | This parameter specifies the level of access and permissions that the client application requests when making a request to Azure AD resources. It defines the resources and actions that the application can access on behalf of a user or itself. | Any string | openid profile user.Read email offline_access |
AUTH_GITLAB_CLIENT_ID |
No | GitLab Client ID | Any string | |
AUTH_GITLAB_HOST |
No | GitLab Host | Any string | |
AUTH_GITLAB_NAME |
No | GitLab Name | Any string | |
AUTH_GITLAB_SECRET |
No | GitLab Secret | Any string | |
AUTH_GITLAB_SCOPE |
No | GitLab Scope | Any string | read_user |
AUTH_GOOGLE_CLIENT_ID |
No | Google Client ID | Any string | |
AUTH_GOOGLE_NAME |
No | Google Name | Any string | |
AUTH_GOOGLE_SECRET |
No | Google Secret | Any string | |
AUTH_GOOGLE_SCOPE |
No | Google Scope | Any string | openid email profile offline_access |
AUTH_KEYCLOAK_CLIENT_ID |
No | Keycloak Client ID | Any string | |
AUTH_KEYCLOAK_HOST |
No | Keycloak Host | Any string | |
AUTH_KEYCLOAK_NAME |
No | Keycloak Name | Any string | |
AUTH_KEYCLOAK_SECRET |
No | Keycloak Secret | Any string | |
AUTH_KEYCLOAK_SCOPE |
No | Keycloak Scope | Any string | openid email profile offline_access |
AUTH_OKTA_CLIENT_ID |
No | Okta Client ID | Any string | |
AUTH_OKTA_CLIENT_SECRET |
No | Okta Client Secret | Any string | |
AUTH_OKTA_ISSUER |
No | Okta domain issuer | Any string | |
AUTH_OKTA_SCOPE |
No | Okta Scope | Any string | openid email profile |
We welcome contributions! Please see our Contributing Guide for details on:
- Code style guidelines
- Testing requirements
- Pull request process
If you discover a security vulnerability, please refer to our Security Policy.
MIT - see the LICENSE file for details.
- StatGPT Backend- StatGPT backend, which implements APIs and main logic of the StatGPT application.
Made by EPAM Systems