Skip to content

mahi01agarwal/Wikievol

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WikiEvolution

WikiEvolution is an interactive web application that analyses and visualises the evolution of Wikipedia articles within a WikiProject over time (quality, importance, references, media, page length, and other structural metrics).

The frontend is built with React + Vite; the backend is a Flask API. The tool is deployed on Wikimedia Toolforge.

Project structure

client/   React + Vite single-page app (the dashboard UI)
server/   Flask API + data-processing scripts
  app.py                          API routes, also serves the built SPA
  process_wikiproject_latest.py   builds the "latest revision" dataset
  process_wikiproject_monthly.py  builds the monthly time-series dataset
  ssh/                            (WIP) MySQL ingestion over an SSH tunnel

Prerequisites

  • Node.js and npm (frontend)
  • Python 3 and pip (backend)

Getting started

1. Clone

git clone https://gitlab.wikimedia.org/repos/research/WikiEvolution.git
cd WikiEvolution

2. Backend

cd server
python -m venv WikiEnv && source WikiEnv/bin/activate
pip install -r requirements.txt
python app.py            # runs on http://localhost:5000

if in case this doesnt works another way which worked for me is:

cd server

rm -rf WikiEnv  
uv python install 3.12
uv venv -p 3.12 WikiEnv
source WikiEnv/bin/activate

# to verify   :
# which python  
# python --version
# python -c "import sys; print(sys.executable)"

uv pip install -r requirements.txt

cp .env.example .env 
# and fill the info in the .env 

python app.py

Debug mode is off by default. For local development you can enable it with:

FLASK_DEBUG=true python app.py

3. Frontend

cd client
npm install
cp .env.example .env     # point the app at your local backend
npm run dev              # runs on http://localhost:5173

The backend URL is configured via VITE_API_BASE_URL (see client/.env.example). In production it is left empty, because Flask serves the built SPA from the same origin as the API.

Data source

The dashboard reads published datasets from https://analytics.wikimedia.org/published/datasets/outreachy-round-28/. Replacing this static snapshot with a refreshable database-backed pipeline is tracked as ongoing work (see the project's Phabricator tasks).

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors