Track your work-life balance and improve the specific areas of your life with AI recommendations.
- Pay attention, that we have certain quality criteria, which we should follow during application development.
TODO: Add development deployment link
The product helps the users to maintain work-life balance, identify areas for improvements and recommend specific measurable actions.
- NodeJS (20.x.x);
- npm (10.x.x);
- PostgreSQL (15.4)
erDiagram
users {
int id PK
dateTime created_at
dateTime updated_at
varchar email
text password_hash
text password_salt
}
user_details ||--|| users: user_id
user_details ||--o| files: avatar_file_id
user_details {
int id PK
dateTime created_at
dateTime updated_at
varchar name
int user_id FK
string notification_frequency
int avatar_file_id FK
}
files {
int id PK
varchar file_key UK
varchar url
dateTime created_at
dateTime updated_at
}
categories {
int id PK
dateTime created_at
dateTime updated_at
varchar name UK
}
quiz_questions }|--o| categories: category_id
quiz_questions {
int id PK
dateTime created_at
dateTime updated_at
text label UK
int category_id FK
}
quiz_answers }|--o| quiz_questions: question_id
quiz_answers {
int id PK
dateTime created_at
dateTime updated_at
text label
int value
int question_id FK
}
quiz_scores }o--|| categories: category_id
quiz_scores }o--|| users: user_id
quiz_scores {
int id PK
dateTime created_at
dateTime updated_at
int score
int category_id FK
int user_id FK
}
quiz_answers_to_users }o--|| quiz_answers: answer_id
quiz_answers_to_users }o--|| users: user_id
quiz_answers_to_users {
int id PK
dateTime created_at
dateTime updated_at
int user_id FK
int answer_id FK
}
onboarding_questions {
int id PK
dateTime created_at
dateTime updated_at
text label UK
}
onboarding_answers }|--o| onboarding_questions: question_id
onboarding_answers {
int id PK
dateTime created_at
dateTime updated_at
text label
int question_id FK
}
onboarding_answers_to_users }o--|| onboarding_answers: answer_id
onboarding_answers_to_users }o--|| users: user_id
onboarding_answers_to_users {
int id PK
dateTime created_at
dateTime updated_at
int answer_id FK
int user_id FK
}
user_task_days }o--|| users: user_id
user_task_days {
int id PK
dateTime created_at
dateTime updated_at
int day_of_week
int user_id FK
}
tasks }o--|| users : user_id
tasks }o--|| categories : category_id
tasks {
int id PK
dateTime created_at
dateTime updated_at
int category_id FK
int user_id FK
dateTime due_date
varchar label
text description
text status
}
task_notes }o--|| tasks: task_id
task_notes }o--|| users: user_id
task_notes {
int id PK
dateTime created_at
dateTime updated_at
int task_id FK
int user_id FK
text content
}
- React — a frontend library
- Redux + Redux Toolkit — a state manager
-
assets - static assets (images, global styles)
-
libs - shared libraries and utilities
2.1 components - plain react components
2.2 enums
2.3 helpers
2.4 hooks
2.5 modules - separate features or functionalities
2.6 types
-
modules - separate app features or functionalities
-
pages - app pages
-
db - database data (migrations, seeds)
-
libs - shared libraries and utilities
2.1 enums
2.2 exceptions
2.3 helpers
2.4 modules - separate features or functionalities
2.5 types
-
modules - separate app features or functionalities
This project is mainly focused on Android platform.
React Native — a mobile library Redux + Redux Toolkit — a state manager
-
assets - static assets (images)
-
libs - shared libraries and utilities
2.1 components - plain react components
2.2 enums
2.3 helpers
2.4 hooks
2.5 packages - separate features or functionalities
2.6 types
-
navigations - app navigators
-
packages - separate app features or functionalities
-
screens - app screens
-
slices - redux slices
As we are already using js on both frontend and backend it would be useful to share some contracts and code between them.
- Zod — a schema validator
- Create and fill all .env files. These files are:
- apps/frontend/.env
- apps/backend/.env
You should use .env.example files as a reference.
-
Install dependencies:
npm install
. -
Install pre-commit hooks:
npx simple-git-hooks
. This hook is used to verify code style on commit. -
Run database. You can run it by installing postgres on your computer.
-
Apply migrations:
npm run migrate:dev -w backend
-
Run backend:
npm run start:dev -w backend
-
Run frontend:
npm run start:dev -w frontend
<type>: <ticket-title> <project-prefix>-<issue-number>
For the full list of types check Conventional Commits
Examples:
feat: add dashboard screen bb-123
<issue-number>-<type>-<short-desc>
Examples:
123-feat-add-dashboard
12-feat-add-user-flow
34-fix-user-flow
We use Conventional Commits to handle commit messages
<type>: <description> <project-prefix>-<issue-number>
Examples:
feat: add dashboard component bb-45
fix: update dashboard card size bb-212
CI/CD implemented using GitHub Actions