The Data Work Landscape is a project that aims to shine a light on the industry of AI data work. This site features our research into the main companies in this industry. To view the site, go to https://dataworklandscape.org.
This project includes a React frontend, FastAPI backend, and PostgreSQL database, all wired together using Docker Compose. Before you begin, ensure you have the following installed on your system:
- Docker
- Docker Compose
- Git (for cloning the repository)
Make sure the backend has a .env file in the ./backend folder with your database credentials:
POSTGRES_USER=your_user
POSTGRES_PASSWORD=your_password
POSTGRES_DB=your_db
POSTGRES_HOST=your_host
POSTGRES_PORT=yourport
sslmode = require (optional)
git clone https://github.com/techequitycollaborative/ai-data-work-landscape.git
cd ai-data-work-landscapeAdd your localhost url path to the CORS configuration in backend/main.py:
# backend/main.py
# CORS so React can access site -- for development
app.add_middleware(
CORSMiddleware,
allow_origins=["http://localhost:5173"],
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)// frontend/Landscape.jsx
fetch('http://localhost:8000/data') // for developmentEnsure frontend/Dockerfile is configured for the development environment.
Initial launch:
docker-compose build --no-cache
docker-compose upTo relaunch after making changes:
docker-compose down --volumes --remove-orphans
docker-compose build --no-cache
docker-compose upThe app code is mounted into the containers for live reload during development.
Node modules in the frontend are preserved with /app/node_modules in compose.yaml.
The application will be available at:
- Frontend: http://localhost:5173
- Backend (FastAPI): http://localhost:8000
- PostgreSQL: localhost:5432
Update compose.yaml to change port numbers.
