# heroku deployment
https://pacific-chamber-74192.herokuapp.com/
Follow these steps exactly to build the app for the first time:
- clone the repo:
git clone https://github.com/csc309-winter-2020/team64.git - navigate to the
team64folder - In the terminal create and run local Mongo database in the root directory of the repo
mkdir mongo-data mongod --dbpath mongo-data - In the root directory of the repo (team64):
# install server dependencies in the root directory npm install # install frontend dependencies in the mxxtape directory cd mxxtape npm install - To build the React app and start the server
npm run build-runin the root directory:npm run build-run
The web app should start in your browser at localhost:5000
There are two ways in which you can register and create a user profile:
- Using the frontend from:
- In the initial login page navigate and click on
Register now! - create an account using the input boxes
# Sample account creation inputs: email: user@user.com username: user new password: user comfirm password: user- submit the creation request by clicking on
Register now!
- In the initial login page navigate and click on
- Alternately, you can send a
POSTrequest to/users, for example you can use the following json body:{ "username": "user", "email": "user@user.com", "password": "user", }
You can only make an admin account by sending a POST request to /users. For example, you can use the following json body:
{
"username": "admin",
"email": "admin@admin.com",
"password": "admin",
"type": 2
}
- connect with the url
mongodb://localhost:27017/
- Replaced mock data with a MongoDB database
- Built a backend API running an Express server
We have 4 collections in our mxxtape database:
- communities
- Containing each community's information such as community name, genre, descriptions and mostly importantly a list of posts (the feed) in the community discussion board
- posts
- a nested collection inside communities storing all posts information made in a community
- featuredsongs
- Stores the featured song selected by an admin that is displayed onto all user's dashboard
- users
- a collection of user info including login info and subscriptions etc.
- The Dashboard is intended as the user’s primary landing page. It contains a user’s ‘starred song’, which they can change, as well as several cards with various other songs. The Featured card is set by the site admin for all users, and contains a song they think is worth sharing. The Recommended card contains various songs from communities the user frequents. The History card contains songs the user has recently listened to, and the Communities card contains the communities the user is subscribed to. The History and Communities cards both contain links to a page with the full list, to save space.
NB: Currently, the default site does not navigate to specific user’s dashboards. To view a specific user, go to /dashboard/[Username]. ‘Connor’ currently has a profile picture.
- The Admin Dashboard is a feature-focused dashboard intended to be the admin’s center of attention. The Featured card allows the admin to see the currently featured song, as well as set a new one. The remaining cards are administrative requests sent in by users, which the admin can choose to approve or deny.
- The Profile is intended to be seen by everyone except the person who owns it. A lightweight version of the Dashboard, Profile is intended to give a quick overview of another user’s activity on the site. Lacking any means of customization, it is intended to allow the viewer to see another user’s profile picture, starred song, history, and subscribed communities.
NB: To access, go to /profile/[Username]. ‘Connor’ currently has a profile picture.
- Using the nav bar dropdown option
Community Creation, request and create a new community - Using the search bar, search for the requested community , this should direct you to the community page
- Once the community page use Join Community, to join, upon doing so you will have the ability to create and post to the community feed
- 2 Ways to make post:
a. Text posts:
- You may input upto 140 characters, and content must not be blank (otherwise post cannot be executed)
- Tags format:
TAG1; TAG2; TAG3; ...so for example you can havejazz; it; up;(must be separated by;and have proper spacing). Must hit enter to process inputted tags. b. Music posts: - has to be a soundcloud url and url cannot be blank - tags follow the same rule as text posts tags - can give a rating out of 5
- like/dislike a post
- can sort the feed by most recent or oldest
- leave community will not let you post
- play music, look through reviews and comments
Instead of using the front end form you can also send a POST request to http://localhost:5000/posts/.
- For example:
{ "author": "sally", "avatar":"https://tinyurl.com/qw9rxdj", "community_id": 0, "content": "Welcome to the Jazz it Up community. A space to talk, share, and spread love for jazz music! ", "tags": ["welcome"], "post_type": "text" }
Similar to how user page works, but cannot leave a community
Login form:
- fairly straightforward: login with your username and password and click
login- if you enter an invalid combination you will not be able to enter the app
- enter username
- enter password
- click
log in
- will redirect to dashboard of the type of user you logged in as
Register Page:
- from login page you can navigate to register page
- click on
register now!
- click on
- refresh the window manually
- enter your information as directed
- invalid email addresses will not be accepted
- click
Register now!to submit the form - will redirect to the login page
Forgot password page:
- from login page you can navigate to forgot password page
- click on
Forgot password - refresh the window manually
- click on
- enter your information as directed
- need to click
Submitto submit the form
- need to click
- will redirect to the login page
- after login, start at
http://localhost:3000 - in top right corner hover over
profile, click onAccount settings- will navigate to settings page
- there will be a form with fields you can modify
- lcick change to have the option to change these fields
- only valid submissions for certain fields are allowed:
- email can only have email addresses
- usernames can't be changed
- passwords must match
- name, about cna change as needed
- can upload an image from your desktop to change your avatar
- must be under 2 mb
- must be jpeg or png
- after fresh login, start at
http://localhost:3000 - click on the bell (it should have a 3)
- will navigate to notifications page
- a few things you can do here, if you want to try each, restart at 1 each time
- mark all notifications as read (click the button)
- notifications badge should go awat
- go to community with the post
- if post was unread, will decrease the read notifications
- mark all notifications as read (click the button)
- load more notifications (that have already been read)
- after login, start at
http://localhost:3000 - in top right corner hover over
profile, click onCreate Communtiy- will navigate create a community page
- Enter information as directed
- get help by hovering over the question marks