-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
11,375 additions
and
12,631 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
module.exports = { | ||
env: { | ||
browser: true, | ||
commonjs: true, | ||
es6: true | ||
}, | ||
extends: [ | ||
'standard' | ||
], | ||
globals: { | ||
Atomics: 'readonly', | ||
SharedArrayBuffer: 'readonly' | ||
}, | ||
parserOptions: { | ||
ecmaVersion: 2018 | ||
}, | ||
rules: { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,68 @@ The code is uploaded here in the hopes it can be made more secure, more efficien | |
If you see a serious safety breach, particularly one involving user data, please submit an issue or - even better - a fix, and I'll upload the updated code to the server as soon as I can. Your support is genuinely appreciated. | ||
|
||
sweet has been an extremely uphill learning experience for me - I'm entirely self-taught, and am acutely aware that this code is a mess in need of major editing and potentially re-writing. If you'd like to help out, you can find some planned and in-progress work on the [Trello](https://trello.com/b/wzCmHAqi/sweet-development) and more current stuff on the incomplete [functional specification](https://docs.google.com/document/d/1R6jw7jHLAzM-PkLaNzbyalOqKVmUIEzNyhNHpMMlj10/edit?usp=sharing) - get in touch, because I'd love your help. | ||
|
||
## Running in local dev | ||
|
||
Install mongodb however you prefer. On OS X with Homebrew, that's: | ||
|
||
``` | ||
brew install mongodb-community | ||
brew services start mongodb-community | ||
``` | ||
|
||
Then run `yarn` to install dependencies, then `yarn start` to start the server. Go to `http://localhost:8686` to see it running! | ||
|
||
If you do anything that triggers an email, it won't get sent for real in local dev, it'll just get output into your console. | ||
|
||
You need to prepopulate the users collection with Sweetbot to let logins work. Something like: | ||
|
||
``` | ||
db.users.insert({ | ||
_id: ObjectId("5c962bccf0b0d14286e99b68"), | ||
joined: Date.now(), | ||
lastOnline: Date.now(), | ||
lastUpdated: Date.now(), | ||
isVerified: false, | ||
verificationToken: '', | ||
verificationTokenExpiry: Date.now(), | ||
email: '[email protected]', | ||
username: 'sweetbot', | ||
password: 'invalid password hash', | ||
passwordResetToken: '', | ||
passwordResetTokenExpiry: Date.now(), | ||
image: '', | ||
imageEnabled: false, | ||
displayName: 'SweetBot', | ||
pronouns: 'bot/bot', | ||
aboutRaw: '', | ||
aboutParsed: '', | ||
websiteRaw: '', | ||
websiteParsed: '', | ||
location: '', | ||
notifications: [], | ||
pushNotifSubscriptions: [], | ||
communities: [], | ||
bannedCommunities: [], | ||
mutedCommunities: [], | ||
hiddenRecommendedUsers: [], | ||
hiddenRecommendedCommunities: [], | ||
settings: { | ||
timezone: "auto", | ||
autoDetectedTimeZone: "", | ||
profileVisibility: "invisible", | ||
newPostPrivacy: "public", | ||
imageQuality: "standard", | ||
homeTagTimelineSorting: "fluid", | ||
userTimelineSorting: "chronological", | ||
communityTimelineSorting: "fluid", | ||
flashRecentComments: true, | ||
digestEmailFrequency: "off", | ||
emailTime: "17:00", | ||
emailDay: "Sunday", | ||
showRecommendations: true, | ||
showHashtags: true, | ||
sendMentionEmails: true, | ||
} | ||
}) | ||
``` |
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.