Make sure you are under the current directory and that you have veritas-trial-service.json
under the /secrets/
directory. To build and run our application locally, simply run:
make
This command composes the backend and the frontend. This also requires proper access to the remotely deployed ChromaDB service. The frontend interface will be available at http://localhost:8080, and the backend service will be available at http://localhost:8001.
Alternatively, for development purposes, you may start the frontend and the backend separetely, First install necessarily dependencies. Make sure you have node
and pnpm
ready for the frontend, and pipenv
ready for the backend. Run:
make devinstall
Then in two different terminals, run the following two commands to start the frontend and the backend separately:
make devfrontend
make devbackend
The make devfrontend
command relies on the Vite server that supports live reload which makes frontend development much easier. The make devbackend
builds the backend Docker container and starts its service.
Note
Our frontend interface is temporarily deployed at: https://34.57.211.196.sslip.io/. The deployment will be removed after the end of the semester.
Our frontend is build with React and TypeScript with the Vite framework. As follows is the structure of our frontend:
├── public/ > Public assets
├── src
│ ├── components/ > React functional components
│ ├── api.ts > Wrappers for backend API calls
│ ├── App.tsx > Main application
│ ├── consts.ts > Constants
│ ├── global.css > Global style sheet
│ ├── main.tsx > Application entrypoint
│ ├── types.ts > Type definitions
│ ├── utils.ts > Utility functions
│ └── vite-env.d.ts
├── .dockerignore
├── .prettierignore
├── Dockerfile
├── eslint.config.js
├── index.html
├── package.json
├── pnpm-lock.yaml
├── tsconfig.app.json
├── tsconfig.json
├── tsconfig.node.json
└── vite.config.ts
The retrieval panel:
The chat session:
Note
Our backend service is temporarily deployed at: https://34.57.211.196.sslip.io/api/. The deployment will be removed after the end of the semester.
Our backend is built with FastAPI in Python. As follows are the API specifications:
We have continuous integration triggered per pull request targeting the main branch and per merged commit to the main branch. This includes:
- Building: Test that the images for the application can be successfully built.
- Formatting and Linting: Check formatting and linting of the codebase to ensure code quality. This applies to both the frontend and the backend. The backend uses black for formatting, ruff for linting, and mypy for static type checking. The frontend uses prettier for formatting, and eslint and typescript-eslint for linting and type checking.
- Testing: Test the codebase (backend only) and generate coverage report.
CI success on merging to main | CI success on PR targetting main |
---|---|
![]() |
![]() |
We have also configured the dependabot to automatically update the dependencies of our codebase and perform security checks.
To run our backend test suite, you need to create a local development environment. Run the following:
make devtest
make devtestcov # Also generate coverage report
We use pytest for testing and coverage.py for coverage report.