A Social Media Platform similar to Reddit which allows users to create and join subgreddits. Users can post, comment, vote, and save content in subgreddits. Moderators can handle members, reports, bans, and growth. Users can edit their profile and settings.
JavaScript
Design and Analysis of Software Systems
Gowlapalli Rohit
All these commands are tested on Ubuntu Version 20.04.3 LTS (Focal Fossa)
1. Member Growth is represented by Number of Accepted Join Requests to a SubGreddit in a cumulative way
2. Due to mismatch b/w IST and GMT , some changes in Stats might not reflect instantaneously
3. Daily Visitors to a SubGreddit are calculated by counting number of Clicks to the Open-Button in SubGreddits page
4. Number of Deleted posts are calculated by subtracting Number of Reports in DB corresponding to SubGreddit from Number of All-time Reports in DB corresponding to SubGreddit
5. Image-Upload is mandatory for creating a New SubGreddit
6. Email Notifications would be sent to valid Emails only
7. At any instant , atmost only one of Ascending,Descending,Followers,Date sort can be active
8. A switch is used to represent Fuzzy Search
9. Some errors are handled in Backend and might not show corresponding messages in Frontend and may be shown through console output
10. Users are not allowed to follow themselves
11. Blocking User based on a Report removes reported user from SubGreddit and permanently bans him from Joining SubGreddit
12. None button is used to undo any sort applied in SubGreddit Page
13. At each place where the User is waiting for the API Call to finish , corresponding Buttons are disabled
14. Reports not handled even after TIME_PERIOD seconds from Time of Report Creation will be Deleted from the DB as soon as any Request involving that Report is Fetched
15. It is assumed that nginx and docker-compose.yml are part of the Outer-most Directory unlike the Submission Format mentioned for Assignment-Part 2 in Assignment.pdf
16. Moderators cannot Block themselves from their SubGreddit
FROM node:16-alpine
# ? install node
RUN apk add python3 make g++
# ? creat new user (optional)
USER node
RUN mkdir -p /home/node/app
WORKDIR /home/node/app
# ? copy package.json and package-lock.json
COPY --chown=node:node package*.json ./
# ? ci is exact install ( without upgraded version )
RUN npm i
# ? first . my PC
# ? second . docker working dir
COPY --chown=node:node . ./
# ? give access to 5000 port of docker
EXPOSE 3000
# RUN chmod +x /bin/sh
# RUN ls -a /bin/
RUN npm run build
CMD npx serve -s build -l 3000
frontend/.dockerignore:
node_modules
build
backend/Dockerfile:
FROM node:16-alpine
# ? install node
RUN apk add python3 make g++
# ? creat new user (optional)
USER node
RUN mkdir -p /home/node/app
WORKDIR /home/node/app
# ? copy package.json and package-lock.json
COPY --chown=node:node package*.json ./
# ? ci is exact install ( without upgraded version )
RUN npm i
# ? first . my PC
# ? second . docker working dir
COPY --chown=node:node . ./
# ? give access to 5000 port of docker
EXPOSE 5000
# RUN chmod +x /bin/sh
# RUN ls -a /bin/
CMD npm start