-
Notifications
You must be signed in to change notification settings - Fork 2
Backend
$ git clone git@github.com:QEDK/clarity.git
$ cd clarity/backend
$ source env/bin/activate
$ pip3 install -r requirements.txt
$ uvicorn main:app --reload
The server will start running at localhost:8000
and you can access the swagger UI(for testing the REST API) in the address http://localhost:8000/docs
The REST API is developed using FastAPI(with postgresql as our database) keeping in view, the execution speed and speedy development by the framework. FastAPI integrate well with machine learning models and by using asynchronous code execution we can increase the over all performance of our back-end. The REST API is designed for the purpose of uploading new user-journals and returning list of user journal for a particular email and unique URL
The database is designed such that for every unique email, we will have a 36 character long unique URL. For sharing their journals and for knowing about their previous emotions a doctor or therapist can use this URL.
Follow the instructions given here for running the backend locally
Endpoint | Method | Description |
---|---|---|
/api/add_node |
POST | This endpoint will take input as email, journal text and the time at which the user added the journal and create a new row in the databse |
/api/get_node/{email} |
GET | For an email this endpoint will return the list of jorunals from the database |
/api/get_note_from_url/{url} |
GET | For a given url this endpoint will return the list of journals of a perticular user to which this url belongs to |
View the Deployed version here
Copyright (C) 2020 Ajitesh Panda, Ankit Maity Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".