Please ensure the following software / packages are available in your development environment.
DockerPython (version 3.13)node.js (version 23.5.0)The application uses various cloud providers
CloudFlare account (Free plan)Firebase account (Free plan)Optional
uv (The application uses it for package management. Alternatively, a requirements.txt file is available to install dependencies with the pip command.)
Azure Cloud account (Used for creating a SQL database to store user details during authentication, Free tier)
CloudAMQP account (For a cloud RabbitMQ instance, Free plan)
Note: The application is developed with a M1 Macbook. As such, there might be slight discrepencies in commands used when building on other systems.
Instructions will be divided into 2 sections - backend and frontend. Please use separate terminal windows for each section.
expert-octo-backend directorycd expert-octo-backend`
It is recommended to install the libraries after creating and activating a virtual environment. To follow along, please ensure that
uvis installed.
uv sync
uv pip install docling --extra-index-url https://download.pytorch.org/whl/cpu
uv pip install spacy-layout
uv run -- spacy download en_core_web_trf
uv run -m nltk.downloader punkt_tab
.env.example to .envRABBITMQ
To run the app locally, there are 2 ways to get a rabbitmq instance.
Docker method
Run the following docker command:
docker run -d -p 5672:5672 rabbitmq
In the .env file:
RABBITMQ=”pyamqp://guest@localhost//”
CloudAMQP method
Create New Instance buttonRabbitMQ instance.AMQP details section.env file’s RABBITMQ fieldR2
Add buttonR2 Storage bucket and fill in the required details.env file, fill in the last 3 R2 fields with the names of the 3 newly created bucketR2 Storage bucket page, please find the Account Details section and click on the Manage buttonR2 fields of the .env file (Please note that an Account API token needs to be created to obtain the secret access key value)The application might encounter errors due to the CORS. Please ensure that the urls of the backend and frontend are ‘allowed’ in the
CORS PolicyofR2 Storage Bucketsettings page
SERVICE_ACCOUNT
Firestore projectFirestore Database, the database should be named: papers (Other names can be used. However, it requires a code change in the shared/firestore.py file).json file will be provided. Please download this file and saved it in a secured location.json file into SERVICE_ACCOUNT field of the .env file (put ‘’ around the content)Celeryuv run celery -A tasks worker --pool=solo --loglevel=info
FastAPI server
In a separate terminal window, run the following:cd app
uv run fastapi dev main.py`
expert-octo-frontend directorycd expert-octo-frontend`
npm i
.env.example to .envBETTER_AUTH_SECRET
Generate a secret key by visiting the better-auth documentation page
In the .env file:
BETTER_AUTH_SECRET=[generated secret key]
GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET
Follow the guide provided by better-auth to obtain and setup Google Credential authentication
AZURE_SQL values
Follow the guide provided by Azure to spin up an Azure SQL database and fill in the fields required in the .env file
next.js development server
npm run dev
The web app will be served at http://localhost:3000








