Wreddit is a robust, open-source community aggregation platform inspired by Reddit. It's built to explore the capabilities of modern web technologies, featuring real-time interactions, AI-generated content summaries, and a sleek, responsive user interface.
Whether you're looking to share links, discuss topics, or just lurk, Wreddit provides a familiar yet enhanced experience.
- π₯ Communities: Create and join topic-specific communities (subreddits) to find your people.
- π Rich Posts: Share content with rich text support, images, and links.
- π€ AI Summaries: Instantly get the gist of long posts with integrated Google Gemini AI summarization.
- π¬ Real-Time Chat: Engage in live conversations with other users via WebSocket-powered chat rooms.
- π³οΈ Voting System: Upvote or downvote posts and comments to curate the best content.
- π€ User Profiles: Customize your profile with avatars and banners, and view your activity history.
- π Search: Find communities and posts quickly with comprehensive search functionality.
- π Dark Mode: Easy on the eyes with a polished dark theme.
Wreddit is built using a modern MERN-like stack, leveraging the power of TypeScript and Docker.
- Framework: React 19 + Vite
- Language: TypeScript
- Styling: Tailwind CSS v4
- UI Components: Radix UI, Shadcn UI
- Icons: Lucide React
- State & Forms: React Hook Form, Zod
- Routing: React Router v7
- Runtime: Node.js
- Framework: Express.js v5
- Database: MongoDB (with Mongoose ODM)
- Caching: Redis
- Authentication: JWT (JSON Web Tokens)
- Real-time: WebSocket (ws)
- AI Integration: Google Gemini AI
Before you begin, ensure you have the following installed on your machine:
- Git
- Docker Desktop (Ensure the Docker daemon is running)
- Node.js (v18.x or later recommended for local execution without Docker)
- pnpm (Optional, if running locally without Docker)
-
Clone the Repository
git clone https://github.com/Philodoescode/Wreddit.git cd Wreddit -
Environment Configuration
You need to set up environment variables for the application to function correctly, especially for AI features.
Create a
.envfile in the root directory (or checkserver/andclient/if separate configs are needed, but typically the root.envis used by Docker):cp .env.example .env
Required Variables:
GEMINI_API_KEY: Get your API key from Google AI Studio.MONGO_URI: (Optional) Defaults tomongodb://mongo:27017/wredditin Docker.JWT_SECRET: (Optional) Secret key for signing tokens.
-
Run with Docker (Recommended)
The easiest way to start Wreddit is using Docker Compose. This will spin up the Client, Server, MongoDB, and Redis containers.
docker-compose up --build
- Frontend: http://localhost:5173
- Backend: http://localhost:5000
- Mongo Express (if enabled): http://localhost:8081
-
Run Locally (Dev Mode)
If you prefer to run services individually:
- Server:
cd server pnpm install pnpm start - Client:
cd client pnpm install pnpm dev
- Server:
Wreddit/
βββ client/ # Frontend React Application
β βββ src/
β β βββ components/ # Reusable UI components
β β βββ pages/ # Route page components (Home, Profile, etc.)
β β βββ hooks/ # Custom React hooks
β β βββ lib/ # Utilities and helpers
β βββ public/ # Static assets
β βββ package.json
β
βββ server/ # Backend Express Application
β βββ controller/ # Request logic handlers
β βββ model/ # Mongoose schemas (User, Post, Community)
β βββ routes/ # API route definitions
β βββ websocket/ # Real-time chat logic
β βββ uploads/ # User uploaded content
β βββ package.json
β
βββ docker-compose.yml # Docker services orchestration
βββ README.md
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- 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
- Yousif Abdulhafiz - @ysif9
- Philodoescode Philodoescode
- Saifeldin Elsayes - @Saifeldinsais
- Noha Elsayed - @Nohaelsayedd
- Hams Hassan - @Hams2305
- Jana Sameh - @janasameh7
Distributed under the MIT License. See LICENSE for more information.