A fullstack Q&A (Question & Answer) platform similar to Stack Overflow or Quora, built with React.js and Node.js/Express. Features user authentication, question posting, and community-driven answers.
Question Forum is a modern Q&A platform that enables users to:
- Ask questions and get answers from the community
- Browse and search existing questions
- Authenticate securely with JWT tokens
- Participate in knowledge sharing
Perfect for learning fullstack development, REST APIs, and modern web application patterns.
- 🔐 JWT Authentication - Secure user login and registration
- 📋 Question Listing - Browse all questions with details
- 🔍 Question Details - View individual questions with answers
- 👤 User Profiles - User-specific question history
- ✏️ Post Questions - Create new questions
- 💬 Answer Questions - Provide answers to questions
- 🗄️ Database Integration - Persistent data storage
- 🗑️ Delete Questions - Remove questions
- ✏️ Update Questions - Edit existing questions
- 👤 Enhanced Profiles - Comprehensive user profiles
- React.js - UI library
- Bootstrap - CSS framework
- JavaScript (ES6+) - Modern JavaScript features
- Node.js - Runtime environment
- Express.js - Web framework
- JWT - Authentication tokens
- REST API - API architecture
- Node.js 12+ and npm
- Git
- Clone the repository:
git clone https://github.com/bhanuchaddha/Question-Forum.git
cd Question-Forum- Install backend dependencies:
cd backend
npm install- Install frontend dependencies:
cd ../frontend
npm install- Start the backend server:
cd backend
npm startBackend runs on http://localhost:3001 (or configured port)
- Start the frontend development server:
cd frontend
npm startFrontend runs on http://localhost:3000
POST /api/auth/register
POST /api/auth/login
POST /api/auth/logoutGET /api/questions # Get all questions
GET /api/questions/:id # Get question details
POST /api/questions # Create question (planned)
PUT /api/questions/:id # Update question (planned)
DELETE /api/questions/:id # Delete question (planned)GET /api/questions/:id/answers # Get answers for question
POST /api/questions/:id/answers # Post answer (planned)Question-Forum/
├── backend/ # Node.js/Express backend
│ ├── src/
│ │ ├── authentication.js
│ │ ├── config.js
│ │ └── index.js
│ └── package.json
├── frontend/ # React.js frontend
│ ├── src/
│ │ ├── components/ # React components
│ │ │ ├── NavBar/
│ │ │ ├── Question/
│ │ │ └── Questions/
│ │ ├── pages/ # Page components
│ │ └── services/ # API services
│ └── package.json
└── README.md
- User registers/logs in
- Backend generates JWT token
- Token stored in localStorage
- Token included in API requests
- Backend validates token for protected routes
- NavBar - Navigation with login/logout
- Questions List - Display all questions
- Question Detail - Individual question view
- Login Form - Authentication interface
- Answer Form - Post answers (planned)
// config.js
module.exports = {
port: process.env.PORT || 3001,
jwtSecret: process.env.JWT_SECRET || 'your-secret-key',
// Add database configuration
};Update API base URL in service files:
const API_BASE_URL = 'http://localhost:3001/api';# Backend tests
cd backend
npm test
# Frontend tests
cd frontend
npm testThis project demonstrates:
- Fullstack JavaScript development
- RESTful API design
- JWT authentication
- React component architecture
- State management patterns
- API integration
- Implement question posting
- Add answer functionality
- Integrate database (MongoDB/PostgreSQL)
- Add search functionality
- Implement voting system
- Add tags/categories
- User reputation system
- Rich text editor for questions/answers
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is open source and available for educational purposes.
- Learning Fullstack Development - Perfect tutorial project
- Community Q&A Platform - Building knowledge sharing sites
- Portfolio Project - Showcase fullstack skills
- API Development - REST API best practices
- Authentication Patterns - JWT implementation
Built with React & Node.js ❤️