An open API service indexing awesome lists of open source software.

https://github.com/aurelioo29/blog-system

A simple Blog System repository built with Next.js and MongoDB. It allows users to easily create and manage blog posts, providing a fast and SEO-friendly experience.
https://github.com/aurelioo29/blog-system

axios mongodb nextjs react-toastify tailwindcss

Last synced: 4 months ago
JSON representation

A simple Blog System repository built with Next.js and MongoDB. It allows users to easily create and manage blog posts, providing a fast and SEO-friendly experience.

Awesome Lists containing this project

README

          

# ๐Ÿ“– Blog System

A blogging platform built with modern technologies like **Next.js**, **MongoDB**, **Axios**, **TailwindCSS**, and **React Toastify**. Users can create blogs, view detailed blog posts, and experience real-time interactions with a smooth UI.

## โœจ Features

- ๐Ÿ“ **View Blogs**: Browse through the list of blogs.
- ๐Ÿ” **Blog Details**: Click on a blog to view its full details.
- ๐Ÿ”” **Notifications**: User-friendly notifications powered by `React Toastify`.

## ๐Ÿ› ๏ธ Tech Stack

### ๐ŸŒ Frontend

- โš›๏ธ **Next.js** : A React framework for building server-side rendered and static web applications.
- ๐Ÿ“ก **Axios**: For making HTTP requests.
- ๐ŸŽจ **TailwindCSS**: Utility-first CSS framework for styling.
- ๐Ÿ”” **React Toastify**: Elegant notifications for React applications.

### ๐Ÿ—„๏ธ Backend

- ๐Ÿƒ **MongoDB**: NoSQL database for storing blog data.
- ๐Ÿ“œ **Mongoose**: Object Data Modeling (ODM) library for MongoDB.

## โœ… Prerequisites

Make sure you have the following installed:

- ๐Ÿ–ฅ๏ธ Node.js (v18 or above)
- ๐Ÿƒ MongoDB

## ๐Ÿš€ Installation

1. **Clone the repository**:
```bash
git clone
cd blog-system-main
```
2. Install dependencies:

```bash
npm install
# or
yarn install
```

3. Configure MongoDB:

- Open the file lib/config/db.js.
- Replace the connection string with your MongoDB credentials:

```js
import mongoose from "mongoose";

export const connectDB = async () => {
await mongoose.connect("your-mongodb-connection-string-here");
console.log("Connected to MongoDB");
};
```

4. Start the development server:
```bash
npm run dev
# or
yarn dev
```

๐ŸŒ The app will be available at http://localhost:3000.

## ๐Ÿ“œ Available Scripts

In the project directory, you can run:

- ๐Ÿ”ง npm run dev: Runs the app in development mode.
- ๐Ÿ—๏ธ npm run build: Builds the app for production.
- ๐Ÿš€ npm run start: Starts the production server.
- ๐Ÿงน npm run lint: Runs linting checks.

## ๐Ÿ“‚ Folder Structure

```bash
blog-system-main
โ”œโ”€โ”€ app # Pages and API routes
โ”œโ”€โ”€ assets # Static assets like images
โ”œโ”€โ”€ components # Reusable React components
โ”œโ”€โ”€ lib # Utility functions and helpers
โ”œโ”€โ”€ public # Publicly accessible files
โ”œโ”€โ”€ styles # Global CSS or Tailwind configuration
โ”œโ”€โ”€ tailwind.config.js # TailwindCSS configuration
โ””โ”€โ”€ package.json # Project metadata and scripts
```

## ๐Ÿ“ฆ Dependencies

Here are the main dependencies used in this project:

- axios: ^1.7.7
- mongoose: ^8.7.1
- next: ^14.2.23
- react: ^18
- react-dom: ^18
- react-toastify: ^10.0.6
- tailwindcss: Installed via PostCSS

## ๐Ÿค Contributions

Feel free to fork this project and submit a pull request. Contributions are always welcome! ๐Ÿ˜Š