No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
test
.gitignore
Procfile
README.md
app.js
package.json

README.md

Majapahit

Features

Authentication

  • User login, register or logout

User

  • Set or update avatar, username, name or bio
  • Read user profile by username
  • Search user by username or name
  • Delete user account

Follow

  • Follow or unfollow user
  • Read user followers or followings

Post

  • Create post image or video
  • Update caption
  • Feeds
  • Read single post
  • Read user posts
  • Search posts by hashtag
  • Delete post

Comment

  • Create or update comment
  • Read comments by post
  • Delete comment

Like

  • Like or unlike post
  • Read post likes

Activity

  • Read my posts activities or users I've followed

Notification

  • Mention in caption by other user
  • Mention in comment by other user
  • Commented in my post
  • Followed by other user
  • Liked my post by other user
  • Push notifications
  • Read notifications

Requirements

  • Node.js
  • npm
  • MongoDB

Setup

Installation

Before running the Majapahit, ensure you have node + npm installed and run: $ npm install

Config For App

  • Change mongoose: '[YOUR MongoDB URI]' in /app/config.js

  • Change oneSignalKey: '[YOUR ONESIGNAL KEY]' in /app/config.js

  • Change oneSignalAppID: '[YOUR ONESIGNAL APP ID]' in /app/config.js

  • Change firebaseDatabase: 'https://[YOUR PROJECT ID].firebaseio.com/' in /app/config.js

  • Change portConfig: '[YOUR_PORT_HERE]' in /app/config.js

  • Change firebaseAdmin: '[FULLPATH/TO/Your Firebase Admin SDK File]' in /app/config.js

Config For Test

  • Change host: '[YOUR HOST]' in /test/config.js

  • Change firebaseToken: '[FIREBASE TOKEN FROM CLIENT]' in /test/config.js

  • Change device: '[ONESIGNAL player_id FROM CLIENT]' in /test/config.js

  • Change firebaseTokenSecondUser: '[FIREBASE TOKEN FROM CLIENT FOR SECOND USER]' in /test/config.js

  • Change deviceSecondUser: '[ONESIGNAL player_id FROM CLIENT FOR SECOND USER]' in /test/config.js

Run

Before running the Majapahit, make sure MongoDB is running

App

$ npm start

Test

$ npm test

Collections

Run in Postman