Skip to content

gopalsasmal100xdev/IdiaClan-SolcialMedia

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Idia Clan Social Media

Develop a Social Media API using NodeJS, ExpressJS, and GraphQL. The API will simulate basic functionalities of a social media platform, such as user registration, posting content, and following other users.

Features

  • Login/Register
  • Graphql Query
  • Follow User

Development Setup

Clone This project to you local machine by following this commands

  git clone https://github.com/gopal24-colab/IdiaClan-SolcialMedia.git
  cd IdiaClan-SolcialMedia

Install packages with yarn or npm

    npm install

or

    yarn

Environment Variables

To run this project, you will need to add the following environment variables to your .env file

PORT as you like, example 3000

MONGODB_URI your local mongodb url or mongodb atlas url

🔗 MongoDB altas Link

Create your personal account and add url into .env file

https://www.mongodb.com/atlas/database

JWT_SECRET_KEY Add any 32 digit length secret key or use below command

openssl rand -base64 32

SESSION_SECRET_KEY Add any 32 digit length secret key or use below command

openssl rand -base64 32

Quick start with

npm run dev

API Reference

Home route

GET http://localhost:3000

Registration route

  POST /api/v2/user/register

Registeration Data format

{
    "username": "Gopal Sasmal",
    "email": "gopalsasmal@gmail.com",
    "password": "12321312"
}

Login route

    POST /api/v2/user/login

Login Data format

{
    "email": "gopal@gmail.com",
    "password": "12321312"
}

Below all protected Routes

After you login to the server then create new Post

    POST /api/v2/post/create

Post Data format

{
    "data": "Ability to request nested data in a single query, simplifying client-side data handling"
}

Get all posts

    GET /api/v2/post/allPost

Follow user

    POST /api/v2/user/followUser

Follow request data format

{
    "userId": "65f9174a458b5a2f45769ba0"
}

provide userId that you wants to follow

Live Replit URL Link

    https://03298ff0-677c-4127-b9e5-a2dcd8dbfd49-00-1aauyq2xjbtu5.worf.replit.dev/

Github Link

    [Github](https://github.com/gopal24-colab/IdiaClan-SolcialMedia)

Replit Join Link

    https://replit.com/join/newluiqxqy-shadowxkrishna

License

MIT

Connect

For query please connect , email: gopalsasmal1806@gmail.com or

linkedin

Github

Releases

No releases published

Packages

No packages published