Skip to content

thedemonsid/blog-website

Repository files navigation

Blog Website

  • Proper MongoDB integration.
  • Nextjs & shadcn setup
  • github Setup
  • Deploying the website
  • Adding PR Template
  • Creating Home page
  • Creating Blogs page
  • Creating Blog Component
  • Adding Loaders and sonner
  • Database Connection
  • Backend routes(Basics)
  • Helper functions(fetch,delete,update)
  • Backend routes(Advanced)
  • Input Validation
  • Custom Text Editor
  • Authentication
  • Custom SignIn And SignOut Pages
  • One Time Login which remains along time (Tokens!!!!)
  • Aesthetics

Contributing to the Project

  1. Fork the Repository: Start by forking the repository to your own GitHub account.

  2. Clone the Repository: Next, clone the forked repository to your local machine:

    git clone https://github.com/<your-username>/<repository-name>.git
  3. Create a New Branch: Navigate into the cloned repository and create a new branch for your changes:

    cd <repository-name>
    git checkout -b <branch-name>

    Replace <branch-name> with a descriptive name for your branch (e.g., add-new-feature).

  4. Make Your Changes: Make the changes you want to contribute. Be sure to follow the project's coding standards and conventions.

  5. Commit Your Changes: Once you've made your changes, stage and commit them:

    git add .
    git commit -m "Your descriptive commit message"
  6. Push Your Changes: Push your changes to your forked repository on GitHub:

    git push origin <branch-name>
  7. Create a Pull Request: Finally, navigate to your forked repository on GitHub and click the "New pull request" button. Select your branch from the dropdown menu and click "Create pull request".

Thank you for your contributions!

Environment variables Setup

Environment Variable Description
MONGO_URL Your MongoDB connection string
GITHUB_ID Your GitHub App ID
GITHUB_SECRET Your GitHub App Secret
GOOGLE_ID Your Google Client ID
GOOGLE_SECRET Your Google Client Secret
NEXTAUTH_SECRET Your NextAuth Secret

Learn More About NextAuth and How to aquire github and google id/secret

NextAuth Tutorial MonogDB Database Connection with Google Provider in NextAuth

Learn More About MongoDB Integration

Integration Tutorial

Testing the Code

Before running the tests, make sure all the dependencies are installed. You can install them by running:

npm install

Check The Linting of your Local Code

npm run lint

Run The App In Developement Environment

npm run dev