/feddit

An open-source Reddit clone, made in 1 week.

Primary LanguageJavaScriptApache License 2.0Apache-2.0


Reddit clone made in 1 week.


As seen on YouTube

Contribution

Feel free to contribute to the project!

Issues

I am aware that there are a lot of issues with the project, if possible, open issues only for severe problems.

Self-hosting

  1. Create .env with the following contents:
DB=
Encryption_Key=

DB = MongoDB connection string.

Ecryption_Key = A string which will be used to encrypt the session cookies

  1. Run npm i
  2. Run npm test
  3. Go to https://127.0.0.2:3000

Encryption

Passwords are hashed account tokens are generated by jsonwebtoken via a secret.

Password example: $2b$10$3TsrEozOYxBa/nAwrwZazudUc68ut.oTR/o1RCXRASLnJxi7zMHw.
JWT token example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySUQiOiI2NDk2YTQ4NmUyMDZmM2RiNTI1Zjc3NjciLCJkYXRlIjoxNjg4Mzk1NzYwNjY1LCJhZGRvbiI6IjE4ODk5NjIzNDNkMDk1ZTkzNjAzNmE2ODVhOTA1NDRmMWQ0MDQzYTYxZTc5MDY1NiIsInN1YmZlZGRpdHMiOnt9LCJkZXNjcmlwdGlvbiI6IkkgaGF2ZW4ndCBzZXQgYSBkZXNjcmlwdGlvbiB5ZXQhIiwiaWF0IjoxNjg4Mzk1NzYwfQ.CJgeCdC1VKKQ5oPuGg7veLnO1pkcAg8Y_vG-en7e1BQ

Algorithm

Also available inside /src/Backend/Routes/generatefeed.js

image

License

Apache-2.0