ChatSNC is a chatbot designed to interact with users on the college website. The frontend of the project is built using Vue.js, a progressive JavaScript framework known for its adaptability and versatility. The backend is developed using FastAPI, a modern, high-performance web framework for building APIs with Python based on standard Python type hints.
- Node.js
- Python 3.11 (Important)
- pip
- venv
To install the project, follow these steps:
-
Clone the repository to your local machine.
-
Navigate to the frontend directory and run
npm install
to install the frontend dependencies. -
Navigate to the backend directory and create a virtual environment with
python3.11 -m venv venv
. -
Activate the virtual environment with
source venv/bin/activate
(Linux/Mac) orvenv\Scripts\activate
(Windows). -
Install the backend dependencies with
pip install -r requirements.txt
. -
Create a
.env
file in the frontend directory and add the following variable:VITE_API_ENDPOINT
: the URL of the backend API endpoint
-
Create a
.env
file in the backend directory and add the following variables:-
DATABASE_HOSTNAME
: the hostname of the PostgreSQL database -
DATABASE_PORT
: the port number of the PostgreSQL database -
DATABASE_NAME
: the name of the PostgreSQL database -
DATABASE_USERNAME
: the username for the PostgreSQL database -
DATABASE_PASSWORD
: the password for the PostgreSQL database -
SECRET_KEY
: a secret key forJWT tokens -
ALGORITHM
: the algorithm used for generating and verifying JWT tokens -
ACCESS_TOKEN_EXPIRE_MINUTES
: the expiration time for the JWT tokens in minutes -
OPENAI_API_KEY
: the API key for the OpenAI service -
APP
:Indicating whether the app is in development or production mode
-
To run the project, follow these steps:
-
Navigate to the frontend directory and run
npm run dev
to start the frontend development server. -
Navigate to the backend directory and run
uvicorn app.main:app --reload
to start the backend development server. -
Open your browser and go to
http://localhost:5173
to access the web app.