TechDiscuss is a full-stack MERN application designed for technical discussions and knowledge sharing. It provides a platform where users can create, share, and discuss technical content through posts and comments.
Live Site: https://tech-discuss-frontend.onrender.com
- Secure user registration and login system
- JWT-based authentication
- Protected routes for authenticated users
- Persistent login using HTTP-only cookies
- Create, read, update, and delete posts
- Rich text content support
- Image upload functionality
- Categorize posts with tags
- Search posts by title or content
- Comment on posts
- User profiles with post history
- Real-time updates
- Responsive design for all devices
- Modern and intuitive interface
- Dark/Light mode support
- Fast loading times
- Cross-browser compatibility
- React.js
- Tailwind CSS for styling
- Axios for API requests
- React Router for navigation
- Context API for state management
- Vite as build tool
- Node.js
- Express.js
- MongoDB with Mongoose
- JWT for authentication
- Multer for file uploads
- bcrypt for password hashing
- Render for hosting
- MongoDB Atlas for database
- Environment variables for configuration
- Visit the application URL
- Register for a new account or login
- Browse existing posts on the home page
- Create new posts using the "Create Post" button
- Comment on posts to engage in discussions
- Edit or delete your own posts and comments
- Search for specific topics using the search bar
- View and edit your profile
- Node.js (v14 or higher)
- MongoDB
- Git
- Clone the repository
git clone https://github.com/yourusername/TechDiscuss.git
cd TechDiscuss
- Install dependencies
# Install backend dependencies
cd backend
npm install
# Install frontend dependencies
cd ../frontend
npm install
- Environment Variables
Backend (.env):
MONGO_URL=your_mongodb_connection_string
SECRET=your_jwt_secret_key
PORT=5001
Frontend (.env):
VITE_API_URL=http://localhost:5001
- Start the application
# Start backend (from backend directory)
npm start
# Start frontend (from frontend directory)
npm run dev
- Access the application
- Frontend: http://localhost:5173
- Backend: http://localhost:5001
- POST /api/auth/register - Register new user
- POST /api/auth/login - User login
- GET /api/auth/logout - User logout
- GET /api/auth/refetch - Refetch user data
- GET /api/posts - Get all posts
- GET /api/posts/:id - Get single post
- POST /api/posts - Create new post
- PUT /api/posts/:id - Update post
- DELETE /api/posts/:id - Delete post
- GET /api/comments/:postId - Get post comments
- POST /api/comments - Create comment
- DELETE /api/comments/:id - Delete comment
- GET /api/users/:id - Get user profile
- PUT /api/users/:id - Update user profile
- Password hashing using bcrypt
- HTTP-only cookies for JWT
- CORS protection
- Input validation and sanitization
- Protected API endpoints
- Secure file upload handling
- Real-time notifications
- Social media sharing
- Advanced text editor
- User following system
- Email verification
- Password recovery
This project is licensed under the MIT License - see the LICENSE file for details.
- HomePage

- Login Page

- Register Page

- PostDetails Page

- Profile Page

- CreatePost Page
