Greddiit is a Dockerized web portal inspired by Reddit, designed to provide a full-fledged social media experience. It allows users to register, create and manage posts, and moderate communities (Sub Greddiits). Built with the MERN stack (MongoDB, Express.js, React.js, Node.js), Greddiit ensures a scalable, secure, and responsive platform with Docker and Nginx for efficient content delivery and deployment.
- User Authentication: Secure login and registration with hashed passwords and token-based authentication.
- Post and Comment System: Create, view, upvote, and manage posts with multi-level commenting.
- Community Moderation: Moderators can manage Sub Greddiits, handle reports, and moderate users and content.
- Advanced Search and Filtering: Fuzzy search, filters, and nested sorting for an optimized browsing experience.
- Dockerized Deployment: Scalable and efficient deployment using Docker and Nginx.
- Docker and Docker Compose installed on your system.
-
Build Docker Services:
$ sudo docker-compose build
-
Run Docker Services:
$ sudo docker-compose up
Access the application in your web browser via
localhost:8000
.
.
├── backend
│ ├── database
│ │ └── mongo.js
│ ├── Dockerfile
│ ├── models
│ │ ├── Follower.js
│ │ ├── Post.js
│ │ ├── Report.js
│ │ ├── Subgreddiit.js
│ │ └── User.js
│ ├── package.json
│ ├── secret
│ │ └── token.js
│ └── server.js
├── docker-compose.yml
├── frontend
│ ├── Dockerfile
│ ├── package.json
│ ├── public
│ │ ├── favicon.ico
│ │ ├── grediit-logo.ico
│ │ ├── grediit-logo.png
│ │ ├── index.html
│ │ ├── login-background.webp
│ │ └── robots.txt
│ └── src
│ ├── App.js
│ ├── functionality
│ │ └── Logout.js
│ ├── index.css
│ └── pages
│ ├── 404
│ ├── AllPages
│ ├── Base.js
│ ├── Dashboard
│ ├── JoinRequests
│ ├── Loading
│ ├── Login
│ ├── MyPages
│ ├── Profile
│ ├── Protected.js
│ ├── Reported.js
│ ├── SavedPosts.js
│ ├── Stats
│ ├── SubgreddiitCheck.js
│ ├── SubgreddiitPage.js
│ └── SubgreddiitUsers.js
└── nginx
└── default.conf
- Login & Registration: Users can register and log in with unique email-based identification. Passwords are securely hashed, and sessions are persistent even after browser restarts.
- Profile Management: Users can view and edit their profiles, including managing followers and following lists.
- My Sub Greddiits: Users can create and manage their Sub Greddiits, view community stats, and moderate content.
- Moderation Tools: Manage user reports, handle join requests, and monitor community growth and activity through detailed stats.
- Create and Manage Posts: Users can create posts within Sub Greddiits, upvote or downvote posts, and engage in multi-level commenting.
- Report Management: Moderators can address reports by ignoring, deleting posts, or banning users. Reports are automatically removed after 10 days.
- Search & Filtering: Enhanced search functionality with fuzzy search, filters by tags, and nested sorting based on multiple criteria.
- Saved Posts: Users can save and manage their favorite posts across Sub Greddiits.
- Banned Keywords: Posts containing banned words are flagged, and inappropriate content is automatically replaced with asterisks.
- Input Validation: Extensive validation on both frontend and backend, ensuring secure and accurate data handling.
- Protected Routes: API routes are protected, preventing unauthorized access.
- Shortcuts: Implemented keyboard shortcuts for quick navigation within the platform.
Greddiit is fully containerized using Docker, with separate containers for the backend, frontend, and Nginx, ensuring a seamless deployment process. The services are orchestrated via docker-compose
to maintain a scalable and efficient infrastructure.