Skip to content

AbdallaBadreldin/Minly-Task

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Social System For Minly Assessment

It's divided to

1- Backend NodeJs.

2- Mobile Android Native.

3- Frontend React.

1- BackEnd NodeJs

open NodeJs Folder

first you will need to install nodman prefered to install it globally

Either through cloning with git or by using npm (the recommended way):

npm install -g nodemon # or using yarn: yarn global add nodemon

And nodemon will be installed globally to your system path. You can also install nodemon as a development dependency:

npm install --save-dev nodemon

or

 yarn: yarn add nodemon -D

second thing we need to fill .env you will find it insidesecrets folder file like this

PORT = 80
NODE_ENV = development

#DATABASE
DB_USERNAME=
DB_PASSWORD=
DB_NAME=
DB_APP_NAME=

# you can add your URI Directly
DB_URI = mongodb+srv://<User Name>:< Password >@< Mongo DB>/?retryWrites=true&w=majority&appName=<App Name>

Now we finished setup let's start our server in dev mode

 npm run dev

YAY our SERVER should be working now Let's send some requests

2- Mobile Android Native

inside mobile folder you will need IDE like Android Studio and open the project with it you will need to connect firebase to the app here's the steps

1- from upper bar Tools -> Firebase
2- connect the app to firebase 
3- add your sha information to firebase project

or simplly you will find .apk file open it with emulator or install it in your device

3- FrontEnd

run next, it will fire web site at your browser at http://localhost:8000

npm start

. . .

Let's Explain how things work

first we prepare our Backend and start connecting database we are using Mongodb

second we have four RESTFUL Apis you will find it in routes.ts and every route has it's own service

url+'/posts'  GET  - {}
url+'/post'   POST - {  "userEmail" : string,  "userName" : string", "imageUrl" : string }
url+'/like'   PUT  - { "postId" : string, "userEmail" : string}
url+'/unlike' PUT  - { "postId" : string, "userEmail" : string}

third we have mobile app that works in mvvm design pattern that connect the api

first screen we get the list of posts we can like and unlike posts once the app got a data it cache the posts in database for offline use third you can upload photo and create new post using any email you like also you can change the email that you use for like and unlike from settings

About

Small full stack social media ( Mobile - Website - Backend )

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors