Skip to content

Philodoescode/Wreddit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

134 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Wreddit

A modern, full-stack reddit clone with AI superpowers.

React Vite TypeScript Tailwind CSS Node.js Express.js MongoDB Redis Docker

πŸ“– About The Project

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.

✨ Key Features

  • πŸ‘₯ 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.

πŸ› οΈ Technology Stack

Wreddit is built using a modern MERN-like stack, leveraging the power of TypeScript and Docker.

Frontend (Client)

Backend (Server)

DevOps & Tools

  • Containerization: Docker & Docker Compose
  • Package Manager: pnpm
  • Linting: ESLint, Prettier

βš™οΈ Prerequisites

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)

πŸš€ Installation & Setup

  1. Clone the Repository

    git clone https://github.com/Philodoescode/Wreddit.git
    cd Wreddit
  2. Environment Configuration

    You need to set up environment variables for the application to function correctly, especially for AI features.

    Create a .env file in the root directory (or check server/ and client/ if separate configs are needed, but typically the root .env is used by Docker):

    cp .env.example .env

    Required Variables:

    • GEMINI_API_KEY: Get your API key from Google AI Studio.
    • MONGO_URI: (Optional) Defaults to mongodb://mongo:27017/wreddit in Docker.
    • JWT_SECRET: (Optional) Secret key for signing tokens.
  3. 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
  4. 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

πŸ“‚ Project Structure

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

🀝 Contributing

Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

✍️ Authors

πŸ“„ License

Distributed under the MIT License. See LICENSE for more information.

Built with ❀️ by the Wreddit Team

About

Open-source, full-stack clone of the popular community aggregation platform, designed to explore modern web technologies while fostering a vibrant, slightly self-aware community. We're here to see what you've wrote and maybe, just maybe, judge it slightly.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors