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.
- 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.
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
- 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)
-
Clone the repository
git clone https://github.com/codewithbirat1/Blog-App.git cd Blog-App -
Install dependencies
npm install
-
Environment setup Create a
.env.localfile in the root directory (Next.js convention) with environment variables likeMONGODB_URIpointing to your MongoDB instance. -
Start development server
npm run dev
-
Open your browser Visit
http://localhost:3000
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
MONGODB_URI: The connection string for your MongoDB database. This is crucial and should be set in a.env.localfile. Refer to your MongoDB deployment for the appropriate connection string.
| Command | Description |
|-----------------|--------------------------|
| npm run dev | Starts the development server |
| npm run build | Builds the application for production |
| npm run start | Starts the production server |
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