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 β€οΈ