Collect and analyze developers activity on projects.
The application collects and analyzes developers' activity on different projects based on GIT commits.
erDiagram
users {
int id PK
dateTime created_at
dateTime updated_at
dateTime deleted_at
citext email
text password_hash
text password_salt
varchar name
int avatar_file_id FK
}
user_groups {
int id PK
dateTime created_at
dateTime updated_at
varchar key UK
varchar name UK
}
users_to_user_groups {
int id PK
dateTime created_at
dateTime updated_at
int user_group_id FK
int user_id FK
}
permissions {
int id PK
dateTime created_at
dateTime updated_at
varchar key UK
varchar name UK
}
user_groups_to_permissions {
int id PK
dateTime created_at
dateTime updated_at
int user_group_id FK
int permission_id FK
}
projects {
int id PK
dateTime created_at
dateTime updated_at
dateTime last_activity_date
varchar name UK
varchar description
}
user_groups_to_projects {
int id PK
dateTime created_at
dateTime updated_at
int user_group_id FK
int project_id FK
}
project_groups {
int id PK
dateTime created_at
dateTime updated_at
varchar key UK
varchar name UK
}
users_to_project_groups {
int id PK
dateTime created_at
dateTime updated_at
int project_group_id FK
int user_id FK
}
project_permissions {
int id PK
dateTime created_at
dateTime updated_at
varchar key UK
varchar name UK
}
project_groups_to_project_permissions {
int id PK
dateTime created_at
dateTime updated_at
int project_group_id FK
int project_permission_id FK
}
projects_to_project_groups {
int id PK
dateTime created_at
dateTime updated_at
int project_group_id FK
int project_id FK
}
project_api_keys {
int id PK
dateTime created_at
dateTime updated_at
int project_id FK
int created_by_user_id FK
int updated_by_user_id FK
varchar encrypted_key UK
}
contributors {
int id PK
dateTime created_at
dateTime updated_at
dateTime hidden_at
varchar name
}
git_emails {
int id PK
dateTime created_at
dateTime updated_at
int contributor_id FK
varchar email
}
files {
int id PK
dateTime created_at
dateTime updated_at
varchar url
enum content_type
}
activity_logs {
int id PK
dateTime created_at
dateTime updated_at
dateTime date
int git_email_id FK
int project_id FK
int created_by_user_id FK
int commits_number
}
notifications {
int id PK
dateTime created_at
dateTime updated_at
int receiver_user_id FK
enum status
varchar payload
}
files }|--|o users : avatar_file_id
user_groups ||--|{ user_groups_to_permissions : user_group_id
permissions ||--|{ user_groups_to_permissions : permission_id
user_groups ||--|{ user_groups_to_projects : user_group_id
projects ||--|{ user_groups_to_projects : project_id
users ||--|{ users_to_user_groups : user_id
user_groups ||--|{ users_to_user_groups : user_group_id
project_groups ||--|{ project_groups_to_project_permissions : project_group_id
project_permissions ||--|{ project_groups_to_project_permissions : project_permission_id
project_groups ||--|{ projects_to_project_groups : project_group_id
projects ||--|{ projects_to_project_groups : project_id
users ||--|{ users_to_project_groups : user_id
project_groups ||--|{ users_to_project_groups : project_group_id
project_api_keys }|--|| users : "created_by_user_id, updated_by_user_id"
project_api_keys }|--|| projects : project_id
contributors ||--|{ git_emails : contributor_id
git_emails }|--|| activity_logs : git_email_id
projects }|--|| activity_logs : project_id
users }|--|| activity_logs : created_by_user_id
users ||--|{ notifications : receiver_user_id
TBD
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
As we are already using js on both frontend and backend it would be useful to share some contracts and code between them.
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.
Build shared: npm run build:shared
Run database. You can run it by installing postgres on your computer.
Apply migrations: npm run migrate:dev -w apps/backend
Run backend: npm run start:dev -w apps/backend
Run frontend: npm run start:dev -w apps/frontend
<type>: <ticket-title> <project-prefix>-<issue-number>
For the full list of types check Conventional Commits
Examples:
feat: add dashboard screen gf-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 gf-45
fix: update dashboard card size gf-212
CI/CD implemented using GitHub Actions