Skip to content

ritesh1191/TechDiscuss

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

TechDiscuss - Technical Discussion Platform

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

🌟 Features

User Authentication

  • Secure user registration and login system
  • JWT-based authentication
  • Protected routes for authenticated users
  • Persistent login using HTTP-only cookies

Posts Management

  • Create, read, update, and delete posts
  • Rich text content support
  • Image upload functionality
  • Categorize posts with tags
  • Search posts by title or content

Interactive Features

  • Comment on posts
  • User profiles with post history
  • Real-time updates
  • Responsive design for all devices

User Experience

  • Modern and intuitive interface
  • Dark/Light mode support
  • Fast loading times
  • Cross-browser compatibility

πŸ› οΈ Technologies Used

Frontend

  • React.js
  • Tailwind CSS for styling
  • Axios for API requests
  • React Router for navigation
  • Context API for state management
  • Vite as build tool

Backend

  • Node.js
  • Express.js
  • MongoDB with Mongoose
  • JWT for authentication
  • Multer for file uploads
  • bcrypt for password hashing

Deployment

  • Render for hosting
  • MongoDB Atlas for database
  • Environment variables for configuration

πŸš€ Usage

As a User

  1. Visit the application URL
  2. Register for a new account or login
  3. Browse existing posts on the home page
  4. Create new posts using the "Create Post" button
  5. Comment on posts to engage in discussions
  6. Edit or delete your own posts and comments
  7. Search for specific topics using the search bar
  8. View and edit your profile

For Developers

Prerequisites

  • Node.js (v14 or higher)
  • MongoDB
  • Git

Local Setup

  1. Clone the repository
git clone https://github.com/yourusername/TechDiscuss.git
cd TechDiscuss
  1. Install dependencies
# Install backend dependencies
cd backend
npm install

# Install frontend dependencies
cd ../frontend
npm install
  1. 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
  1. Start the application
# Start backend (from backend directory)
npm start

# Start frontend (from frontend directory)
npm run dev
  1. Access the application

πŸ“ API Endpoints

Authentication

  • 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

Posts

  • 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

Comments

  • GET /api/comments/:postId - Get post comments
  • POST /api/comments - Create comment
  • DELETE /api/comments/:id - Delete comment

Users

  • GET /api/users/:id - Get user profile
  • PUT /api/users/:id - Update user profile

πŸ” Security Features

  • Password hashing using bcrypt
  • HTTP-only cookies for JWT
  • CORS protection
  • Input validation and sanitization
  • Protected API endpoints
  • Secure file upload handling

🎯 Future Enhancements

  • Real-time notifications
  • Social media sharing
  • Advanced text editor
  • User following system
  • Email verification
  • Password recovery

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

Photos

  • HomePage
Screenshot 2025-05-25 at 4 25 51β€―PM
  • Login Page
Screenshot 2025-05-25 at 4 25 03β€―PM
  • Register Page
Screenshot 2025-05-25 at 4 25 17β€―PM
  • PostDetails Page
Screenshot 2025-05-25 at 4 26 25β€―PM
  • Profile Page
Screenshot 2025-05-25 at 4 26 11β€―PM
  • CreatePost Page
Screenshot 2025-05-25 at 4 26 00β€―PM

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published