- Introduction
- Features
- Technologies Used
- Getting Started
- Project Structure
- Usage
- Contributing
- License
This project is a discussion website where registered users can submit various types of content including links, text posts, images, and videos. The content is organized by subject into user-created boards called "communities". Users can vote on posts, with the most upvoted content appearing at the top of its community and potentially on the site's front page. The project is built with Node.js, MySQL, and React, with advanced caching using Upstash Redis and modern data fetching with React Query.
- User Registration and Authentication: Secure user authentication with NextAuth.
- Content Submission: Users can submit links, text posts, images, and videos.
- Voting System: Users can upvote or downvote content.
- Communities: Content is organized into user-created communities.
- Infinite Scrolling: Seamless content loading as users scroll.
- Advanced Caching: Using Upstash Redis for efficient data retrieval.
- Nested Comments: Supports nested comments on posts.
- Backend: Node.js, Express.js, MySQL
- Frontend: React, React Query
- Authentication: NextAuth
- Caching: Upstash Redis
- Other Tools: Webpack, Babel, ESLint
- Node.js
- MySQL
- Redis
-
Clone the repository:
git clone [https://github.com/your-username/discussion-website.git](https://github.com/Harsh-Mathur-1503/crill.git) cd crill
-
Install dependencies:
npm install
-
Setup environment variables: Create a
.env
file in the root directory and add the following variables:DATABASE_URL=mysql://user:password@localhost:3306/database NEXTAUTH_URL=http://localhost:3000 NEXTAUTH_SECRET=your-secret REDIS_URL=redis://localhost:6379
-
Run database migrations:
npx prisma migrate dev
-
Start the development server:
npm run dev
-
Access the application: Open your browser and navigate to
http://localhost:3000
.
- Register and login: Create an account or login using the authentication system.
- Create a community: Organize your content by creating a new community.
- Submit content: Post links, text posts, images, or videos to a community.
- Vote on content: Upvote or downvote content to influence its ranking.
- Comment on posts: Engage with the community by commenting on posts.
Contributions are welcome! Please open an issue or submit a pull request with your improvements.
- Fork the repository
- Create your feature branch (
git checkout -b feature/YourFeature
) - Commit your changes (
git commit -m 'Add some feature'
) - Push to the branch (
git push origin feature/YourFeature
) - Open a pull request
This project is licensed under the MIT License - see the LICENSE file for details.