Skip to content

arjun248c/collage_Q-A

Repository files navigation

College Q&A Platform - Anonymous Student Query System

A full-stack application enabling students to ask questions anonymously and get answers from experts.

Features

  • Anonymous Question Submission: Students can ask questions without requiring login
  • Expert Dashboard: Experts can view and answer student questions
  • FAQ Browsing: Browse through previously answered questions
  • Scalable Architecture: Separate backend and frontend for easy maintenance
  • SQLite Database: Lightweight, portable database with no setup required

Technology Stack

Backend

  • Node.js with Express.js
  • SQLite database
  • REST API
  • Input validation with express-validator

Frontend

  • React.js with TypeScript
  • Axios for API calls
  • Modern UI components
  • Responsive design

Project Structure

college-qa-platform/
├── backend/          # Node.js Express backend
│   ├── models/       # Database models
│   ├── routes/       # API routes
│   ├── database.js   # Database setup
│   ├── server.js     # Main server file
│   └── package.json  # Dependencies
├── frontend/         # React TypeScript frontend
├── docs/            # Documentation
└── README.md        # This file

Quick Start

Prerequisites

  • Node.js 14 or higher
  • npm or yarn

Backend Setup

cd backend
npm install
npm run dev

Frontend Setup

cd frontend
npm install
npm start

API Endpoints

Questions

  • POST /api/questions - Submit a new question
  • GET /api/questions - Get all questions
  • GET /api/questions/:id - Get specific question with answers
  • GET /api/questions/unanswered - Get unanswered questions
  • GET /api/questions/status/:status - Get questions by status
  • GET /api/questions/category/:category - Get questions by category
  • GET /api/questions/search?keyword=... - Search questions
  • PUT /api/questions/:id/status?status=... - Update question status
  • GET /api/questions/stats - Get question statistics
  • DELETE /api/questions/:id - Delete question

Answers

  • POST /api/answers/question/:questionId - Submit an answer
  • GET /api/answers/question/:questionId - Get answers for question
  • PUT /api/answers/:id/helpful - Mark answer as helpful
  • PUT /api/answers/:id/verify - Verify answer (experts only)
  • GET /api/answers/verified - Get verified answers
  • GET /api/answers/helpful - Get most helpful answers

Database

The application uses SQLite database which is created automatically when the server starts. No database setup is required.

Database file: backend/college_qa.db

Development

Backend Development

cd backend
npm run dev  # Uses nodemon for auto-restart

Frontend Development

cd frontend
npm start    # React development server

Production Deployment

Backend

cd backend
npm start

Frontend

cd frontend
npm run build

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors