Skip to content

sashankneupane/blog-it

Repository files navigation

Simple Blog Site

ait-project.sashankneupane.com

Overview

The blogsite will be a platform for people to write and share blogs to the world. The site will support all creation, update, and deletion of existing/new blogs from the site itself. The site will also support user authentication.

Only authenticated users can write blogs and blogs written by a user can be seen in their profile page. Authenticated users can also view all blogs written by other users in the home page.

Data Model

The application will store Users and Blogs.

  • users can have multiple blogs (via references)

An Example User:

{
  username: "shannonshopper",
  email: // a valid email address,
  hash: // a password hash,
  name: "Shannon Shopper",
  blogs: // an array of references to Blog documents
}

An Example Blogpost with Embedded Items:

{
  author: // a reference to a User object
  title: "Why is Javascript so hard?",
  content: "I've been trying to learn Javascript for the past 2 years and I still don't understand it."
  timestamp: // timestamp
}

Site Map and Pages

Page Description Path Image
Home Home page /home Home Page
Login Login page /login Login Page
Register Registration page /register Register Page
User Public Page Public page displaying user's blog posts /u/:username User Public Page
Blog Page Page displaying a specific blog post /blog/:blogId Blog Page
Edit Blog Page Edit page for a specific blog post (author only) /blog/:blogId/edit Edit Blog Page
Write Blog Page Page for writing a new blog post (logged-in) /blog/write Write Blog Page
User Dashboard Dashboard with blog management options /u/dashboard User Dashboard

User Stories or Use Cases

# User Story Description
1 User Registration New users can register with a unique username and email to create an account and access the blog site.
2 User Login Registered users can log in using their username and password to access their accounts and personalized features.
4 User Profile Users have a profile page displaying their username, name, email, and a list of authored blog posts for personal information management.
5 User Dashboard Logged-in users can access a dashboard to create new blog posts and edit/delete existing content easily.
6 Blog Creation Users can create new blog posts by providing a title and content, sharing their thoughts and stories.
7 Blog Listing Users can view a list of all blog posts, discovering and reading content authored by others.
8 Individual Blog Post View Users can read the full title and content of individual blog posts when they click on them.
9 Blog Editing Authors of blog posts can edit the content of their existing posts, making updates or corrections.
10 Blog Deletion Authors of blog posts can delete their own posts, removing content as needed.
11 User Logout Logged-in users can log out to secure their accounts and data when they're done using the site.

Research Topics

Checkbox Points Description
2 Integrate user authentication with Passportjs
3 Implement client-side form validation. [1 2 3] and multiple other places
1 Use dotenv to manage sensitive config variables.
2 Deploy the application on a Digital Ocean Droplet with a Namecheap domain.
2 Style the site using Tailwind CSS., Config files

Annotations / References Used

  1. passport.js authentication docs - (usage)
  2. Tailwind CSS- (usage)
  3. Flowbit - For some tailwind components
  4. dotenv - (usage)
  5. Digital Ocean - For hosting the application
  6. Namecheap - For the domain name