2023

DergiLOG

Magazine Side

This side generates content. You can think of the magazine as a company. Posts are made in the name of the magazine.

Users

  • The magazine has one admin.
  • There are moderators who create content specifically for the magazine.
  • There are writers who create content specifically for the magazine.

The magazine can share posts individually or, if desired, compile posts under a magazine issue and publish them as a complete magazine. Everyone in the magazine can share posts on behalf of the magazine, but these will be published only after approval from the higher-ups. Admins and moderators can create elements related to posts (titles, topics, moderators' comments) and assign them to writers.

Use Cases

Magazine Side

  1. The magazine owner (admin) creates the magazine.
  2. The admin can send invitations for moderation or writing to any user.
  3. If the invitations are accepted, the user becomes a moderator or writer within the magazine (they can share posts on behalf of the magazine).
  4. The post is published.

Publishing a Post

  1. A moderator or admin writes details about the post and can assign it to any writer. The writer sends the post to the moderator or admin for approval once the writing is complete. After approval, the post is published. If not approved, the writer may have a reject page where the post will be sent.
  2. A writer writes the desired post. After writing, they send it to the admin or moderator for approval. If approved, the post is shared. If not approved, the writer may have a reject page where the post will be sent.

Publishing a Magazine

Posts that have gone through the same processes as publishing are received by the magazine side with approval. They can sort posts internally. After clicking the "Share Magazine" button, the magazine issue is published.

User Side

This side consumes content. Users have interests, subscribed magazines, and followed writers and moderators. Users have a timeline. Users can participate in post threads (e.g., Reddit or StackOverflow). Notifications are received when subscribed magazines, writers, or moderators share something.

Use Cases

  1. The user logs in.
  2. The timeline displays posts from followed moderators, writers, or magazine subscriptions.
  3. The user views a post and goes to the post details.
  4. The user starts a thread (discussion) under the post.
  5. The user can upvote others' discussions.

Post

Post Features

The components that make up a post are:

  • Cover
  • Title
  • Slug
  • Description
  • Date
  • Author
  • Labels / Tags
  • Category
  • Like
  • Status: Draft, Idea, Revise, Pre-Publish, Published
  • Post Type

The post card will have three different designs, which can be used for the timeline:

  • Most viewed
  • Most threaded
  • Most liked (or upvoted)

Post Detail Features

The details of the post include:

  • Content
  • Thread (comments and discussions related to the post)

Thread

A thread belongs to a post! It is a discussion environment related to the post. Magazine admins, moderators, writers, users, and all roles can participate in the thread.

Features include:

  • The name of the user who wrote the thread
  • The profile picture of the user who wrote the thread
  • The date of the thread
  • Upvote - Downvote

Timeline

Posts from subscribed magazines, writers, and moderators are displayed in the timeline sorted by date or interest. The timeline will have infinite scroll.

User Roles

Magazine Admin

  • Has all permissions over the company.
  • Can create new topics.
  • Can view all topics (posts) held by all moderators, whether published or unpublished.
  • Can view all topics (posts) held by all writers, whether published or unpublished.
  • Can create and assign posts to all moderators and writers.
  • Has the authority to see everything in the magazine.

Moderator

  • Can edit, update, and delete topics assigned by the magazine owner.
  • Can create new topics.
  • Can assign topics to writers.
  • Can view all assigned items except for those assigned by the admin.

Writer

  • Can only see and update posts assigned to them.
  • Can create new posts but cannot publish them; they can send them to a moderator or admin for publication permission.
  • Can edit, update, and delete topics assigned by the magazine owner or moderator.
  • Can only see topics that are specifically assigned to them within the magazine.

Profiles

Magazine

  • Has followers and reputation.
  • Has a profile page containing only the magazine's posts.

Moderators and Writers

  • Have followers and reputation.
  • Have a profile page containing only their own shared content (which may include content shared on behalf of the magazine).

User

  • Has a timeline.
  • Has followers and reputation (from threads).
  • Bookmarks (saved posts).
  • Subscriptions (magazine subscriptions).
  • Notification section (receives notifications if there are comments on threads they participated in or if their subscribed magazines share something).
  • Explore page (timeline based on interests).

Dependencies

DependencyDescription
JsonwebtokenFor token-based authentication
JoiFor input validations
HelmetFor more secure API (e.g., XSS Attacks)
MulterFor file uploads
Swagger-autogenFor autogenerated API documentation
express-mongo-sanitizeTo prevent MongoDB injection attacks
express-async-errorsTo catch terminal errors
bcryptTo hash passwords
cookie-parserTo handle cookie operations