Skip to content

yongxin12/Social-Distribution-Webapp

Repository files navigation

Backend set up

Backend dependency install

pip3 install -r requirements.txt
python3 -m venv venv
source venv/bin/activate

Django:

How to set up database

python3 manage.py makemigrations
python3 manage.py migrate

delete .py files in /migrations EXCEPT __init__.py if needed 

How to load mock data

python3 manage.py loaddata mock_data.json

How to setup github tasks

python manage.py setup_github_tasks
python manage.py process_tasks

How to run the server

python3 manage.py runserver

RESTful API samples

http://localhost:8000/api/author/
http://localhost:8000/api/post/?author_id=<pk>&following_list=1   return posts of authors followed by <pk>



http://localhost:8000/api/post/?author_id=1 
[UNAVAILABLE] http://localhost:8000/api/author/1/   # id=1
[UNAVAILABLE] http://localhost:8000/api/post?title=My%20first%20post # title=My first post

http://localhost:8000/admin # username:rex password:1 
http://localhost:8000/api/signup/ # returns a token upon successfuly signup
http://localhost:8000/api/login/ # returns a token upon successfuly login 

Other useful info:

default password 1

id username display_name user
1 aa A A 1
2 js Jane Smith 2
3 aj Alice Jones 3

all has 1 public post 1,3 has 1 unlisted and 1 friend-only posts

1 follows 2,3 || 2 follows 3 || 3 follows 1

1,3 are friends

citation

https://chatgpt.com/

Frontend set up

Frontend dependency install

cd frontend
npm install

Run

npm start

Review Assignment Due Date CMPUT404-project-socialdistribution

CMPUT404-project-socialdistribution

See the web page for a description of the project.

Make a distributed social network!

License

Apache 2.0

Copyright

The authors claiming copyright, if they wish to be known, can list their names here...

  • Rex Zheng
  • Ansh Desai
  • Sukhmanjeet Singh
  • Yolanda Chu
  • Daniel Akanmu
  • Farhan Rashid =======

Instructions for using branches

backend = Backend
frontend = Frontend
everything working/testing = DEV
production = 2024

Set up for running

in project/backend/

git clone https://github.com/uofa-cmput404/f24-project-aquamarine.git

cd f24-project-aquamarine/

git fetch origin

check branch, should be in * 2024

git branch

checkout to the Backend branch

git checkout -b Backend origin/Backend

Read the README file Same procedures for the frontend , create a frontend directory, change the Backend name to frontend for commands

you will have something look like the following(raw mode).

project/
├── frontend/
│ ├── f24-project-aquamarine
│ │ ├── node_modules/
│ │ ├── public/
│ │ ├── src
│ │ ├── README
│ │ └── ...
├── backend/
│ ├── f24-project-aquamarine
│ │ ├── aquamarine/
│ │ ├── service/
│ │ ├── .gitignore
│ │ ├── manage.py
│ │ ├── README
│ │ └── ...
│ └── ...
└── ...

Review Assignment Due Date CMPUT404-project-socialdistribution

CMPUT404-project-socialdistribution

See the web page for a description of the project.

Make a distributed social network!

License

Apache 2.0

Copyright

The authors claiming copyright, if they wish to be known, can list their names here...

  • Rex Zheng
  • Ansh Desai
  • Sukhmanjeet Singh
  • Yolanda Chu
  • Daniel Akanmu
  • Farhan Rashid

Citations:

  • Sukhmanjeet Singh: I have used ChatGPT as a tool to enhance my understanding of this project, improve efficiency in handling errors, and assist with debugging. All code pertaining to my user stories has been thoroughly reviewed and is fully understood by me, ensuring a deep comprehension of its functionality. While it would be inefficient to cite every prompt used for debugging assistance (e.g., error analysis or clarification requests), I have documented and cited the specific prompts and dates for any code blocks generated by ChatGPT (such as CSS or similar).

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published