In this project, we are using ruby on rails for backend, nextjs for frontend and python script for working with AI related stuff like embeddings, RAG chain etc.
- Ruby 3.3.0
- Python3
- OpenAI API key
- Weaviate account
- Huggingface Account
Install required gems and dependencies
bundle installCreate database and Run migrations
rails db:create
rails db:migrate
rails db:seedStart rails server in 3001 port
rails s -p 3001Install python3:
brew install pythonCheck if python is installed or not
python3 --versionCreate a Python virtual environment:
python3 -m venv venvActivate the virtual environment:
source venv/bin/activate # On Linux/macOS.\venv\Scripts\activate # On WindowsCheck if pip is installed or not:
pip --versionIf pip is not installed, you can install it using the following command:
python3 -m ensurepip --upgradeInstall all the packages mentioned in requirements.txt:
pip install -r requirements.txtGo to the frontend folder to run frontend:
cd nextjs-frontendThis is a Next.js project bootstrapped with create-next-app.
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun devOpen http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.
This project uses next/font to automatically optimize and load Geist, a new font family for Vercel.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.
