-
Notifications
You must be signed in to change notification settings - Fork 0
Dashboard Component
The Dashboard Component is the component where clients manage their repos.
It consists of a Dashboard UI, a Dashboard API, an Auth Service, and a Database.
- The Dashboard UI authenticates the client through the Auth Service, which gives it a JWT Token to use for authorization on all subsequent requests to the Dashboard API
- The Dashboard UI talks to the Dashboard API to create, read, update, and delete data. Data is persisted in the Databases (Dashboard DB and Model Store)
The Dashboard UI is the user interface where clients manage their repos. From here they can learn about and use Explora.
It is built with React and hosted in S3 at https://beta.dataagora.com. The source code can be found in the dashboard-ui GitHub repo.
No CI/CD. To manually deploy, run npm run build-and-deploy
on CLI.
The Dashboard API is the backend for the Dashboard UI. It supports functions such as:
- Creating a repo (and deploying the latest version of the Cloud Node that will be related to this repo)
- Viewing a list of repos that the logged in user has access to
- Viewing the details of a singular repo, such as
- Title, details
- Cloud Node status
- Models trained (and downloading them)
- Logs
- Creating API Keys for a repo (automatic upon repo creation)
See Dashboard API's Endpoints page.
The Dashboard API is built with Python + Flask + Serverless and hosted in AWS Lambda (region: us-west-1) at https://mf1cxij8x6.execute-api.us-west-1.amazonaws.com/dev/. The source code can be found in the dashboard-api GitHub repo.
The Dashboard API can scale very well because it's deployed in Lambda and it's stateless.
There isn't CI/CD for this service yet.
To manually deploy, run sls deploy
on CLI.
All endpoints of the Dashboard API require a JWT Token to be sent in the HTTPS Requests. This token is validated at the very beginning of the request and then the contents are checked whenever appropriate (e.g., the token gets validated to make sure the request comes from a valid user and then the user authenticated through the token is checked to see what permissions they have).
The Auth Service is build with Python + Django. It uses JWT tokens.
It's hosted in AWS Elastic Beanstalk at https://eauth.dataagora.com. The code can be found in the auth-service GitHub repo. The user data is persisted in an AWS RDS attached to the Beanstalk environment.
To access the endpoints documentation of this service, access the admin panel with valid credentials (see Trello's "IMPORTANT" list) and then go to https://eauth.dataagora.com/docs/.
No CI/CD. To manually deploy, run eb deploy
on CLI.
The security of this service is inherent from Django.
The Database is where the user metadata, repos, API Keys, logs, and models get stored. It consists of two components: a few DynamoDB tables and an S3 bucket.
The DynamoDB tables are in the us-west-1 zone and are the following:
- UsersDashboardData (contains: repos remaining count, repos managed, api keys owned)
- UpdateStore (contains: logs from the cloud nodes)
- Repos
- ApiKeys
The S3 bucket is updatestore
. It contains the models in .h5 format, which path is s3://updatestore/<repo_id>/<session_id>/<round>/model.h5
.
- Allow the user to reuse API Keys on different repos
- Create a "Delete Repo" option
- None