Skip to content

Commit

Permalink
LIME-69: * solve merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
valery-chumak committed Mar 5, 2024
2 parents 09edfd6 + 2399b5e commit b4c7c0e
Show file tree
Hide file tree
Showing 146 changed files with 2,680 additions and 394 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,6 @@ jobs:
application_name: ${{ env.EBS_APP_NAME }}
environment_name: ${{ env.ENVIRONMENT }}
version_label: ${{ github.sha }}
use_existing_version_if_available: true
deployment_package: ./build.zip
wait_for_environment_recovery: 300
112 changes: 112 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,115 @@ Will be added soon
## 📦 CI/CD

CI/CD implemented using [GitHub Actions](https://docs.github.com/en/actions)

# 🗃️ DB diagram:

```mermaid
erDiagram
users {
id integer PK
email character_varying(255)
password_hash text
stripe_customer_id character_varying(255)
created_at timestamp
updated_at timestamp
}
user_details {
id integer PK
user_id integer FK
full_name character_varying(255)
avatar_url text
username character_varying(255)
date_of_birth date
weight integer
height integer
gender gender_enum
created_at timestamp
updated_at timestamp
}
user_achievements {
id integer PK
user_id integer FK
achievement_id integer FK
created_at timestamp
updated_at timestamp
}
achievements {
id integer PK
name character_varying(255)
activity_type activity_type_enum
requirement integer
requirement_metric requirement_metric_enum
created_at timestamp
updated_at timestamp
}
subscriptions {
id integer PK
user_id integer FK
plan_id integer FK
stripe_subscription_id character_varying(255)
is_canceled boolean
expires_at timestamp
created_at timestamp
updated_at timestamp
status status_enum
}
subscription_plans {
id integer PK
name character_varying(255)
price numeric(8-2)
description text
stripe_product_id character_varying(255)
stripe_price_id character_varying(255)
created_at timestamp
updated_at timestamp
}
oauth_info {
id integer PK
user_id integer FK
token_type character_varying(255)
expires_at bigint
access_token text
refresh_token text
scope character_varying(255)
provider oauth_provider_enum
created_at timestamp
updated_at timestamp
}
goals {
id integer PK
user_id integer FK
frequency integer
frequency_type frequency_type_enum
distance real
duration integer
progress real
completed_at timestamp
created_at timestamp
updated_at timestamp
}
oauth_state {
id integer PK
user_id integer FK
uuid character_varying(255)
created_at timestamp
updated_at timestamp
}
users ||--o{ user_details : user_id
users ||--o{ user_achievements : user_id
achievements ||--o{ user_achievements : achievement_id
users ||--o{ subscriptions : user_id
subscription_plans ||--o{ subscriptions : plan_id
users ||--o{ oauth_info : user_id
users ||--o{ goals : user_id
users ||--o{ oauth_state : user_id
```
11 changes: 9 additions & 2 deletions backend/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ NODE_ENV=local
PORT=3001
HOST=localhost
JWT_SECRET=secret
TOKEN_EXPIRATION_TIME=1d //600s 1min 2hrs 7d
API_BASE_URL=http://localhost:3001/api/v1

#
# DATABASE
Expand All @@ -28,7 +30,7 @@ [email protected]
# Stripe
#
STRIPE_SECRET_KEY=stripe_secret_key
WEBHOOK_SECRET=webhook_secret_key
STRIPE_WEBHOOK_SECRET=stripe_webhook_secret_key

#
# OPEN-AI
Expand All @@ -39,7 +41,6 @@ OPEN_AI_MODEL=version
#
# AWS S3
#

S3_ACCESS_KEY=key
S3_SECRET_KEY=secret
S3_BUCKET_NAME=name
Expand All @@ -50,3 +51,9 @@ S3_REGION=region
#
STRAVA_CLIENT_ID=client_id
STRAVA_CLIENT_SECRET=client_secret

#
# GOOGLE FIT
#
GOOGLE_FIT_CLIENT_ID=client_id
GOOGLE_FIT_CLIENT_SECRET=client_secret
1 change: 1 addition & 0 deletions backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"fastify": "4.25.2",
"fastify-multer": "2.0.3",
"fastify-raw-body": "4.3.0",
"googleapis": "133.0.0",
"jose": "5.2.2",
"knex": "3.1.0",
"objection": "3.1.3",
Expand Down
1 change: 1 addition & 0 deletions backend/src/bundles/goals/enums/enums.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { FrequencyType, GoalsApiPath } from 'shared';
Loading

0 comments on commit b4c7c0e

Please sign in to comment.