Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tiny murky workspace: Readme complete #387

Open
wants to merge 440 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
440 commits
Select commit Hold shift + click to select a range
6c96a43
Prettier
TinyMurky Aug 26, 2023
aa843c9
Merge pull request #39 from TinyMurky/tiny_murky_workspace
iamcoolalan Aug 26, 2023
4295ccb
Modify html
Taiwania Aug 26, 2023
bf3bd2c
Solve conflict
Taiwania Aug 26, 2023
3a1b6a1
Minor fix
Taiwania Aug 26, 2023
b0b0f77
Merge remote-tracking branch 'origin/main' into tiny_murky_workspace
TinyMurky Aug 26, 2023
3ab0b21
Merge branch 'tiny_murky_workspace' into Feature/homepage_view
TinyMurky Aug 26, 2023
640af5f
Fix Like model from m->m to 1->m->1
TinyMurky Aug 26, 2023
e4b58e4
Reset tweetId->TweetId userId->UserId
TinyMurky Aug 26, 2023
5ab978e
Same
TinyMurky Aug 26, 2023
7d3f16d
feat: add users can see their own tweets
iamcoolalan Aug 26, 2023
ec44689
feat: add user can view edit page & edit their info
iamcoolalan Aug 26, 2023
699fc5a
Hot fix: Now Models test all green and delete is Auth
TinyMurky Aug 27, 2023
083a6a3
Merge branch 'Feature/homepage_view' into tiny_murky_workspace
TinyMurky Aug 27, 2023
776d7f0
Merge pull request #40 from Taiwania/main
TinyMurky Aug 27, 2023
0c26222
Merge branch 'main' into tiny_murky_workspace
TinyMurky Aug 27, 2023
f420773
Merge branch 'tiny_murky_workspace' into Feature/homepage_view
TinyMurky Aug 27, 2023
1686e12
Delete console.log isAuth, move modal and nav bar to partial
TinyMurky Aug 27, 2023
ac861d0
Merge branch 'Feature/homepage_view' into tiny_murky_workspace
TinyMurky Aug 27, 2023
db91cf1
refactor jwt login, delete local login
TinyMurky Aug 27, 2023
20b4bee
Merge branch 'tiny_murky_workspace' into Feature/homepage_view
TinyMurky Aug 27, 2023
fdecb75
refactor login redirect, delete isAuthenticated
TinyMurky Aug 27, 2023
b7fc23a
Merge branch 'tiny_murky_workspace' into Feature/homepage_view
TinyMurky Aug 27, 2023
5310cf4
Fix variable typo
TinyMurky Aug 27, 2023
ea3093a
Merge branch 'tiny_murky_workspace' into Feature/homepage_view
TinyMurky Aug 27, 2023
73db67b
Minor modify
Taiwania Aug 27, 2023
092bea9
Merge remote-tracking branch 'upstream/main'
Taiwania Aug 27, 2023
e1978f2
Merge pull request #43 from TinyMurky/tiny_murky_workspace
iamcoolalan Aug 27, 2023
03d1963
edit tweet modal
TinyMurky Aug 27, 2023
d8ee84d
Merge branch 'Feature/homepage_view' into tiny_murky_workspace
TinyMurky Aug 27, 2023
841063f
Merge branch 'main' into tiny_murky_workspace
TinyMurky Aug 27, 2023
822a053
Merge branch 'tiny_murky_workspace' into Feature/homepage_view
TinyMurky Aug 27, 2023
14e478e
merge: merge upstream
iamcoolalan Aug 27, 2023
4f730b8
Fix conflict
Taiwania Aug 27, 2023
7ac66c6
Fix admin tweets error
Taiwania Aug 27, 2023
58fcea0
Merge pull request #44 from Taiwania/main
TinyMurky Aug 27, 2023
5fad1b2
Home Page Complete!
TinyMurky Aug 27, 2023
eb0f86f
Merge branch 'Feature/homepage_view' into tiny_murky_workspace
TinyMurky Aug 27, 2023
f47d399
Merge branch 'main' into tiny_murky_workspace
TinyMurky Aug 27, 2023
65f68de
Fix tweetModel to show warning message
TinyMurky Aug 27, 2023
8a8ac43
Fix replies link
TinyMurky Aug 27, 2023
c9924cb
feat: user can view edit page
iamcoolalan Aug 27, 2023
d110b1a
feat: modify user edit page
iamcoolalan Aug 27, 2023
ad82c4f
modify user tweets page
iamcoolalan Aug 27, 2023
c1eb3df
Merge pull request #46 from iamcoolalan/feature/user
TinyMurky Aug 27, 2023
6b2f672
replies page show replies complete
TinyMurky Aug 27, 2023
d6354e4
Merge branch 'main' into tiny_murky_workspace
iamcoolalan Aug 27, 2023
947c71f
Merge branch 'main' into tiny_murky_workspace
TinyMurky Aug 27, 2023
c8fbc2a
Merge branch 'tiny_murky_workspace' into Feature/Replies_page
TinyMurky Aug 27, 2023
925a057
Merge pull request #45 from TinyMurky/tiny_murky_workspace
iamcoolalan Aug 27, 2023
5608c48
Build user admin page
Taiwania Aug 27, 2023
4486cce
Merge pull request #47 from Taiwania/main
iamcoolalan Aug 27, 2023
f1f7e8a
Change template to the admin versions
Taiwania Aug 27, 2023
01ded2d
Merge remote-tracking branch 'upstream/main'
Taiwania Aug 27, 2023
830f77f
Hot fix user view
TinyMurky Aug 27, 2023
aebb7f4
Merge branch 'Feature/Replies_page' into tiny_murky_workspace
TinyMurky Aug 27, 2023
74e5b6b
Modify the position of the delete cross
Taiwania Aug 27, 2023
a3adfd0
Merge remote-tracking branch 'origin/tiny_murky_workspace' into tiny_…
TinyMurky Aug 27, 2023
1f8d967
Merge branch 'tiny_murky_workspace' into Feature/Replies_page
TinyMurky Aug 27, 2023
ca3bf64
Merge pull request #48 from Taiwania/main
TinyMurky Aug 27, 2023
bf37be0
Merge remote-tracking branch 'origin/main' into tiny_murky_workspace
TinyMurky Aug 27, 2023
1c6df52
Merge branch 'tiny_murky_workspace' into Feature/Replies_page
TinyMurky Aug 27, 2023
e2b29c7
Modify the navbar of admin
Taiwania Aug 27, 2023
b2c7527
Merge remote-tracking branch 'upstream/main'
Taiwania Aug 27, 2023
b0aa248
Merge pull request #49 from Taiwania/main
TinyMurky Aug 27, 2023
5021df9
Merge remote-tracking branch 'origin/main' into tiny_murky_workspace
TinyMurky Aug 27, 2023
3c5f2e0
Merge branch 'tiny_murky_workspace' into Feature/Replies_page
TinyMurky Aug 27, 2023
f376a33
View hotfix , now can display scroll normally
TinyMurky Aug 28, 2023
7cf3749
Merge branch 'Feature/Replies_page' into tiny_murky_workspace
TinyMurky Aug 28, 2023
5e65224
Reply Modal view完成
TinyMurky Aug 28, 2023
1791530
replies complete
TinyMurky Aug 28, 2023
35fd07b
increase heart icon and some minor change
TinyMurky Aug 28, 2023
99a77b6
Merge branch 'Feature/Replies_page' into tiny_murky_workspace
TinyMurky Aug 28, 2023
aaf5969
feat: user can edit their info
iamcoolalan Aug 28, 2023
0d922f0
fix: wrong error message
iamcoolalan Aug 28, 2023
163da43
Merge pull request #51 from TinyMurky/tiny_murky_workspace
TinyMurky Aug 28, 2023
053fd23
Merge branch 'main' into feature/user
TinyMurky Aug 28, 2023
12e901c
Merge pull request #53 from iamcoolalan/feature/user
TinyMurky Aug 28, 2023
f5721f7
add getUserFollower cintroller
TinyMurky Aug 28, 2023
ccccc6f
Merge branch 'main' into tiny_murky_workspace
TinyMurky Aug 28, 2023
f366049
Merge branch 'tiny_murky_workspace' into Feature/User_following
TinyMurky Aug 28, 2023
d164d57
Merge branch 'Feature/User_following' into tiny_murky_workspace
TinyMurky Aug 28, 2023
90da718
left nav bar hot fix
TinyMurky Aug 28, 2023
8675b6c
feat: user can browse tweets they have liked.
iamcoolalan Aug 28, 2023
950d32b
feat: user can browse tweets they have replied.
iamcoolalan Aug 28, 2023
1084a7c
Merge branch 'feature/user' of https://github.com/iamcoolalan/simple-…
iamcoolalan Aug 28, 2023
f272722
User followings/followers complete
TinyMurky Aug 28, 2023
08c3580
Merge branch 'Feature/User_following' into tiny_murky_workspace
TinyMurky Aug 28, 2023
600121e
feat: modify user layout
iamcoolalan Aug 28, 2023
8e15044
Merge pull request #54 from iamcoolalan/feature/user
TinyMurky Aug 28, 2023
ddb87a0
Merge branch 'main' into tiny_murky_workspace
TinyMurky Aug 28, 2023
917f490
Modify getAdminHomePage and getTweets route and update the patches
Taiwania Aug 28, 2023
3753074
Merge remote-tracking branch 'upstream/main'
Taiwania Aug 28, 2023
01f0ca4
Return bcrypt-nodejs
Taiwania Aug 28, 2023
143c121
Merge pull request #56 from TinyMurky/tiny_murky_workspace
Taiwania Aug 28, 2023
eae6657
Merge pull request #55 from Taiwania/main
iamcoolalan Aug 28, 2023
e7a2979
Merge branch 'main' into tiny_murky_workspace
TinyMurky Aug 28, 2023
b0380f5
Users list page can get the data
Taiwania Aug 28, 2023
af69191
Add deleteTweets routes
Taiwania Aug 28, 2023
93150be
Modify the first path when admin login sucessfully
Taiwania Aug 28, 2023
93d4b35
fix: fix some bug from user feature
iamcoolalan Aug 29, 2023
3625f0b
style: arrange routes
iamcoolalan Aug 29, 2023
9637504
Merge pull request #58 from iamcoolalan/feature/user
TinyMurky Aug 29, 2023
ecb25ae
Merge pull request #57 from Taiwania/main
TinyMurky Aug 29, 2023
4b6cc20
Merge branch 'main' into tiny_murky_workspace
TinyMurky Aug 29, 2023
4b910f5
Add Passport add localstrategy
TinyMurky Aug 29, 2023
5745440
add localstorage but view broken
TinyMurky Aug 29, 2023
c6e7b6b
feat: users can immediately see if the password and confirm password …
iamcoolalan Aug 29, 2023
b84aba1
Session done, before testing
TinyMurky Aug 29, 2023
a17ee56
Delete JWT
TinyMurky Aug 29, 2023
409e3a5
Merge branch 'iamcoolalan-feature/user'
iamcoolalan Aug 29, 2023
53c896c
Merge branch 'tiny_murky_workspace' into iamcoolalan-feature/user
TinyMurky Aug 29, 2023
3c1e4aa
Merge branch 'iamcoolalan-feature/user' into tiny_murky_workspace
TinyMurky Aug 29, 2023
0f9839e
Merge branch 'Feature/session_passport' into tiny_murky_workspace
TinyMurky Aug 29, 2023
e490a19
a
TinyMurky Aug 29, 2023
4a7c555
Merge branch 'iamcoolalan-feature/user' into tiny_murky_workspace
TinyMurky Aug 29, 2023
311ec86
Merge branch 'tiny_murky_workspace' into Feature/session_passport
TinyMurky Aug 29, 2023
9ec39e5
admin
TinyMurky Aug 29, 2023
13c31aa
Merge branch 'Feature/session_passport' into tiny_murky_workspace
TinyMurky Aug 29, 2023
81f4420
Merge branch 'tiny_murky_workspace' into iamcoolalan-feature/user
TinyMurky Aug 29, 2023
12c9293
merge from alan
TinyMurky Aug 29, 2023
7660edb
Merge branch 'Feature/session_passport' into tiny_murky_workspace
TinyMurky Aug 29, 2023
16076df
delete page route
TinyMurky Aug 29, 2023
a08f858
Hot fix tweet post
TinyMurky Aug 29, 2023
aaa287a
Merge branch 'Hotfix/fix_post_timeout' into tiny_murky_workspace
TinyMurky Aug 29, 2023
19c4c68
Merge pull request #61 from TinyMurky/tiny_murky_workspace
iamcoolalan Aug 29, 2023
631477b
Merge remote-tracking branch 'upstream/main' into style/arrange-style
iamcoolalan Aug 29, 2023
f7446c2
style: arrange user controller
iamcoolalan Aug 29, 2023
dde1056
error_box
TinyMurky Aug 29, 2023
83a5939
Merge branch 'main' into tiny_murky_workspace
TinyMurky Aug 29, 2023
7b897a9
Merge branch 'Feature/error_box' into tiny_murky_workspace
TinyMurky Aug 29, 2023
337be4b
Merge branch 'tiny_murky_workspace' into Feature/error_box
TinyMurky Aug 29, 2023
743c3b8
Backend tests are only 1 fail
Taiwania Aug 29, 2023
da4e23f
Merge pull request #63 from Taiwania/main
iamcoolalan Aug 29, 2023
2a7a18d
error_box_complete
TinyMurky Aug 29, 2023
87fedda
Merge branch 'Feature/error_box' into tiny_murky_workspace
TinyMurky Aug 29, 2023
d9e1589
Merge branch 'main' into tiny_murky_workspace
TinyMurky Aug 29, 2023
552f36a
finish backend
TinyMurky Aug 29, 2023
701dac5
Merge pull request #62 from TinyMurky/tiny_murky_workspace
iamcoolalan Aug 29, 2023
c8a420a
merging
Taiwania Aug 29, 2023
03cce5c
Merge remote-tracking branch 'origin/main' into tiny_murky_workspace
TinyMurky Aug 29, 2023
67fb80c
20
TinyMurky Aug 29, 2023
857172f
Merge pull request #64 from TinyMurky/tiny_murky_workspace
iamcoolalan Aug 29, 2023
7af46d0
unstall bcrypt
TinyMurky Aug 29, 2023
853af79
Merge remote-tracking branch 'origin/main' into tiny_murky_workspace
TinyMurky Aug 29, 2023
08888a6
Merge pull request #65 from TinyMurky/tiny_murky_workspace
iamcoolalan Aug 29, 2023
d34e3f3
uninstall bcrypt-nodejs
TinyMurky Aug 29, 2023
aedf060
Merge pull request #66 from TinyMurky/tiny_murky_workspace
iamcoolalan Aug 29, 2023
c37a9f2
Add delete modal
Taiwania Aug 29, 2023
4488fd2
fix conflict
Taiwania Aug 29, 2023
4b67688
Add delete modals to confirm deletion
Taiwania Aug 29, 2023
9378274
Minor modify the delete modal script
Taiwania Aug 29, 2023
a5bb0dd
docs: add readme
iamcoolalan Aug 30, 2023
0832566
Merge remote-tracking branch 'upstream/main' into docs/readme
iamcoolalan Aug 30, 2023
bc9676d
bcypt node js install
TinyMurky Aug 30, 2023
746f107
Merge pull request #68 from iamcoolalan/docs/readme
TinyMurky Aug 30, 2023
25fdaa9
Merge pull request #67 from Taiwania/main
TinyMurky Aug 30, 2023
dd4dfa5
Merge branch 'main' into tiny_murky_workspace
TinyMurky Aug 30, 2023
d971d46
rebuild package-lock
TinyMurky Aug 30, 2023
cbc9d4d
Regenerate package-lock.json
TinyMurky Aug 30, 2023
e3d973c
Regenerate package-lock.json
TinyMurky Aug 30, 2023
e485051
ban travis use catch
TinyMurky Aug 30, 2023
e2b96d5
travis 使用npm install
TinyMurky Aug 30, 2023
c0f1cbf
Remove NODE_ENV=test
TinyMurky Aug 30, 2023
d47e09d
add env
TinyMurky Aug 30, 2023
5c0950a
fix: presenting multiple error notifications
iamcoolalan Aug 30, 2023
164bdcf
Merge pull request #69 from iamcoolalan/fix/fix-bug
TinyMurky Aug 30, 2023
2f50abd
add testLocal
TinyMurky Aug 30, 2023
8dde39a
Merge branch 'main' into tiny_murky_workspace
TinyMurky Aug 30, 2023
c45e210
passport now can function normal
TinyMurky Aug 30, 2023
a982437
Merge branch 'Refactor/passport' into tiny_murky_workspace
TinyMurky Aug 30, 2023
15e9445
Merge branch 'tiny_murky_workspace' into main
TinyMurky Aug 30, 2023
14c8baf
Merge branch 'main' into tiny_murky_workspace
TinyMurky Aug 30, 2023
cef363c
Merge remote-tracking branch 'upstream/main' into style/arrange-style
iamcoolalan Aug 30, 2023
08b7b93
style: arrange project document
iamcoolalan Aug 30, 2023
84e62a6
style: arrange user helper & topFollowedUser
iamcoolalan Aug 30, 2023
1b6d800
style: arrange tweet & replies helper
iamcoolalan Aug 30, 2023
3126c20
fix: modify getTweetReplies function
iamcoolalan Aug 30, 2023
2845a41
style: delete unused file in partial
iamcoolalan Aug 30, 2023
c774569
Merge pull request #70 from TinyMurky/tiny_murky_workspace
iamcoolalan Aug 30, 2023
1e7bb3b
Merge branch 'main' into style/arrange-style
TinyMurky Aug 30, 2023
32b7dfe
Merge pull request #71 from iamcoolalan/style/arrange-style
TinyMurky Aug 30, 2023
835e039
Merge branch 'main' into tiny_murky_workspace
TinyMurky Aug 30, 2023
feee880
fix: fix admin can't delete right tweet
iamcoolalan Aug 30, 2023
d08bdd2
fix backend user/reply
TinyMurky Aug 30, 2023
daed588
user front end complete
TinyMurky Aug 30, 2023
16bc70d
fix: fix error view
iamcoolalan Aug 30, 2023
4b8ef39
Merge pull request #73 from iamcoolalan/fix/fix-bug
TinyMurky Aug 30, 2023
b99275e
Merge pull request #72 from TinyMurky/tiny_murky_workspace
iamcoolalan Aug 30, 2023
e3be3ce
README
TinyMurky Aug 30, 2023
e0b2153
Merge branch 'main' into tiny_murky_workspace
TinyMurky Aug 30, 2023
96da1a6
Merge branch 'tiny_murky_workspace' into Feature/readme_gif
TinyMurky Aug 30, 2023
4a49e41
Hotfix, replies message, 推文上一頁
TinyMurky Aug 30, 2023
ca60f60
Merge branch 'Feature/readme_gif' into tiny_murky_workspace
TinyMurky Aug 30, 2023
edd156a
Merge pull request #74 from TinyMurky/tiny_murky_workspace
iamcoolalan Aug 30, 2023
68efb6a
Merge branch 'main' into tiny_murky_workspace
TinyMurky Aug 30, 2023
0c6e16a
fix admin user card sort by tweets count
TinyMurky Aug 30, 2023
b87e26c
Merge pull request #75 from TinyMurky/tiny_murky_workspace
iamcoolalan Aug 30, 2023
c11412e
Merge branch 'main' into tiny_murky_workspace
TinyMurky Aug 30, 2023
924c3f5
readme complete
TinyMurky Aug 30, 2023
52c133b
Merge branch 'Feature/Readme' into tiny_murky_workspace
TinyMurky Aug 30, 2023
edb08ca
hot fix admin /user should check all user include root
TinyMurky Aug 30, 2023
0b2bd9d
Merge branch 'tiny_murky_workspace' into main
TinyMurky Aug 30, 2023
45c61ad
Merge pull request #76 from TinyMurky/tiny_murky_workspace
iamcoolalan Aug 30, 2023
8c62137
Merge remote-tracking branch 'origin/main' into main
TinyMurky Aug 30, 2023
7201b81
Merge branch 'main' into tiny_murky_workspace
TinyMurky Aug 30, 2023
5d529b5
Fix user replies display login user issue
TinyMurky Aug 30, 2023
8386fb2
Merge branch 'Hotfix/views' into tiny_murky_workspace
TinyMurky Aug 30, 2023
d2ff695
Merge pull request #77 from TinyMurky/tiny_murky_workspace
Taiwania Aug 30, 2023
3bc1406
Hot fix package.json
TinyMurky Aug 30, 2023
63a21c9
Merge pull request #78 from TinyMurky/tiny_murky_workspace
Taiwania Aug 30, 2023
217242b
change node version to 14.21.3
iamcoolalan Aug 31, 2023
99151c8
Merge remote-tracking branch 'upstream/main'
iamcoolalan Aug 31, 2023
81d6191
add version control
TinyMurky Aug 31, 2023
ba615d5
/admin/tweetsUnload backend complete
TinyMurky Aug 31, 2023
981a419
Merge branch 'tiny_murky_workspace' into Feature/unlimit_drowdown
TinyMurky Aug 31, 2023
22823da
unlimit drawdown
TinyMurky Aug 31, 2023
eee4cde
Merge branch 'Feature/unlimit_drowdown' into tiny_murky_workspace
TinyMurky Aug 31, 2023
f82ff6b
Merge pull request #79 from TinyMurky/tiny_murky_workspace
iamcoolalan Aug 31, 2023
b848fd3
delete unused code
TinyMurky Aug 31, 2023
0fe1a57
Merge branch 'tiny_murky_workspace' into Feature/unlimit_drowdown
TinyMurky Aug 31, 2023
6c10363
Merge pull request #80 from TinyMurky/tiny_murky_workspace
iamcoolalan Aug 31, 2023
6178464
Merge branch 'main' into tiny_murky_workspace
TinyMurky Aug 31, 2023
3150b8b
fix: need validate email pattern
iamcoolalan Aug 31, 2023
9b22d2f
fix: use history.back() didn't reload
iamcoolalan Aug 31, 2023
fdaa38b
init
TinyMurky Sep 1, 2023
54be5a5
Merge branch 'feature/unlimit_drowdown' into tiny_murky_workspace
TinyMurky Sep 1, 2023
980c447
add eslint
TinyMurky Sep 1, 2023
114ee5d
remove eslint
TinyMurky Sep 1, 2023
c73fb01
Merge pull request #81 from iamcoolalan/fix/fix-bug
TinyMurky Sep 2, 2023
8f22161
Add unlimited drowdown of tweets, replies, user tweet
TinyMurky Sep 2, 2023
431f589
Merge branch 'feature/unlimit_drowdown' into tiny_murky_workspace
TinyMurky Sep 2, 2023
6a1d39f
Merge branch 'tiny_murky_workspace' into feature/unlimit_drowdown
TinyMurky Sep 2, 2023
c018ffc
Merge branch 'main' into tiny_murky_workspace
TinyMurky Sep 2, 2023
e83a206
Merge branch 'tiny_murky_workspace' into feature/unlimit_drowdown
TinyMurky Sep 2, 2023
0a3494f
hotfix email login
TinyMurky Sep 2, 2023
f573e89
Merge branch 'tiny_murky_workspace' into feature/unlimit_drowdown
TinyMurky Sep 2, 2023
15b2f1c
complete user / like unlimit drawdown
TinyMurky Sep 2, 2023
979b897
All unlimited drawdown complete
TinyMurky Sep 2, 2023
bc40b3c
Merge branch 'feature/unlimit_drowdown' into tiny_murky_workspace
TinyMurky Sep 2, 2023
b5f5767
移除tweets取出時只會取出自己與跟隨的人的功能
TinyMurky Sep 3, 2023
0a3df02
Merge pull request #82 from TinyMurky/tiny_murky_workspace
TinyMurky Sep 3, 2023
17ab215
tweet hot fix
TinyMurky Sep 3, 2023
6e87ec2
topUser req=> userId
TinyMurky Sep 3, 2023
5fcb6d5
refactor: refactor error handler
iamcoolalan Sep 3, 2023
8a4b6c9
Merge pull request #83 from iamcoolalan/fix/fix-bug
TinyMurky Sep 3, 2023
6650dca
hot fix complete
TinyMurky Sep 3, 2023
8e631c4
Merge branch 'refactor/unload' into tiny_murky_workspace
TinyMurky Sep 3, 2023
5166484
Merge branch 'main' into tiny_murky_workspace
TinyMurky Sep 3, 2023
c98ef4d
解決新渲染的卡片reply modal壞掉的問題
TinyMurky Sep 3, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .ebextensions/env.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
option_settings:
aws:elasticbeanstalk:application:environment:
NODE_ENV: production
5 changes: 5 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
PORT=
SESSION_SECRET=
JWT_SECRET=
CLIENT_ID=
CLIENT_SECRET=
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/node_modules/*
/test/*
12 changes: 12 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
env:
browser: true
commonjs: true
es2021: true
extends:
- standard
parserOptions:
ecmaVersion: 12
rules:
arrow-parens:
- warn
- as-needed
53 changes: 53 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
* text=auto

# Source code
*.css text diff=css
*.html text diff=html
*.js text
*.json text

# Documentation
*.markdown text diff=markdown
*.md text diff=markdown
*.txt text

# Templates
*.handlebars text
*.hbs text

# Configs
*.cnf text
*.conf text
*.config text
.editorconfig text
.env text
.env.* text
.gitattributes text
.gitconfig text
*.lock text -diff
package.json text eol=lf
package-lock.json text -diff
yarn.lock text -diff
*.yaml text
*.yml text
browserslist text

# Heroku
Procfile text

# Graphics
*.gif binary
*.ico binary
*.jpg binary
*.jpeg binary
*.pdf binary
*.png binary
# SVG treated as an asset (binary) by default.
*.svg text
# If you want to treat it as binary,
# use the following line instead.
# *.svg binary
*.webp binary

# Ignore files (like .npmignore or .gitignore)
*.*ignore text
9 changes: 8 additions & 1 deletion .gitignore
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,11 @@ typings/
.fusebox/

# DynamoDB Local files
.dynamodb/
.dynamodb/
# Elastic Beanstalk Files
.elasticbeanstalk/*
!.elasticbeanstalk/*.cfg.yml
!.elasticbeanstalk/*.global.yml

# Tep store image
temp/
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v14.21.3
23 changes: 23 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"tabWidth": 2,
"singleQuote": true,
"semi": false,
"arrowParens": "avoid",
"trailingComma": "none",
"overrides": [
{
"files": [
"**/*.css",
"**/*.scss",
"**/*.html",
"**/*.handlebars",
"**/*.hbs"
],
"options": {
"singleQuote": false,
"parser": "angular",
"bracketSameLine": true
}
}
]
}
Empty file modified .travis.yml
100644 → 100755
Empty file.
2 changes: 2 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
}
234 changes: 234 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,234 @@
# Simple Twitter
「Simple Twitter」是一個社群網頁,其開發是利用 Node.js 配合 Express 和 Handlebars 來完成的。

