A social news aggregation website and discussion portal!
Explore the docs »
·
Report Bug
·
Request Feature
Table of Contents
An attempt to partially build a replica of reddit.
Architecture in detail's
- Authentication Modal Login & SignUp
- TimeLineFeed from the People and the community you follow!
- TimeLine
- Create a Post
- Post: Title & Text Bos and submit
- Images & Videos : Upload
- `Link` | `Poll` | `Talk with mic`
State Management:
- Local State : useState()
- Global state : Recoil
- server state : ?
- URL state : Nextjs [useRouter()]
Firestore : a document reference, creating a community
-
Database
:users & community
-
users
can join many community -
community
can have many users |Many to Many relation
-
Atomic Operations
: Firestore supports atomic ops to read and write data. 2 types :Transactional
&Batched Writes
. -
Transactional
: a set ofread
&write
operations on one or more documents. -
Batched Writes
: a set ofwrite
operations on one or more documents.
Votes on Posts
: The most fun part of this project.
UpVote
orDownVote
- voting function's :
upvote
,downvote
,removing the Vote (upvote => neutral or downvote => neutral)
andFlipping the Vote (up => down or down => up)
Instructions on setting up this project locally. To get a local copy up and running follow these simple example steps.
How to use the software and how to install them.
- npm
npm install npm@latest -g
- Setup a webapp in firebase DB
- Clone the repo
git clone https://github.com/roshray/redlit.git
- Install NPM packages
npm install
- Enter your Firebase API in
.env
NEXT_PUBLIC_FIREBASE_API_KEY = "enterYoUrkEy", NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN = "", NEXT_PUBLIC_FIREBASE_PROJECT_ID = "", NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET = "", NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID = "", NEXT_PUBLIC_FIREBASE_APP_ID = ""
Additional screenshots, code examples and demos are shared.
For more details, please refer to the Documentation
- Authentication as loggedIn & LoggedOut.
- Create Community,Post.
- Display the Post on the Feed.
- comment,vote and delete post.
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Project Link: https://github.com/roshray/redlit