marwanm-dev / Devto-clone

Dev.to clone
https://marwanm-devto-clone.vercel.app
BSD 4-Clause "Original" or "Old" License
91 stars 20 forks source link
axios cloudinary express mern mern-stack mongodb mongoose node oauth2 react react-router redux-persist redux-toolkit rtk-query socket-io styled-components tailwind tailwind-css

Dev.to-clone


A Dev.to clone created with MERN stack and more (Essentially FB without stories feature)

Tech used with vite🔥:

Frontend

Backend

Features

Screenshots

Login / Signup / Edit / Delete

Login - Signup -Edit - Delete profile

Google / Github OAuth

Login OAuth

Create / Update / Edit / Delete Posts

CRUD Posts

Reactions / Comments / Follows with Real-time notifications (Toasted)

Real time notifications - Reactions - Comments - Replies - Follows

Tags / ReadingList

Tags - ReadingList

Dashboard

Dashboard

Search Engine

Search engine

Live

Client: https://marwanm-devto-clone.vercel.app

Server: https://marwanm-devto-clone-server.onrender.com

How to setup locally

Clone Repo

Clone the repo to your local machine by https://github.com/marwanm-dev/Devto-clone

Setup

Install all dependencies in both client and server subdirectories by npm i

$ cd server && npm i
$ cd client && npm i

Create

A MongoDB database either locally or online via MongoDB Atlas

A Cloudinary account

A new project on Google Cloud Platform

A .env file in in both client and server subdirectories

ENV variables

client/.env:

BASE_URL=
GOOGLE_CLIENT_ID=${GOOGLE_CLIENT_ID}
GITHUB_CLIENT_ID=${GITHUB_CLIENT_ID}
GITHUB_CLIENT_SECRET=${GITHUB_CLIENT_SECRET}

server/.env:

ACCESS_TOKEN_SECRET=
REFRESH_TOKEN_SECRET=

CLIENT_URL=

GOOGLE_CLIENT_ID=${GOOGLE_CLIENT_ID}
GITHUB_CLIENT_ID=${GITHUB_CLIENT_ID}
GITHUB_CLIENT_SECRET=${GITHUB_CLIENT_SECRET}

DB_NAME=
DB_USER=
DB_PASSWORD=

CLOUDINARY_CLOUD_NAME=
CLOUDINARY_API_KEY=
CLOUDINARY_API_SECRET=
CLOUDINARY_DEFAULT_URL= // default image url
CLOUDINARY_DEFAULT_PUBLIC_ID= // default image public_id

Finally, run npm run stack on the root of the two subdirectories

Credit

Dev.to clone by me