StackFast: A Stack Overflow Clone with a Vectorized PostgreSQL Engine
Madhav (23B0990) Vivek Vardhan (23B0972) Kishan Teja (23B1061) Nithin (23B0993)
StackFast is a developer Q&A platform inspired by Stack Overflow. We are building a Stack Overflow clone while exploring database performance optimization in PostgreSQL.
- Build a Stack Overflow–style platform supporting question search, answer viewing and tag-based browsing with efficient database queries.
- Use the Stack Overflow public dataset containing millions of posts, comments and users to evaluate query performance and scalability.
- Improve query performance by modifying PostgreSQL to support vectorized queries.
- Provide a query execution comparison framework to measure performance differences between standard and modified PostgreSQL engines.
- Faster search queries using vectorized execution.
- Tag-based filtering and browsing.
- Benchmark page showing query performance comparison.
- Query inspector showing SQL queries and execution plans.
Three-layer architecture: Frontend, Backend and Database.
- Search interface for programming questions
- Question page showing answers and comments
- Tag browsing and filtering
- Database engine selection toggle for query execution comparison
- Benchmark page for query performance
- REST APIs for search and question retrieval
- Query routing to selected database engine
- Query timing measurement
- Structured responses to frontend
- Vanilla PostgreSQL – baseline database
- Modified PostgreSQL – vectorized query engine
Standard PostgreSQL processes one row at a time (Volcano model). Our system processes batches of rows to reduce function calls and improve CPU usage.
- Add vector tuple structure
- Modify sequential scan to process batches
- Extend aggregation operators for vectors
- Evaluate performance using benchmark queries
Stack Overflow public dataset containing posts (questions and answers), comments, users and tags. The large scale of the dataset allows realistic evaluation of search queries and database performance.
- Functional Stack Overflow–style Q&A platform
- PostgreSQL engine supporting vectorized execution
- Performance comparison between both engines
- Demonstration of database performance optimization
Implemented in frontend/ using React + Vite:
- Home/search page with keyword + optional tag filter
- Question details page with answers
- Tag browse page
- Benchmark comparison page placeholder
- Engine toggle UI (baseline/vectorized)
- Basic navigation and loading/error states
- API wiring to backend routes
Implemented in backend/ using Node.js + Express:
GET /searchGET /question/:idGET /tagsGET /benchmarkGET /health
Each endpoint returns structured JSON with metadata, and relevant endpoints include query-inspector placeholder fields for checkpoint demos.
cd backend && npm install
cd ../frontend && npm installcd backend
cp .env.example .envUpdate DATABASE_URL in backend/.env so it points to your PostgreSQL instance.
cd backend
npm run db:init
npm run db:seedcd backend
npm run devBackend runs at http://localhost:4000.
In a second terminal:
cd frontend
npm run devFrontend runs at http://localhost:5173 and calls backend APIs at http://localhost:4000 by default.
Set VITE_API_BASE_URL before running the frontend if backend is hosted elsewhere.