A Reddit clone built with React and Next.js
- User Authentication: Allow users to create accounts, log in, and manage their profiles.
- Subreddits: Create, subscribe, and participate in various subreddits based on interests.
- Posts and Comments: Submit, vote, and comment on posts within subreddits.
- Voting System: Upvote and downvote posts and comments for community-driven content visibility.
- Responsive Design: Mobile-friendly UI for seamless browsing on different devices.
- Node.js and npm installed on your machine.
- Clone the repository:
git clone https://github.com/your-username/react-next-reddit.git
cd react-next-reddit
npm install
Configuration
Create a .env file in the root directory and add the following environment variables:
bash
DATABASE_URL=your-database-url NEXTAUTH_SECRET=your-secret GOOGLE_CLIENT_ID=your-id GOOGLE_CLIENT_SECRET=your-secret UPLOADTHING_SECRET=your-secret UPLOADTHING_APP_ID=your-id REDIS_URL=your-url REDIS_SECRET=your-secret
Replace them with appropriate values.
Start the development server:
bash
npm run dev
Visit http://localhost:3000 in your browser. Usage
Create an account or log in to an existing one.
Explore existing subreddits or create your own.
Submit posts, comment, and engage with the community.
Vote on posts and comments to influence visibility.