Dataki is an app that allows you to generate analytics reports for your data. It is a tool that allows you to connect to your data sources, and generate reports with the help of AI.
You can find the live demo at https://app.dataki.ai.
To run the project locally you need to run at least the frontend (and connect to the deployed backend).
Or you can also run the frontend and the backend locally.
We want to make it as easy as possible for you to run the project, so we have included the instructions to run both the frontend and the backend in this README.
This repository should have all the config files correctly set up, so you should be able to run the project without any additional configuration. However we include the steps to configure the project with a different Google Cloud project, in case you want to use your own project.
This is the frontend for the Dataki project. It is a React application that uses some of the components from the FireCMS project.
IMPORTANT: By default the project will use the Firebase project datatalk-443fb
, and connect to it's deployed
Cloud functions and Firestore. If you run the project locally, or use a different project you can change the API endpoint in the .env
file.
If you want to use a different project, make sure to change the Firebase config in src/firebase_config.ts
.
It is connecting by default to the backend of this demo project, which is hosted
at https://datakiapi-4mgflsd2ha-ey.a.run.app
.
Change directory to the app
folder:
cd app
Install the dependencies (you need to force the install because of the 19-rc react
version):
npm i --force
And run the project locally:
npm run dev
(alternatively you can use yarn
and yarn dev
)
Make sure you update your package.json
build
script with the correct
project name. Then run:
npm run build
You can change the API endpoint in the .env
file. By default it is set to the deployed backend of this project.
Note: these are instructions to setup a completely new project. You can use our demo project too, for which you will need a SA key. Feel free to reach us at [email protected] if you need it!
You need a Google Cloud project with the following services enabled:
- Firebase
- Firestore
- Cloud Functions
- Vertex AI
- Oauth2 API
-
Change directory to the
functions
folder:cd functions
-
Run
npm install
-
Create a service account to run locally.
To run, create a service account for the App Engine default service account and download the JSON file. Then, set the environment variable
GOOGLE_APPLICATION_CREDENTIALS
to the path of the JSON file.Example:
export GOOGLE_APPLICATION_CREDENTIALS=/Users/developer/dataki-hackathon/sample-service-account.json
-
Go to .firebaserc and change the default project to your project id
-
Go to functions/ and copy .env.template to .env and set up the GEMINI API KEY
- You need a firebase project
- Enable and configure firebase auth
- Enable and configure firestore
- Enable and configure IAM Service Account Credentials API, https://console.developers.google.com/apis/api/iamcredentials.googleapis.com/overview?project=PROJECT_ID
- Enable Vertex AI Studio and Vertex AI API, https://console.cloud.google.com/vertex-ai/generative?referrer=search&project=PROJECT_ID and https://console.cloud.google.com/apis/library/aiplatform.googleapis.com?project=PROJECT_ID
- Add Vertex AI permissions to default service account, https://console.cloud.google.com/iam-admin/iam?project=PROJECT_ID
Run the backend locally with
npm run serve
Deploy the backend with
npm run deploy