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.
- NodeJS (18.x.x);
- NPM (9.x.x);
- PostgreSQL (15.4)
- run
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 root- Fill ENVs
npx simple-git-hooks
at the rootcd backend && npm run migrate:dev
cd frontend && npm run start:dev
thencd backend && npm run start:dev
- Enjoy <3
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):
- At projects root create
.vscode
folder - Place there
settings.json
file - Add
eslint.workingDirectories
rule insettings.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
}
- React β a frontend library.
- Redux + Redux Toolkit β a state manager.
- quality-criteria rules - rules that should be followed during application development.
- simple-git-hooks β a tool that lets you easily manage git hooks.
- lint-staged β run linters on git staged files.
- dangerjs β automate common code review chores.
- commitlint β helps your team adhere to a commit convention.
- editorconfig β helps maintain consistent coding styles for multiple developers working on the same project across various editors and IDEs.
- prettier β an opinionated code formatter.
- ls-lint β file and directory name linter.
- eslint β find problems in your JS code.
- stylelint β find and fix problems in your CSS code.
<project-prefix>-<issue-number>: <ticket-title>
wr-5: Add Articles page
<type>/<project-prefix>-<issue-number>-<short-desc>
- task
- fix
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