A modern Q&A platform built with React, Node.js, and Django AI services.
- Frontend: React with Tailwind CSS
- Backend: Node.js/Express with MongoDB
- AI Service: Django with ML models for content analysis
- Database: MongoDB
- User authentication and authorization
- Question and answer management
- AI-powered content filtering
- Tag prediction using ML models
- Answer ranking and quality assessment
- Real-time notifications
- Modern responsive UI
-
Clone the repository
git clone <repository-url> cd StackIt
-
Set up environment variables
# Copy example environment files cp backend/env.example backend/.env cp frontend/env.example frontend/.env cp ai-review/env.example ai-review/.env # Edit the .env files with your configuration
-
Start all services
docker-compose up --build
-
Access the application
- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
- AI Service: http://localhost:8000
- MongoDB: localhost:27017
-
Run tests
# Backend tests docker-compose exec backend npm test # Frontend tests docker-compose exec frontend npm test
- Node.js 18+
- Python 3.11+
- MongoDB
- npm/yarn
cd backend
npm install
# Create .env file with:
# MONGO_URI=mongodb://localhost:27017/stackit
# JWT_SECRET=your_secret_key
# AI_SERVICE_URL=http://localhost:8000
npm startcd frontend
npm install
# Create .env file with:
# REACT_APP_API_URL=http://localhost:5000
npm startcd ai-review
pip install -r requirements.txt
# Create .env file with:
# SECRET_KEY=your_django_secret
# DEBUG=True
python manage.py migrate
python manage.py runserverPOST /auth/register- User registrationPOST /auth/login- User loginGET /auth/me- Get current user
GET /questions- Get all questionsPOST /questions- Create questionGET /questions/:id- Get question by ID
POST /questions/:id/answers- Submit answerPOST /answers/:id/vote- Vote on answerPOST /answers/:id/accept- Accept answer
POST /api/predict-tags/- Predict tags for questionPOST /api/filter-content/- Filter inappropriate contentPOST /api/rank-answers/- Rank answers by qualityGET /api/health/- Health check
MONGO_URI=mongodb://localhost:27017/stackit
JWT_SECRET=your_super_secret_jwt_key
AI_SERVICE_URL=http://localhost:8000
NODE_ENV=development
REACT_APP_API_URL=http://localhost:5000
REACT_APP_AI_SERVICE_URL=http://localhost:8000
SECRET_KEY=your_django_secret_key
DEBUG=True
ALLOWED_HOSTS=localhost,127.0.0.1
- Backend: Add routes in
routes/and controllers incontrollers/ - Frontend: Add components in
src/components/ - AI Service: Add new ML models in
scanner/utils/
# Backend tests
cd backend && npm test
# Frontend tests
cd frontend && npm test
# AI service tests
cd ai-review && python manage.py test- Update environment variables for production
- Set up proper MongoDB instance
- Configure reverse proxy (nginx)
- Set up SSL certificates
- Use production Docker images
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
MIT License - see LICENSE file for details