This guide will help you to set up and run the project, which consists of two main parts: the API backend and the frontend. Follow the steps below to get everything up and running.
Ensure you have the following installed on your machine:
-
Download Ollama, and run it on your local machine. Download ollama models from https://ollama.com/models
ollama serve
-
Navigate to the
api
directory:cd api
-
Install the dependencies:
npm install
or if you prefer yarn:
yarn install
-
Navigate to the
frontend
directory:cd ../frontend
-
Install the dependencies:
npm install
or if you prefer yarn:
yarn install
-
Navigate to the
api
directory if not already there:cd api
-
Start the API server:
npm run start:dev
or if you prefer yarn:
yarn start:dev
-
The API server should now be running on http://localhost:7010.
-
Swagger http://localhost:7010/api
-
Navigate to the
frontend
directory if not already there:cd ../frontend
-
Start the frontend development server:
npm run dev
or if you prefer yarn:
yarn dev
-
The frontend development server should now be running on http://localhost:5173 or 5174.
The project is divided into two main parts:
- api: Contains the backend code built with NestJS.
- frontend: Contains the frontend code built with Vite and React.
dist
: Compiled codenode_modules
: Dependenciessrc
: Source codetest
: Test filespackage.json
: NPM configuration filetsconfig.json
: TypeScript configuration file
node_modules
: Dependenciespublic
: Static assetssrc
: Source codepackage.json
: NPM configuration filetsconfig.json
: TypeScript configuration filevite.config.ts
: Vite configuration file
If you encounter issues during installation or running the project, try the following steps:
-
Ensure all prerequisites are installed and updated.
-
Delete the
node_modules
directory and thepackage-lock.json
oryarn.lock
file, then reinstall dependencies:rm -rf node_modules package-lock.json npm install
or for yarn:
rm -rf node_modules yarn.lock yarn install
-
Check for specific error messages and consult the respective documentation for Node.js, npm, yarn, NestJS, Vite, or React.
If problems persist, feel free to open an issue on the project's repository or contact the maintainers.