This repository contains a web application with a frontend built using Next.js and React, and a backend developed in Flask. The frontend and backend are organized in separate directories and can be run independently.
root/
│
├── ava-backend/ # Backend (Flask)
│ ├── __init__.py
│ ├── app.py
│ ├── constants.py
│ ├── handlers.py
│ ├── llm.py
│ ├── routes.py
│ ├── requirements.txt
│ ├── test/
│ │ ├── __init__.py
│ │ ├── test_app.py
│ │ ├── test_handlers.py
│ │ ├── test_llm.py
│ │ └── test_routes.py
│ └── venv/ # Virtual environment
│
└── ava-frontend/ # Frontend (Next.js + React)
├── README.md
├── components.json
├── next-env.d.ts
├── next.config.mjs
├── package-lock.json
├── package.json
├── pnpm-lock.yaml
├── postcss.config.mjs
├── public/
├── src/
│ ├── components/
│ ├── lib/
│ ├── pages/
│ ├── styles/
│ └── utils/
└── tailwind.config.ts
└── tsconfig.json
-
Navigate to the
ava-frontend
directory:cd ava-frontend
-
Install dependencies:
pnpm install
-
Start the development server:
pnpm run dev
The frontend will be available at
http://localhost:3000
.
Make sure to have .env
file in you root directory with all the required enviorment variable listed in .env.sample
-
Navigate to the
ava-backend
directory:cd ava-backend
-
Create a virtual environment (if not already created):
python -m venv venv
-
Activate the virtual environment:
- On macOS/Linux:
source venv/bin/activate
- On Windows:
venv\Scripts\activate
- On macOS/Linux:
-
Install dependencies:
pip install -r requirements.txt
-
Start the Flask application:
python app.py
The backend will be available at
http://localhost:5000
.
-
Ensure the virtual environment is activated.
-
Run the tests:
pytest