GuilhermeSCampos / lexrart-fullstack-test

Home Page:https://lexrart-fullstack.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

💻 Lexart - Web ChatBot

📃 About

This project aims to develop a web chatbot that responds to certain terms


In addition to being able to install and run the project locally, you can also interact with this online deploy made with vercel

‼️ As the deployment is done in a free plan, the first requests as the register and login may take a while to load. ‼️


And you can also check the API in this deploy performed in Render

Optus1 Optus2



🔧 Tools Used

Frontend

  • JavaScript
  • React.js
  • Tailwind.css
  • Vite
  • React Router
  • Lucide icons
  • React Loading Components
  • React Context

Backend

  • Node.js
  • Express.js
  • Cors
  • Zod
  • TypeORM
  • PostgreSQL
  • bcryptjs

🛠️ Installation and Execution

Running the Application Locally
To run this application locally, you need to have **Git**, **Node**, and **PostgreSQL** installed and updated on your computer.
🔨 Setting up the Back-end
  1. Clone the repository

    • Use the command: git clone git@github.com:GuilhermeSCampos/lexrart-fullstack-test.git.
    • Enter the repository folder you just cloned:
      • cd lexrart-fullstack-test
  2. Enter the Backend folder

    • cd back-end
  3. Install the dependencies

    • npm install
    Setting up the Database and .env

    The project is configured to run on a PostgreSQL database, so you need to install PostgreSQL on your computer or use a cloud server. After configuring the database, you need to set the environment variables:

1. In a .env file in the repository root, add your PostgreSQL database settings:

DB_HOST=
DB_NAME=
DB_USER=
DB_PASSWORD=
DB_PORT=

2. In the same .env file, set the desired port for the Express server and the JWT secret:

PORT=
JWT_SECRET=

3. After filling in the .env data to connect to the database, run migrations to populate the database:

  • npm run migration:generate only if you don't have the migration yet
  • npm run migration:run

4. Finally, after all configurations, start the server using this command in the back-end directory:

  • npm run dev
🌅 Setting up the Front-end
  1. Access the repository - cd lexrart-fullstack-test

  2. Enter the Frontend folder

  • cd front-end
  1. Install the dependencies
  • npm install
Setting up environment variables

The Frontend project is configured to make various requests to an API, and the API address will change depending on how you run the project. Therefore, you need to set the environment variables:

1. In a .env file in the repository root, add your API address settings as shown below:

VITE_API_URL=https://lexart-back-end.onrender.com

2. Finally, after all configurations, start the server using this command in the frontend directory:

  • npm run dev

About

https://lexrart-fullstack.vercel.app


Languages

Language:JavaScript 58.0%Language:TypeScript 37.0%Language:CSS 4.4%Language:HTML 0.6%