Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/qedk/clarity

Your AI journaling assistant.
https://github.com/qedk/clarity

artificial-intelligence fastapi journaling keras machine-learning python reactjs tensorflow

Last synced: about 5 hours ago
JSON representation

Your AI journaling assistant.

Awesome Lists containing this project

README

        

![clarity](https://socialify.git.ci/QEDK/clarity/image?font=KoHo&forks=1&issues=1&language=1&pattern=Charlie%20Brown&pulls=1&stargazers=1&theme=Light)

As said by Blaise Pascal, "Clarity of minds means clarity of passion" and one's passion make their life worth living.
Inspired by this thought and taking into account the state of mental health in today's date, we decided to work on something that we would find amazing to use.
What if you wanted to remember how you felt a week or two ago? What if you want to know what crossed your mind then?

Presenting **clarity**, your AI journaling assistant. โœจ

## ๐Ÿ™‹ How does it work?
It's simple! Follow these steps:
1. Visit the app and you can pen down something, anything.
2. Follow your emotions, just don't hesitate to dive deep down into it.
3. Write down your emotions truly and that's it!
4. Click on submit and it will be stored as a little secret between us.
5. Want to know about your state of your mind few days back? Don't worry we will show you.
6. Want to share it with someone else or your therapist? We have that too!

## ๐ŸŒ Where can I use it?
Find us on [clarity-frontend.herokuapp.com](https://clarity-frontend.herokuapp.com)!

## ๐Ÿ‘จโ€๐Ÿญ Who are we?
This project was built by Pod 1.1.3 Team 3, [Ajitesh Panda](https://github.com/Ajitesh13), [Preet Shah](https://github.com/shahpreetk), [Sakshi Rambhia](https://github.com/Sakshi16) and [Ankit Maity](https://github.com/QEDK).

## ๐Ÿ’ป Tech stack
`clarity` has a ReactJS frontend โš›๏ธ hosted with Heroku, and a FastAPI backend backed by PostgreSQL hosted on Google Cloud Platform. The UI is based on React, while the Cloud Run backend uses `SQLAlchemy` and `asyncpg` for communicating with Cloud SQL. ๐Ÿ’ฝ

## ๐Ÿ‘จโ€๐Ÿ’ป How do I contribute?
- To get more detailed documentation, please check out our project's [wiki](https://github.com/QEDK/clarity/wiki). ๐Ÿ“–
- Before contributing do go through the [Code of Conduct](https://github.com/QEDK/clarity/blob/master/CODE_OF_CONDUCT.md) ๐Ÿ”ง
- If you find any bugs in the application, or a feature you think would be nice to have, please open an [issue](https://github.com/QEDK/clarity/issues/new/choose). ๐Ÿž
- Please follow the [style guidelines](https://github.com/QEDK/clarity/wiki/Style-guidelines) when making contributions. We have automatic linting set up using GitHub Actions to check all pull requests for syntax and correct labelling. Instructions on running the linter locally can be found below. ๐Ÿ–Œ๏ธ
- Continue reading the rest of the README to get the build instructions for both the frontend and the backend. โ›๏ธ

## ๐Ÿ› ๏ธ Installation
The project can be setup by following these instructions, note that you must have `npm` and `pip` installed before proceeding further. You should ideally also be working in a virtual environment, such as Python's `venv` or the `virtualenv` module.

### ๐Ÿงฐ Configuration
For the default server to work normally, you must have a PostgreSQL instance running on your `localhost` (`127.0.0.1`) on port `5432`. Alternatively, if you're working on Google Cloud Platform with a Cloud SQL connection, you can set `cloud_run_instance=1` environment variable to use that connection instead and set `db_uri` to the entire connection string. You will also need to use the correct PostgreSQL environment variables for `asyncpg` to pick the settings up. โ˜๏ธ

When working locally, environment variables can be set like this in a shell script ๐Ÿ“:
```bash
export db_server=
export db_name=
export db_username=
export db_password=
```

### ๐Ÿงฑ Building dependencies
```bash
$ git clone [email protected]:QEDK/clarity.git
$ cd clarity/ml
$ pip3 install -r requirements.txt
$ cd ../backend
$ pip3 install -r requirements.txt
$ cd ../frontend
$ npm install
```
That's about it. โœ”๏ธ

### โš™๏ธ Running the server
#### ๐Ÿ”™ Backend
```bash
$ cd backend
$ uvicorn main:app --reload
```
Finally, navigate to http://localhost:8080/docs and you should see the Swagger UI API interface to signify that your app is now up and running! โšก

##### ๐Ÿณ Building with Docker
We also provide a `Dockerfile` for easy containerization and deployment of the backend, all you need to do is:
```bash
$ docker build -t 'app:Dockerfile' .
$ docker run app:Dockerfile
```
The server should be accessible on all network interfaces on the port `8080`. โซ

#### โžก๏ธ Frontend
```bash
$ cd frontend
$ npm start
Starting the development server....
The app is running at: http://localhost:3000/
```
And the server should be up and running on http://localhost:3000! ๐Ÿš€

### โ€ผ๏ธ Just tell me about the ML!
Not to fret, the entirety of `ml` module is documented at the respective [README](https://github.com/QEDK/clarity/blob/master/ml/README.md) (since it's quite large) and some more on the wiki. What you need to know - clone the repo, copy the folder, use it as an API. Et voilร !

### ๐Ÿงน Linting
All Python scripts are linted using [flake8](https://flake8.pycqa.org). To lint your files, simply install and run the `flake8` command in the project root and it should pick up the configuration automatically. GitHub Actions will automatically check your PR against `flake8` once submitted and provide helpful annotations in case of logical or stylistic errors. โ„น๏ธ

## ๐Ÿ”œ What's next?
* Integrate our service with direct access to medical professionals. ๐Ÿ‘จโ€โš•๏ธ
* Add analysis of more features to give more information on emotions expressed. ๐Ÿค—
* Provide Spotify recommendations according to emotion analysis. ๐Ÿ’ฌ

Where we want to be:
* An integrated platform for therapists, patients and people willing to track their mental state. ๐Ÿง‘๐Ÿฟโ€๐Ÿคโ€๐Ÿง‘๐Ÿฟ

## ๐Ÿ“œ License
This project is released under a free and open-source software license, Apache License 2.0 or later ([LICENSE](LICENSE) or https://www.apache.org/licenses/LICENSE-2.0). The documentation is also released under a free documentation license, namely the [GFDL v1.3](https://www.gnu.org/licenses/fdl-1.3.en.html) license or later.

### ๐Ÿ–Š๏ธ Contributions
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be licensed as above, without any additional terms or conditions.