This is the repository responsible for Writorium's apps.
Backend β Writorium's application backend.
To work properly, fill in the .env
file. Use the .env.example
file as an example.
Frontend β Writorium's application frontend.
To work properly, fill in the .env
file. Use the .env.example
file as an example.
Shared β Writorium's application common modules for reuse.
npx simple-git-hooks
at the root of the project, before the start (it will set the pre-commit hook for any commits).npm install
at the rootnpx simple-git-hooks
at the rootcd backend && npm run migrate:dev
cd frontend && npm run start:dev
then cd backend && npm run start:dev
PS: If you're facing such kind of strange errors from eslint-plugin
Then you may fix it with such solution (for VS Code IDE):
.vscode
foldersettings.json
fileeslint.workingDirectories
rule in settings.json
file {
"eslint.workingDirectories": ["./", "./backend", "./frontend", "./shared"]
}
erDiagram
users {
int id PK
dateTime created_at
dateTime updated_at
citext email "may have email constraint"
text password_hash
text password_salt
}
user_details ||--|| users : user_id
user_details ||..|o files : avatar_id
user_details {
int id PK
dateTime created_at
dateTime updated_at
int user_id FK
varchar first_name
varchar last_name
int avatar_id FK "may be null if user has no avatar"
}
achievements {
int id PK
dateTime created_at
dateTime updated_at
varchar key "inner usage key value"
varchar name "readable name value"
text description "achievement description"
int breakpoint FK
text reference_table FK "referencing to table with records for achievements"
}
users_achievements ||--|| achievements : achievement_id
users_achievements }o..|| users : user_id
users_achievements {
int id PK
dateTime created_at
dateTime updated_at
int achievement_id FK
int user_id FK
}
files {
int id PK
dateTime created_at
dateTime update_at
text url
}
articles }o--|| users : user_id
articles ||..|o prompts : prompt_id
articles ||--|| genres : genre_id
articles ||..|o files : cover_id
articles {
int id PK
dateTime created_at
dateTime update_at
text text "article text"
int read_time "nullable"
int user_id FK
int genre_id FK
int prompt_id FK "nullable"
int cover_id FK "nullable"
dateTime deleted_at "nullable"
}
comments }o..|| users : user_id
comments ||--|| articles : article_id
comments {
int id PK
dateTime created_at
dateTime update_at
text text "comment text"
int user_id FK
int article_id FK
}
article_reactions }o..|| users : user_id
article_reactions ||--|| articles : article_id
article_reactions {
int id PK
dateTime created_at
dateTime update_at
boolean is_like "in case if we'd have dislikes"
int user_id FK
int article_id FK
}
prompts ||..|o genres : genre_id
prompts {
int id PK
dateTime created_at
dateTime update_at
text character "nullable"
text setting "nullable"
text situation "nullable"
enum type "daily | manual"
int genre_id FK "nullable"
}
genres {
int id PK
dateTime created_at
dateTime update_at
varchar key "inner usage key value"
varchar name "readable name value"
}
articles_views }o..|| users : user_id
articles_views ||--|| articles : article_id
articles_views {
int id PK
dateTime created_at
dateTime update_at
int article_id FK
int viewed_by_id FK
}
favoured_user_articles }o..|| users : user_id
favoured_user_articles ||--|| articles : article_id
favoured_user_articles {
int article_id PK
int user_id PK
dateTime created_at
dateTime update_at
}
user_following_authors }o--|| users : user_id
user_following_authors {
int id PK
dateTime created_at
dateTime update_at
int user_id FK
int author_id FK
}
<project-prefix>-<issue-number>: <ticket-title>
wr-5: Add Articles page
<type>/<project-prefix>-<issue-number>-<short-desc>
task/wr-5-add-articles-page
task/wr-12-add-create-article-flow
fix/wr-16-writer-articles-display
<project-prefix>-<issue-number>: <modifier> <description>
+
(add)*
(edit)-
(remove)wr-5: + articles feed page
wr-12: * create article form
wr-16: - other writers articles on my articles tab