Skip to content

Latest commit

 

History

History
103 lines (73 loc) · 5.16 KB

README.md

File metadata and controls

103 lines (73 loc) · 5.16 KB

App

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.

Frontend Interface

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:

image

The chat session:

image

Backend Service

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:

3e725c2d56915c5498715bdbb4dbb77 993d09a705a4d79b42e3448f2d76f0f 9d6c2e387d7b385672bf5acdf0abbca 3588f8c7e28f6d92de1b5f73e249a2c

Continuous Integration Setup

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
3aad8e54105929421e7b67ceeb2370d 2f56489e8d7674bf0a61451b42b5c34

We have also configured the dependabot to automatically update the dependencies of our codebase and perform security checks.

Automated Test Implementation

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.

image