You can download the dataset from the following link:
First, clone the repository to your local machine:
git clone https://github.com/foxminchan/LawKnowledgeNext, navigate to the root directory of the project and install the dependencies:
pnpm install --forceFor the website, you can run the following command:
npx nx serve website --prodFor the API, you can run the following command:
# For the API Gateway
npx nx serve api-gateway --prod
# For the Auth Service
npx nx serve auth-svc --prod
# For the Law Service
npx nx serve law-svc --prod
# For the Search Service, navigate to the search-svc directory
npx nx build search-svc && cd apps/api/search-svc/search-svc && python main.py
# For the Chat Service, navigate to the chat-svc directory
npx nx build chat-svc && cd apps/api/chat-svc/chat-svc && python main.pyTo traning the model, you can run the following command:
npx nx build bert && cd apps/nlp/bert/bert && python main.pyTo set up the infrastructure, you can run the following command:
npx nx up pulumiImportant
If you want to run with Nx, make sure you have installed `poetry` globally. Python version must be `>=3.9.1 <=3.12`.
For the website, you can run the following command:
npx nx test website-e2eFor the API, you can run the following command:
# For the Auth Service
npx nx test auth-svc-e2e
# For the Law Service
npx nx test law-svc-e2e
# For the Search Service
npx nx test search-svc-e2e
# For the Chat Service
npx nx test chat-svcTo test the model, you can run the following command:
npx nx test bertTo run the tooling for processing the dataset, you can run the following command:
npx nx build processor && cd apps/nlp/processor/processor && python main.pyFor running documentation, you can run the following command:
npx nx serve docsFor running the Diagram as Code, you can run the following command:
npx nx build dac && cd assets/dac/dac && python main.pySome useful scripts:
# Navigate to the scripts directory
cd tools/scripts && ls
# + scripts
# +-- build.sh --> Build the project
# +-- clean.sh --> Clean the docker image
# +-- init.sh --> Initialize the project
# +-- prepare.sh --> Prepare the project
# +-- start.sh --> Start the project
# +-- start-o11y.sh --> Start the observability stack
# +-- stop-o11y.sh --> Stop the observability stack
# Run the script
./<script-name>You can see the dependency graph of the project by running the following command:
npx nx dep-graphHere is the dependency graph of the project:
We are excited that you are interested in contributing to this project! Before submitting your contribution, please make sure to take a moment and read through the following guidelines:
Read through our contributing guidelines to learn about our submission process, coding rules, and more.
Want to report a bug, contribute some code, or improve the documentation? Excellent! Read up on our guidelines for contributing and then check out one of our issues labeled as help wanted or good first issue.
Help us keep Law Knowledge open and inclusive. Please read and follow our Code of Conduct.
This project is licensed under the terms of the MIT license.