Skip to content

Next.js Blog | Secure & Serverless with MongoDB & iron-session

License

Notifications You must be signed in to change notification settings

Vidit-Kushwaha/Blog

Repository files navigation

Blog

Built with Next.js, iron-session, MongoDB, and mongoose. Write, share, and connect using markdown.

blog page

Table of Contents

Technologies Used

  • Next.js
  • TypeScript
  • Tailwind CSS
  • MongoDB
  • Iron-session
  • Markdown

Features

  • Blazing-fast performance with serverless functions
  • Secure user authentication with iron-session
  • Rich content creation with Markdown

Get Started

To run this portfolio website locally, follow these steps:

  1. Clone the repository:

    git clone https://github.com/Vidit-Kushwaha/Blog.git
  2. Install the dependencies:

    npm install
  3. Set environment variables:

    Create a .env file in the backend directory and add the following environment variables:

    PORT  = '3000'
    MONGODB_URI = 'mongodb://localhost:27017'
    URL = 'http://localhost:3000'
    JWT_SECRET = 'secret'
    SESSION_PASS = 'randomStringInput'
    NODE_ENV = 'production'
    EMAIL = 'example@example.com'
    EMAIL_PASS = 'password'
    NEXT_PUBLIC_MEASUREMENT_ID = 'G-Tag'
  4. Start the development server:

    npm run dev
  5. Open your web browser and visit http://localhost:3000 to view the website.

Contributing

We welcome contributions! Whether you're a seasoned developer or a curious enthusiast, there are ways to get involved:

  • Bug fixes and improvements: Find any issues? Submit a pull request!
  • New features: Have an idea for a cool feature? Let's discuss it in an issue!
  • Documentation: Improve the project's documentation and website.
  • Spread the word: Share the project with your network and help it grow!

Contribution Guidelines

  • Please follow standard JavaScript and Next.js coding style.
  • Create separate pull requests for each feature or bug fix.
  • Write clear and concise commits.
  • Add documentation for any new features you contribute.

License

This project is licensed under the MIT License. See the LICENSE file for details.