## Live Demo

### [Simple Twitter(使用AWS佈署)](http://simple-twitter-dev.ap-northeast-1.elasticbeanstalk.com/)

![Homepage](./public/images/hompage-demo.png)

## 目錄

- [功能](#功能)
- [安裝專案](#安裝專案)
- [功能展示](#功能展示)
- [使用套件](#使用套件)
- [貢獻者](#貢獻者)


## 功能
### 登入系統
- 使用者可以註冊帳號
- 一般使用者只能登入前台
- 管理員只能登入後台
### 前台 (一般使用者)
- 使用者可以瀏覽所有的貼文
- 使用者可以新增貼文
- 使用者可以回覆貼文
- 使用者可以對別人的貼文按 Like/Unlike
- 使用者可以追蹤別人
- 使用者可以瀏覽別人的個人資訊
- 使用者可以編輯自己的個人資訊
### 後台 (管理員)
- 管理員可以瀏覽所有的推文
- 管理員可以刪除貼文
- 管理員可以瀏覽所有的使用者清單

## 安裝專案

1. 請先確認有安裝 node.js 、 npm 與 mySQL
2. 將專案 clone 至本地
3. 在本地開啟後,透過終端機進入資料夾,輸入 :

```bash
npm install
```

4. 安裝完畢後,設定各項環境變數

- 專案內有預設`.env.Example`, 將檔名中`.Example`刪除後,即可開始設定
- 請先至 [imgur](https://api.imgur.com/oauth2/addclient)申請API後,獲得下列資訊並填上。([(參考)如何申請imgur API](https://israynotarray.com/nodejs/20220517/432259079/))
```bash
CLIENT_ID= 'skip'
CLIENT_SECRET= 'skip'
REFRESH_TOKEN= 'skip'
```

5. 設定完畢後,請至 MySQL Workbench , 輸入以下指令建立資料庫
```bash
create database ac_twitter_workspace;
```

6. 資料庫建立完畢後,可以在終端機中輸入以下指令產生種子資料

```bash
npm run dbmigrate
```

##### *預設提供 1 位管理員 以及 14 位一般使用者可以做測試
| 使用者權限 | account | 密碼 |
| :---: | :---: | :---: |
| admin | root | 12345678 |

##### 一般使用者名稱造順序排列,且密碼皆為'12345678'
| 使用者權限 | account | 密碼 |
| :---: | :---: | :---: |
| user | user1 | 12345678 |
| user | user2 | 12345678 |
| ... | ... | ... |
| user | user14 | 12345678 |

7. 以上設定都完成之後,就可以輸入以下指令,使用專案囉!

```bash
nap run start
```

##### 如果在終端機看到以下訊息,就代表順利運行,可以使用此網址進入網頁[http://localhost:3000](http://localhost:3000)
```bash
Simple Twitter app listening on port 3000!
```

8. 若欲暫停使用

```bash
ctrl + c
```

## 功能展示

### 登入
使用非admin帳號登入前台
![](./README/demo_gif/login.gif)

帳號或密碼錯誤會有通知
![](./README/demo_gif/login_fail.gif)

admin帳號不可以登入前台
![](./README/demo_gif/login_admin_ban.gif)

user帳號不可以前往後台
![](./README/demo_gif/user_disallow.gif)
### 註冊
使用註冊頁面註冊,需要提供用戶名稱、帳號、密碼、密碼確認與信箱,註冊後頭項與背景為預設值
![](./README/demo_gif/signup.gif)

### 首頁
首頁可以查看自己與已追蹤使用者的所有貼文,依照時間順序最新的排最上面。
![](./README/demo_gif/homepage.gif)

### 發送推文
點擊上方的「有什麼新鮮事?」區塊,就可以跳出推文Modal, 輸入與送交推文時,會檢查字數是否於1~140字之間,若不是則禁止上傳並出現提示字樣。
送交成功後會出現通知訊息。
![](./README/demo_gif/tweet.gif)

### 回復推文
點擊`/tweet`或`/reply`頁面上的對話框icon,就可以跳出回覆Modal, 輸入與送交回覆時,會檢查字數是否於1~140字之間,若不是則禁止上傳並出現提示字樣。
送交成功後會出現通知訊息。
![](./README/demo_gif/reply.gif)

### 對貼文按Like/Unlike
點擊`/tweet`或`/reply`頁面上的愛心icon,可以對喜歡的推文like,愛心會變成紅色,再按一次可以unlike
![](./README/demo_gif/like.gif)

### 追蹤使用者
點擊跟隨圖案可以跟隨用戶,並使該用戶的推文在`/tweets`上出現被追蹤者的tweets
![](./README/demo_gif/follow.gif)
### 個人介面
點擊左方「個人資料」可以進入登入用戶的個人界面
![](./README/demo_gif/visit_user_page.gif)

點擊任一頭像或名稱可以進入該用戶的個人界面
![](./README/demo_gif/visit_other_user.gif)

在「推文」中可以看到該用戶的所有推文,也可以在此處like或回覆此貼文
![](./README/demo_gif/user_tweet.gif)

在「回覆」中可以看到該使用者所有的回覆,點擊後可以到`/reply`頁面查看原始推文
![](./README/demo_gif/user_reply.gif)

在「喜歡的內容」頁面可以看到該使用者所有喜歡的推文,如果在登入使用者的頁面取消喜歡,該推文會消失
![](./README/demo_gif/user_like.gif)

### 編輯個人資訊

個人頁面中點擊編輯個人資料可以修改頭像、背景、名稱與自我介紹,並有規定字數,若超過該字數則無法修改。
![](./README/demo_gif/edit_personalFile.gif)

### [後台]登入
後台只能使用`admin`帳號才能登入
![](./README/demo_gif/admin_login.gif)

從後台前往前台會被阻止並跳出通知訊息
![](./README/demo_gif/admin_disallow.gif)

一般使用者不可登入後台
![](./README/demo_gif/admin_fail.gif)

### [後台]首頁
「推文清單」中,依照tweets的建立時間順序由近至遠呈現所有tweets
![](./README/demo_gif/admin_tweet.gif)

### [後台]刪除貼文

可以在「推文清單」的tweets右上角按下「X」可以刪除用戶的tweet
![](./README/demo_gif/admin_delete.gif)

### [後台]查看所有使用者
在「使用者列表」中,`admin`以外的使用者依照他們所發送的tweets數量由多至少排序,已卡片形式排列。
![](./README/demo_gif/admin_user.gif)

## 使用套件

### 主環境

| Package | version |
| :--- | :--- |
| Node.js | v20.5.1 |
| express | v4.16.4 |

### 資料庫

| Package | version |
| :--- | :--- |
| mysql2 | v3.6.0 |
| sequelize | v6.32.1 |
| sequelize-cli | v6.6.1 |

### 外觀

| Package | version |
| :--- | :--- |
| express-handlebars | v7.1.2 |
| connect-flash | v0.1.1 |
| dayjs | v1.11.9 |
| faker | v4.1.0 |
| imgur | v2.3.0 |
| multer | v1.4.5-lts.1 |

### 登入功能

| Package | version |
| :--- | :--- |
| passport | v0.6.0 |
| passport-local | v1.0.0 |
| express-session | v1.15.6 |
| bcryptjs | v2.4.3 |

### 其他

| Package | version |
| :--- | :--- |
| dotenv | v16.3.1 |
| method-override | v3.0.0 |

### 程式碼風格

| Package | version |
| :--- | :--- |
| prettier | v3.0.2 |
| eslint | v8.47.0 |

## 貢獻者

### [Tiny Murky](https://github.com/TinyMurky) | [iamcoolAlan](https://github.com/iamcoolalan) | [Taiwania](https://github.com/Taiwania)
Binary file added README/demo_gif/admin_delete.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added README/demo_gif/admin_disallow.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added README/demo_gif/admin_fail.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added README/demo_gif/admin_login.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added README/demo_gif/admin_tweet.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added README/demo_gif/admin_user.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added README/demo_gif/edit_personalFile.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added README/demo_gif/follow.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added README/demo_gif/homepage.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added README/demo_gif/like.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added README/demo_gif/login.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added README/demo_gif/login_admin_ban.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added README/demo_gif/login_fail.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added README/demo_gif/reply.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added README/demo_gif/signup.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added README/demo_gif/tweet.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added README/demo_gif/user_card.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added README/demo_gif/user_disallow.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added README/demo_gif/user_like.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added README/demo_gif/user_reply.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added README/demo_gif/user_tweet.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added README/demo_gif/visit_other_user.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added README/demo_gif/visit_user_page.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 7 additions & 6 deletions _helpers.js
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
function ensureAuthenticated(req) {
return req.isAuthenticated();
// 通過測試使用
function ensureAuthenticated (req) {
return req.isAuthenticated()
}

function getUser(req) {
return req.user;
function getUser (req) {
return req.user
}

module.exports = {
ensureAuthenticated,
getUser,
};
getUser
}
Loading