sharmavikas4 / MERN_BLOG

https://mern-blog-server-seven.vercel.app
8 stars 17 forks source link

MERN Blog Website

This project is an interactive and feature-rich blogging website developed using modern web technologies. It allows users to create, edit, and delete blogs, comment on posts, and view trending blogs. Additionally, users can sign in using Google OAuth for easy authentication, upload images via Cloudinary, and manage their blogs through a personalized dashboard.

Table of Contents

Project Overview

The aim of this project is to provide users with an interactive platform to share their thoughts, experiences, and ideas through blogs. The website includes features like trending blogs, recent blogs, a user management dashboard, and Google OAuth-based authentication for easy sign-in.

Key Objectives:

Features

Technologies Used

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/blogging-website.git
  2. Navigate to the project directory:

    cd MERN_BLOG
  3. Install dependencies:

    cd server
    npm install
    cd ..
    cd client
    npm install
  4. Set up environment variables:

    Create a .env file in the server directory and add the following:

    GOOGLE_CLIENT_ID=<your-google-client-id>
    GOOGLE_CLIENT_SECRET=<your-google-client-secret>
    URL=<your-server-url>
    CLIENT_URL=<your-client-url>
    DB=<your-database-connection-string>
    CLOUD_NAME=<your-cloudinary-cloud-name>
    CLOUDINARY_KEY=<your-cloudinary-api-key>
    CLOUDINARY_SECRET=<your-cloudinary-api-secret>
  5. Start the backend server:

    nodemon index.js
  6. Set up environment variables:

    Create a .env file in the client directory and add the following:

    VITE_REACT_APP_SERVER_URL=<your-server-url>
    VITE_REACT_APP_CLIENT_URL=<your-client-url>
  7. Start the client side(frontend):

    npm run dev

Usage

API Endpoints

Contributing

Contributions are welcome! To contribute:

  1. Fork the repository.
  2. Create a new feature branch (git checkout -b feature/your-feature).
  3. Commit your changes (git commit -m 'Add your feature').
  4. Push to the branch (git push origin feature/your-feature).
  5. Open a pull request.