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
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
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
-
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
- Use the command:
-
Enter the Backend folder
cd back-end
-
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:
DB_HOST=
DB_NAME=
DB_USER=
DB_PASSWORD=
DB_PORT=
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 yetnpm 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
-
Access the repository -
cd lexrart-fullstack-test
-
Enter the Frontend folder
cd front-end
- 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:
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