Code Monkey home page Code Monkey logo

bloghub's Introduction

Full-Stack Blog Application

Table of Contents

About the Project

This is a full-stack blog application that enables users to create, edit, and manage blog posts. It includes essential features such as user authentication, commenting, post liking, and categorization by tags.

The application leverages modern web technologies, utilizing React for the frontend and Node.js with Express for the backend, backed by MongoDB for data storage.

Installation

  1. Clone the repository:

    git clone https://github.com/your-repo/full-stack-blog-app.git
    cd full-stack-blog-app
  2. Install dependencies for both client and server:

    cd client
    npm install
    cd ../server
    npm install

Running the Application

Client

To run the client side:

  1. Navigate to the client directory:

    cd client
  2. Start the development server:

    npm run dev

Server

To run the server side:

  1. Navigate to the server directory:

    cd server
  2. Start the server:

    npm start

Client

The client side is built with Vite and React. The main packages used are:

  • react
  • react-dom
  • react-router-dom
  • react-context
  • react-icons
  • react-quill
  • react-toastify
  • axios
  • tailwindcss
  • react-context
  • dotenv
  • html-react-parser

Server

The server side is built with Node.js, Express, and MongoDB. The main packages used are:

  • express
  • mongoose
  • bcryptjs
  • cookie-parser
  • cors
  • dotenv
  • jsonwebtoken
  • nodemon
  • mongodb
  • multer

Project Structure

The project is structured into two main directories: client and server.

   full-stack-blog-app/
│
├── client/
│   ├── public/
|   ├── Images/
│   ├── src/
│   │   ├── Components/
│   │   │   ├── Footer.jsx
│   │   │   ├── Loading.jsx
│   │   │   ├── Menu.jsx
│   │   │   ├── Navbar.jsx
│   │   │   └── PageNotFound.jsx
│   │   ├── Context/
│   │   │   └── authContext.jsx
│   │   ├── Pages/
│   │   │   ├── EditBlog.jsx
│   │   │   ├── Home.jsx
│   │   │   ├── Login.jsx
│   │   │   ├── Register.jsx
│   │   │   ├── Single.jsx
│   │   │   └── Write.jsx
│   │   ├── App.jsx
│   │   ├── main.jsx
│   │   └── index.css
│   ├── index.html
│   ├── package.json
│   └── vite.config.js
│
├── server/
│   ├── models/
│   │   ├── blog.js
│   │   └── user.js
│   ├── routes/
│   │   ├── auth.js
│   │   └── post.js
│   ├── index.js
│   ├── .env
│   ├── package.json
│   └── README.md
│
└── README.md

Client

The client side is built with Vite and React, utilizing libraries such as React Router DOM, Axios, and React Quill for rich text editing.

Server

The server side is built with Node.js, Express, and MongoDB. It includes packages like Mongoose for database modeling, bcrypt for password hashing, and JWT for authentication.

Environment Variables

Ensure to set up your environment variables in the .env files located in the server and client directories. Here are the required variables:

Server (.env):

PORT=0000
MONGODB_URI=mongodb://localhost:27017/your-database-name
JWT_SECRET=your_jwt_secret_key

Client (.env):

VITE_baseURL=http://localhost:0000

Replace your-database-name and your_jwt_secret_key with your actual MongoDB database name and JWT secret key, respectively.


By following these instructions, you can set up and run your full-stack blog application. Happy coding!


bloghub's People

Contributors

riya-rjha avatar

Stargazers

Sarthak sharma avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.