Breadit is a social news aggregation, content rating, and discussion platform, inspired by Reddit. It allows users to create their own spaces for focused interaction, discussion, and content sharing. With real-time features, community-building tools, and secure authentication, Breadit provides a seamless social experience for users.
Explore it live at Breadit on Vercel.
- Home Page
- Create & Join Communities: Users can create unique spaces to interact and discuss with like-minded people.
- Post Creation & Image Uploads: Share ideas, stories, and images in communities.
- Engage with Posts: Upvote/downvote posts, leave comments, and like/dislike comments for lively discussions.
- Infinite Scrolling: Browse through endless content with smooth, infinite scrolling.
- Search Communities: Easily find and join new communities based on your interests.
- Authentication & Security: Powered by NextAuth, offering secure login and data protection.
- Optimized Performance: Leveraging Redis caching for quick content retrieval and minimal latency.
Frontend | Backend | Database | Authentication | Caching | ORM |
---|---|---|---|---|---|
Next.js | Next.js API | PostgreSQL | NextAuth | Redis | Prisma ORM |
React.js | TypeScript | Prisma ORM | JWT Sessions |
Additional libraries:
- React Query: Efficient server-state handling and data fetching.
- Zustand: Lightweight state management for a smoother user experience.
- UploadThing: Simple and fast file uploads for images and other media.
To run Breadit locally, follow these steps:
- Node.js (v20+)
- PostgreSQL (Ensure it's installed and running)
- Redis (for caching)
-
Clone the repository:
git clone https://github.com/Prathamm-sahu/Breadit.git cd Breadit
-
Install dependencies:
npm install
-
Environment Setup:
- Rename
.env.example
to.env
. - Configure your database connection and authentication keys in the
.env
file.
- Rename
-
Run the development server:
npm run dev
Open http://localhost:3000 in your browser to view the app.
Breadit uses PostgreSQL as its primary database and Prisma ORM for database schema management and queries. To set up the database:
-
Ensure PostgreSQL is running.
-
Run the following Prisma commands to migrate your database:
npx prisma migrate dev
/components # UI and Reusable components (buttons, forms, etc.)
/app # Application pages (Next.js routing)
/lib # Utility libraries for API and state management
/prisma # Database schema and Prisma ORM configurations
/public # Static assets (images, fonts, etc.)
/styles # Global CSS and styling
We welcome contributions! Feel free to fork the repo and submit pull requests. For major changes, please open an issue first to discuss what you'd like to improve.
Authentication is managed via NextAuth for secure login, registration, and data protection. Sessions are secured with JSON Web Tokens (JWT).
Check out the live demo hosted on Vercel: Breadit Live
This project is open-source and available under the MIT License.