Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/qedk/clarity
- Owner: QEDK
- License: apache-2.0
- Created: 2020-11-03T11:03:57.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T11:46:04.000Z (almost 2 years ago)
- Last Synced: 2024-05-01T15:26:18.735Z (6 months ago)
- Topics: artificial-intelligence, fastapi, journaling, keras, machine-learning, python, reactjs, tensorflow
- Language: JavaScript
- Homepage: https://clarity-frontend.herokuapp.com
- Size: 142 MB
- Stars: 6
- Watchers: 1
- Forks: 2
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
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.