A simple phind clone built as a part of a Full Stack Assesment. The app revolves around sending queries to the vector database and storing the queries and responses in a database.
NextJS is used for the frontend. Here the FastAPI servers are used as Python serverless functions in NextJS.
ShadCN is a component library, and Tailwind CSS for seemless reponsive design.
The vector database used is Qdrant, and OpenAI is used for embeddings, MongoDB is used to store the conversations
To set up this project locally, follow these steps:
- Cloning the repository to your local machine
git clone https://github.com/Rahul-Baradol/phind-clone
- Go to the folder named phind-clone and install the dependencies:
cd phind-clone
npm install
- Run the development server:
npm run dev
Here the Nextjs and FastAPI servers run concurrently. When npm run dev
is run, necessary python packages will also be installed. The required python packages could be found in requirements.txt
Also make sure to rename the file .env.template to .env.local and give the following api keys
QDRANT_CLOUD_ENDPOINT
QDRANT_API_KEY
OPENAI_API_KEY
MONGODB_URI
Then hit the endpoint http://localhost:3000/api/status, to confirm if the FastAPI Server is up and running. The expected response is
{
"status": "alive"
}
Thereafter you can go to url http://localhost:3000 to use the actual application.