An AI-powered question-answering platform where users can ask anything and get intelligent answers generated using free AI and knowledge APIs. The platform automatically stays current by pulling real-world events through free news feeds, so answers are always up to date.
- Vision
- Free API Paths
- Tech Stack
- Features
- Installation
- Usage
- API Endpoints
- Project Structure
- Roadmap
- Contributing
- License
Build an AI tool that can answer any question for free by chaining together multiple free APIs and open-source models. The platform:
- Accepts any user question through a clean web UI
- Routes the question to the best free AI/knowledge source
- Enriches answers with real-time data from free news and event APIs
- Auto-updates its knowledge base as real-world events happen
- Lets the community vote on and improve AI-generated answers
The core idea is to use zero-cost APIs to power the AI answering engine. Here are the free paths integrated (or planned for integration):
| Provider | Free Limits | Best For |
|---|---|---|
| Google Gemini API | 5–15 RPM, 100–1,000 RPD, no credit card needed | General Q&A, reasoning, code help |
| Hugging Face Inference API | Free tier for 1,000+ open-source models | NLP, text generation, Q&A models (BERT, RoBERTa, etc.) |
| Groq Cloud | Up to 1,000 req/day for Llama models | Fast inference, coding questions |
| OpenRouter | Free models available (Llama, Mistral, etc.) | Fallback AI routing |
| Ollama (Local) | Unlimited (runs locally) | Offline/private AI answering |
| Provider | What It Gives You |
|---|---|
| Wikipedia API | Factual answers, definitions, summaries |
| DuckDuckGo Instant Answer API | Quick answers, zero tracking, no API key needed |
| Wolfram Alpha Short Answers API | Math, science, unit conversions (free AppID) |
| Stack Exchange API | Programming Q&A from Stack Overflow (free, 300 req/day) |
| Dictionary API (dictionaryapi.dev) | Word definitions, synonyms — completely free, no key |
These power the auto-update feature so the platform stays current:
| Provider | Free Tier | Use Case |
|---|---|---|
| NewsAPI.org | 100 req/day, 150k+ sources | Breaking news, trending topics |
| The News API | Free tier available | Top stories, real-time feeds |
| GNews.io | 100 req/day, 10-day trial for premium | Global news in 41 languages |
| Mediastack | Free plan, minute-by-minute updates | Live news data feeds |
| World News API | Free tier, 86 languages, 210+ countries | Semantic news search |
| The Guardian Open Platform | Free, no limit for non-commercial | Full article content |
| Hacker News API | Completely free, no key needed | Tech/startup news |
| RSS Feeds | Free, unlimited | Custom source aggregation |
The platform uses a scheduled job (cron) to:
- Fetch latest news from free news APIs every few hours
- Identify trending topics and events
- Feed event summaries into the AI model for context
- Update cached answers that reference outdated information
- Tag questions/answers with "last verified" timestamps
- React 18 with hooks and functional components
- Redux Toolkit for state management
- Tailwind CSS for responsive UI
- Vite for fast dev server and builds
- Axios for API communication
- React Hook Form for form validation
- React Hot Toast for notifications
- Node.js + Express.js REST API
- MongoDB + Mongoose for data persistence
- JWT + bcrypt for authentication
- Helmet for security headers
- express-rate-limit for rate limiting
- express-validator for input validation
- Google Gemini API (free tier) for primary AI answering
- Hugging Face Transformers for open-source model fallback
- Node-cron for scheduled news fetching and answer updates
- User registration and login with JWT authentication
- Ask questions with title, content, category, and tags
- Browse and search questions with category filtering
- View question details with all answers
- Answer questions (backend API ready)
- Vote on answers (backend API ready)
- User profiles with activity tracking
- Protected routes for authenticated actions
- Responsive design across all devices
- Centralized error handling and input validation
- Rate limiting and security middleware
- AI-generated answer suggestions using free LLM APIs
- Real-time news feed integration for auto-updating answers
- Answer submission form on question detail page
- Upvote/downvote buttons on answer cards
- Edit and delete UI for questions and answers
- Multi-model AI routing (Gemini → Hugging Face → Groq fallback chain)
- Scheduled cron jobs to fetch news and update knowledge base
- "Last verified" timestamps on AI-generated answers
- Wikipedia/Wolfram Alpha enrichment for factual questions
- DuckDuckGo Instant Answer integration for quick lookups
- Markdown support for questions and answers
- User reputation system based on community voting
- Node.js (v16 or higher)
- MongoDB (v4.4 or higher)
- Git
# Clone the repository
git clone https://github.com/Basant1Saini/Ask_Me_Anything.git
cd Ask_Me_Anything
# Install all dependencies (backend + frontend)
npm run install-all
# Set up environment variables
cp backend/.env.example backend/.env
# Edit backend/.env with your values:
# MONGODB_URI=mongodb://localhost:27017/ask_me_anything
# JWT_SECRET=your_secret_key
# GEMINI_API_KEY=your_free_gemini_key (get from https://aistudio.google.com/apikey)
# NEWS_API_KEY=your_newsapi_key (get from https://newsapi.org)
# Start both backend and frontend
npm run devBackend runs on http://localhost:5000, frontend on http://localhost:3000.
- Open
http://localhost:3000in your browser - Register a new account or login
- Ask any question — the AI engine will suggest answers using free APIs
- Browse questions and contribute your own answers
- Vote on answers to surface the best ones
- The platform auto-updates answers as new real-world events occur
POST /api/auth/register— Register new userPOST /api/auth/login— Login and get JWT tokenGET /api/auth/profile— Get authenticated user profile
GET /api/questions— List questions (supports?search=,?category=,?sort=,?page=,?limit=)POST /api/questions— Create question (auth required)GET /api/questions/:id— Get question with answersPUT /api/questions/:id— Update own question (auth required)DELETE /api/questions/:id— Delete own question (auth required)
POST /api/questions/:questionId/answers— Add answer to question (auth required)PUT /api/answers/:id— Update own answer (auth required)DELETE /api/answers/:id— Delete own answer (auth required)POST /api/answers/:id/vote— Upvote or downvote an answer (auth required)
GET /api/users/:id— Get public user profilePUT /api/users/:id— Update own profile (auth required)
POST /api/ai/ask— Get AI-generated answer for a questionGET /api/ai/news-feed— Get latest news relevant to platform topicsPOST /api/ai/refresh— Trigger answer refresh based on new events
Ask_Me_Anything/
├── backend/
│ ├── config/
│ │ └── database.js # MongoDB connection
│ ├── controllers/
│ │ ├── authController.js # Register, login, profile
│ │ ├── questionController.js # CRUD for questions
│ │ ├── answerController.js # CRUD + voting for answers
│ │ └── userController.js # User profile management
│ ├── middleware/
│ │ ├── auth.js # JWT verification
│ │ └── errorHandler.js # Centralized error handling
│ ├── models/
│ │ ├── User.js # User schema with password hashing
│ │ ├── Question.js # Question schema with votes & tags
│ │ └── Answer.js # Answer schema with voting
│ ├── routes/
│ │ ├── auth.js # Auth routes with validation
│ │ ├── questions.js # Question + nested answer routes
│ │ ├── answers.js # Answer update/delete/vote routes
│ │ └── users.js # User profile routes
│ ├── utils/
│ │ └── helpers.js
│ ├── .env.example
│ ├── package.json
│ └── server.js # Express app entry point
├── frontend/
│ ├── src/
│ │ ├── components/
│ │ │ ├── Navbar.jsx # Auth-aware navigation
│ │ │ ├── Footer.jsx
│ │ │ └── ProtectedRoute.jsx
│ │ ├── pages/
│ │ │ ├── Home.jsx # Landing page
│ │ │ ├── Questions.jsx # Browse + search questions
│ │ │ ├── QuestionDetail.jsx# View question + answers
│ │ │ ├── AskQuestion.jsx # Create question form
│ │ │ ├── Login.jsx
│ │ │ ├── Register.jsx
│ │ │ ├── Profile.jsx # User dashboard
│ │ │ └── NotFound.jsx
│ │ ├── redux/
│ │ │ ├── store.js
│ │ │ └── slices/
│ │ │ ├── authSlice.js
│ │ │ ├── questionSlice.js
│ │ │ └── answerSlice.js
│ │ ├── services/
│ │ │ ├── authService.js
│ │ │ ├── questionService.js
│ │ │ └── answerService.js
│ │ ├── App.jsx
│ │ ├── main.jsx
│ │ └── index.css
│ ├── index.html
│ ├── tailwind.config.js
│ ├── vite.config.js
│ └── package.json
├── docs/
│ └── API.md
├── .gitignore
├── package.json
├── CONTRIBUTING.md
├── LICENSE
└── README.md
- Backend REST API with full CRUD
- JWT authentication system
- React frontend with Redux state management
- Question browsing, searching, and filtering
- Answer and voting system (backend)
- AI answer generation via Google Gemini free tier
- Fallback to Hugging Face / Groq when Gemini quota is exhausted
- News API integration for real-time event awareness
- Cron-based auto-update pipeline for stale answers
- Wikipedia + Wolfram Alpha enrichment layer
- Answer submission and voting UI on frontend
- Edit/delete UI for questions and answers
- Markdown rendering for rich content
- User reputation scoring
- Docker setup for easy deployment
- Fork the repository
- Create a feature branch (
git checkout -b feature/your-feature) - Commit your changes (
git commit -m 'Add your feature') - Push to the branch (
git push origin feature/your-feature) - Open a Pull Request
See CONTRIBUTING.md for detailed guidelines.
This project is licensed under the MIT License — see LICENSE for details.
- Author: Basant Saini
- GitHub: github.com/Basant1Saini
- Project: github.com/Basant1Saini/Ask_Me_Anything
Made with determination by Basant Saini