Skip to content

A user-friendly and responsive posts sharing web application, where user can create posts using inbuilt Rich text editor. In this application user can create, update, delete posts. User can also comment on the posts along with edit and delete comment feature.

Notifications You must be signed in to change notification settings

Akshatv2612/Post-Comment-Service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Post-Comment Service

A user-friendly and responsive posts sharing web application, where user can create posts using inbuilt Rich text editor. In this application user can create, update, delete posts. User can also comment on the posts along with edit and delete comment feature.

Table of Contents

Set up ans Run

  1. Download and Extract:

    • Download the zip folder of this project from the 'code' section of the repository.
    • Extract the folder to your desired location.
  2. Open in an Editor (e.g., Visual Studio Code):

    • Open your preferred code editor (e.g., VS Code).
    • Navigate to the extracted project folder and open it in your editor.
  3. Folder Structure:

    • Inside the main folder, you'll find two subfolders:
      • backend: Contains the backend code.
      • frontend: Contains the frontend code.
  4. Setting Up Terminals:

    • Open two separate terminals.
  5. Backend Setup (Terminal 1):

    • In Terminal 1, navigate to the backend folder:
      cd backend
      
    • Install the required dependencies:
      npm install
      
    • Start the backend server in development mode:
      npm run dev
      
  6. Frontend Setup (Terminal 2):

    • In Terminal 2, navigate to the frontend folder:
      cd frontend
      
    • Install the required dependencies:
      npm install
      
    • Start the frontend development server:
      npm run dev
      
  7. Usage

If you find any difficulty or problem while set, please contact me at 'akshat1226@gmail.com'

Important Note: While I’ve included the .env files in this repository for your convenience during installation, I am aware that pushing sensitive information (such as API keys or credentials) to a public GitHub repository is generally not recommended. But I have done this only for your convenience.

Features

Here is the overview of the features of the project.

Login page: User can login using registered email and password.

Alt Text - description of the image


If the user is not registered then, he/she can register using signup page.

Alt Text - description of the image


After successful login User will be redirected to the home page where one can see all the posts created by other users and marked as active.

Alt Text - description of the image


On clicking the "Add post" button on Home page, user can create a post by filling the details like title, content, featured image and status.

Alt Text - description of the image


The "Edit" and "Delete" buttons appears only to the owner of the post. The post page is given below, which have post, comments and add comment feature.

Alt Text - description of the image

Architecture

Architecture Diagram

Here's a breakdown of your website's architecture

Components

Frontend: Built with React.js, Tailwind CSS, and JavaScript. This layer handles user interactions, rendering the UI (user interface), and sending requests to the backend API. Backend API: Built with Express.js and Node.js. This layer processes user requests, interacts with the database, and generates responses. Database: MongoDB stores user data (authentication), post information, and comments. Cloud Storage: Cloudinary stores uploaded post thumbnails securely and efficiently. JWT Authentication: Ensures secure user access by issuing tokens after successful login.

Data Flow:

User Interaction: User interacts with the frontend (e.g., creating a post, commenting). Frontend Request: Frontend sends a request to the backend API with relevant data (e.g., post content, comment text, etc.). API Processing: Backend API validates the request, fetches data from the database (if needed), performs operations like creating posts or comments, and interacts with Cloudinary for uploads. Database Interaction: The API interacts with MongoDB to store or retrieve data. Cloud Storage Interaction: The API interacts with Cloudinary to upload/download post thumbnails. API Response: The API sends a response back to the frontend with the requested data or success/error messages. Frontend Update: The frontend updates the UI based on the API response (e.g., displays new post, confirms comment creation).

Technologies

Frontend-backend

Frontend Backend Database Cloud Storage
HTML JavaScript MongoDB Cloudinary
CSS Express.js
JavaScript Mongoose
React.js json web token
Tailwind CSS

Key technology features

  • Integrated JWT authentication for secure user access and privacy.
  • Used Cloudinary for efficient and secure post thumbnail uploads, ensuring seamless streaming and storage.
  • Leveraged MongoDB aggregation pipelines for optimized data retrieval and manipulation, enhancing overall platform performance.
  • Implimented Tiny MCE Rich text editor for to generate posts and comments with rich text.

Why I prefered given tech stack and database ?

Frontend

JavaScript: Essential for adding interactivity and dynamic content to web pages. Its versatility makes it a core part of both client-side and server-side development.

React.js: A powerful JavaScript library for building user interfaces, especially single-page applications. React's component-based architecture allows for reusable components and efficient updates, enhancing development speed and user experience.

Backend

JavaScript (Node.js): Using JavaScript on the backend with Node.js allows for a unified language across the entire application, simplifying development and maintenance.

Express.js: A minimal and flexible Node.js web application framework that provides a robust set of features for web and mobile applications. Its simplicity and performance make it a great choice for building APIs and web servers.

Mongoose: An elegant MongoDB object modeling tool designed to work in an asynchronous environment. It simplifies data validation, casting, and business logic, making it easier to work with MongoDB.

Database

MongoDB: A NoSQL database that offers high performance, high availability, and easy scalability. Its flexible schema design aligns well with agile development practices, allowing for rapid iteration and adaptation to changing requirements.

Cloud Storage

Cloudinary: A comprehensive cloud-based image and video management solution. It offers powerful APIs for uploading, transforming, and delivering media assets efficiently, making it ideal for modern web applications that require dynamic media content.


About

A user-friendly and responsive posts sharing web application, where user can create posts using inbuilt Rich text editor. In this application user can create, update, delete posts. User can also comment on the posts along with edit and delete comment feature.

Topics

Resources

Stars

Watchers

Forks

Languages