Clarity
Advanced ML for Nutritional Analysis and Healthcare Management
Table of Contents
- Getting Started
- Introduction
- Users
- Features
- Functionality
- Tools and Technologies
- Architecture
- Additional Resources
- Project Phase Plan
Getting Started
Install Dependencies
1. `cd ./clarity` - navigate to the clarity root directory
2. `npm init-y` - initialize npm in the clarity root directory
3. `cd ./clarity/client` - navigate to the client directory
4. `npm init-y` - initialize npm in the client directory
5. `npm install @mui/material @emotion/react @emotion/styled redux react-redux axios` - install dependencies
6. `npm install @mui/icons-material` - install material ui icons
7. `cd ./clarity/server` - navigate to the server directory
8. `npm init-y` - initialize npm in the server directory
9. `npm install express pocketbase` - install dependencies
10. `npm install --save-dev nodemon` - install nodemon as a development dependency
11. install [`pocketbase`](https://pocketbase.io/docs/)
12. move `pocketbase` into the `./clarity/backend` directory
Run the Application
1. `cd ./clarity/server` - navigate to the server directory
2. `npm run dev` - start the server
3. open a new terminal window
4. `cd ./clarity/backend/pocketbase` - navigate to the pocketbase directory
5. `./pocketbase serve` - execute the `pocketbase` executable file to start the server
6. open a new terminal window
7. `cd ./clarity/client` - navigate to the client directory
8. `npm start` - start the client
9. `grok http http://localhost:3000` - view the application in the browser
Output from successfully running the Application
##****## `npm run dev` - terminal 1
```bash
> clarity-backend@1.0.0 dev
> nodemon server.js
[nodemon] 3.1.4
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,mjs,cjs,json
[nodemon] starting `node server.js`
server is running on port 5001
```
#### `./pocketbase serve` - terminal 2
```bash
2024/09/19 11:04:40 Server started at http://127.0.0.1:8090
├─ REST API: http://127.0.0.1:8090/api/
└─ Admin UI: http://127.0.0.1:8090/_/
```
#### `npm start` - terminal 3
```bash
Compiled successfully!
You can now view client in the browser.
Local: http://localhost:3000
On Your Network: http://192.168.1.242:3000
Note that the development build is not optimized.
To create a production build, use npm run build.
webpack compiled successfully
```
Package.json
and Dependency Overview
`package.json` provides metadata, dependencies, scripts, configuration, engines, versioning, and repository information for the project.
metadata contains the `name`, `version`, `description`, `main`, `scripts`, `keywords`, `author`, `dependencies`, `devDependencies`, and `license` of the project
when cloning the project and running `npm install`, the dependencies are automatically installed and this ensures that the project has all the necessary libraries to run correctly.
the scripts define custom commands for the project, such as `start`, `build`, `test`, `dev`, by running `npm run Githubissues.
Githubissues is a development platform for aggregating issues.