Skip to content

Repository files navigation

Phlama App

This is the repository for Phlama App.

Run the application in development mode:

  1. Recommended Machine OS: Linux or MacOS. For Windows users use wsl.

  2. First we need to install Node.JS in the machine. Use the nvm package manager to install Node.JS.

  3. Install nvm in the machine locally: Install NVM

  4. After installing nvm run this command to install and use the proper version of Node.JS for Phlama App.

    nvm install
  5. After installing Node.JS install pnpm by running:

    npm install --global corepack@latest
    corepack enable pnpm
  6. To run the application in development mode we need to install turbo globally in the machine.

    pnpm add turbo --global
  7. Install all the dependencies:

    pnpm install
  8. Create environment variables file .env.local for apps/web app with these values:

    NEXT_PUBLIC_CONVEX_URL=<NEXT_PUBLIC_CONVEX_URL>
    NEXT_PUBLIC_CLERK_FRONTEND_URL=<NEXT_PUBLIC_CLERK_FRONTEND_URL>
    NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=<NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY>
    CLERK_SECRET_KEY=<CLERK_SECRET_KEY>
    NEXT_PUBLIC_CLERK_SIGN_IN_URL=<NEXT_PUBLIC_CLERK_SIGN_IN_URL>
    NEXT_PUBLIC_CLERK_SIGN_UP_URL=<NEXT_PUBLIC_CLERK_SIGN_UP_URL>
    NEXT_PUBLIC_CLERK_SIGN_IN_FALLBACK_REDIRECT_URL=<NEXT_PUBLIC_CLERK_SIGN_IN_FALLBACK_REDIRECT_URL>
    NEXT_PUBLIC_CLERK_SIGN_UP_FALLBACK_REDIRECT_URL=<NEXT_PUBLIC_CLERK_SIGN_UP_FALLBACK_REDIRECT_URL>
    SENTRY_AUTH_TOKEN=<SENTRY_AUTH_TOKEN>
  9. Create environment variables file .env.local for apps/widget app with these values:

    NEXT_PUBLIC_CONVEX_URL=<NEXT_PUBLIC_CONVEX_URL>
  10. Create environment variables file .env.local for packages/backend package with these values:

    CONVEX_DEPLOYMENT=<CONVEX_DEPLOYMENT>
    CONVEX_URL=<CONVEX_URL>
    CONVEX_SITE_URL=<CONVEX_SITE_URL>
    CLERK_FRONTEND_API_URL=<CLERK_FRONTEND_API_URL>
    CLERK_JWT_ISSUER_DOMAIN=<CLERK_JWT_ISSUER_DOMAIN>
    CLERK_SECRET_KEY=<CLERK_SECRET_KEY>
    CLERK_WEBHOOK_SECRET=<CLERK_WEBHOOK_SECRET>
    OPENAI_API_KEY=<OPENAI_API_KEY>
    AWS_ACCESS_KEY_ID=<AWS_ACCESS_KEY_ID>
    AWS_SECRET_ACCESS_KEY=<AWS_SECRET_ACCESS_KEY>
    AWS_REGION=<AWS_REGION>
  11. After all the steps run the Phlama App locally:

    turbo dev
  12. Build all the applications locally:

    turbo build

Build the embed script:

  1. In the apps/embed app if we are updating the embed script then we need to run this command to generate the JavaScript code to serve from the CDN:

    VITE_WIDGET_URL=https://phlama-app-widget.vercel.app/ pnpm build
  2. Then we need to rename the generated widget.iife.js to widget.js.

  3. After that place the widget.js in the apps/widget/public folder.

About

The next generation AI customer support application.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages