Git Product home page Git Product logo

shareit's Introduction

ShareIt

A MERN full stack social media web application that uses redux In this project, I explored how to fully build a MERN stack web application. MERN stands for MongoDB, Express, ReactJS, and Node.JS. Along with the above technologies, i also used redux to enable my application to scale well in the future, if i decide to add additional functionality.

Screenshot-2022-11-19-123118.png

Database - MongoDB Atlas Cluster

Screenshot-2022-11-19-123407.png The above shows an initialized cluster on the MongoDB atlas platform. This is very convenient as there is no need to host a local MongoDB database on a server and deploy it.

Server - Connecting to Database

Screenshot-2022-11-19-124647.png

Server - Database Schema

Screenshot-2022-11-19-125238.png

Server - Routes and Controllers

Routes used:

router.get('/', getPosts)
router.post('/', createPost)
router.patch('/:id', updatePost)

The above use the CRUD model.

Controllers corresponding to the routes: Screenshot-2022-11-19-124959.png

Note

async  await

are used as database accesses are asyncronous and we cannot guarantee timing

Client - Directory/Scope structure

.
├── App.js      
├── actions     
│   └── posts.js
├── api
│   └── index.js
├── components       
│   ├── Form
│   │   ├── Form.js  
│   │   └── styles.js
│   └── Posts        
│       ├── Post     
│       ├── Posts.js 
│       └── styles.js
├── images
│   └── ShareIt.png  
├── index.css        
├── index.js
├── reducers
│   ├── index.js     
│   └── posts.js     
└── styles.js

Structuring this way is done due to redux. By following the actions, reducers, api, and components structure, adding additional features are straighforward. This promotes scalability

#Client - Actions and Reducers

reducers reducer.png

actions actions.png

shareit's People

Contributors

deepan19 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.