Skip to content

codewithbirat1/Blog-App

Repository files navigation

πŸš€ Blog-App

πŸ“– Overview

This project is a blog application built using Next.js for the frontend and MongoDB as the database. It allows users to create, read, update, and delete blog posts. The application is deployed on Vercel.

✨ Features

  • Create Blog Posts: Users can create new blog posts with titles, content, and optionally, images.
  • Read Blog Posts: Users can view existing blog posts.
  • Update Blog Posts: Users can edit existing blog posts.
  • Delete Blog Posts: Users can delete existing blog posts.
  • Client-side Routing: Next.js's built-in routing ensures smooth navigation.
  • Deployment on Vercel: The application is easily deployed and scaled via Vercel.

πŸ› οΈ Tech Stack

Frontend:

  • Next.js
  • JavaScript XML
  • (Likely) React (implied by Next.js)

Backend:

  • (Likely) an API route system provided by Next.js for interaction with MongoDB. Specific backend framework not explicitly identified in provided files.

Database:

  • MongoDB

DevOps:

  • Vercel

πŸš€ Quick Start

Prerequisites

  • Node.js (version specified in package.json)
  • npm or yarn (preferred package manager: npm, based on .npmrc)
  • MongoDB (running instance, or connection string for deployment)

Installation

  1. Clone the repository

    git clone https://github.com/codewithbirat1/Blog-App.git
    cd Blog-App
  2. Install dependencies

    npm install
  3. Environment setup Create a .env.local file in the root directory (Next.js convention) with environment variables like MONGODB_URI pointing to your MongoDB instance.

  4. Start development server

    npm run dev
  5. Open your browser Visit http://localhost:3000

πŸ“ Project Structure

Blog-App/
β”œβ”€β”€ public/            # Static assets
β”œβ”€β”€ src/
β”‚   └── ...           # Source code (pages, components, etc. - structure not fully detailed in provided files)
β”œβ”€β”€ next.config.js     # Next.js configuration
β”œβ”€β”€ package.json       # Project dependencies
β”œβ”€β”€ package-lock.json  # Dependency lockfile
β”œβ”€β”€ tsconfig.json      # TypeScript configuration
└── README.md          # This file

βš™οΈ Configuration

Environment Variables

  • MONGODB_URI: The connection string for your MongoDB database. This is crucial and should be set in a .env.local file. Refer to your MongoDB deployment for the appropriate connection string.

πŸ”§ Development

Available Scripts

| Command | Description |

|-----------------|--------------------------|

| npm run dev | Starts the development server |

| npm run build | Builds the application for production |

| npm run start | Starts the production server |

πŸš€ Deployment

The application is configured for deployment to Vercel. Use the Vercel CLI or the Vercel platform to deploy.


⭐ Star this repo if you find it helpful!

Made with ❀️ by codewithbirat1

About

Next.js MongoDB Blog App Project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors