https://github.com/timothyf/baseball-data-lab-web
Web application that uses baseball-data-lab project
https://github.com/timothyf/baseball-data-lab-web
Last synced: 3 months ago
JSON representation
Web application that uses baseball-data-lab project
- Host: GitHub
- URL: https://github.com/timothyf/baseball-data-lab-web
- Owner: timothyf
- Created: 2025-08-18T05:06:55.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-09-09T02:34:26.000Z (9 months ago)
- Last Synced: 2025-09-09T02:54:39.176Z (9 months ago)
- Language: Vue
- Size: 3.48 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# baseball-data-lab-web
A Django based web interface for exploring data from the `baseball-data-lab` library.
## Development
1. Install Python dependencies:
```bash
pip install -r backend/requirements.txt
```
2. Install frontend dependencies:
```bash
cd frontend
npm install
cd ..
```
3. Run database migrations:
```bash
cd backend
python manage.py migrate
cd ..
```
4. Start the frontend and backend development servers together:
```bash
foreman start -j Procfile.dev
```
5. Visit `http://localhost:8000/` to see the home page displaying information from `baseball-data-lab`.
### Environment Variables
Configuration values are read from environment variables. Copy `.env.example` to `.env` and adjust as needed.
| Variable | Description |
| --- | --- |
| `SECRET_KEY` | Django secret key |
| `POSTGRES_DB` | Database name |
| `POSTGRES_USER` | Database user |
| `POSTGRES_PASSWORD` | Database password |
| `POSTGRES_HOST` | Database host |
| `POSTGRES_PORT` | Database port |
This project is a minimal scaffold and is intended to grow with additional views and data presentations over time.
## Frontend
Vue components live in the `frontend/` directory and are bundled with Vite into
`backend/static/frontend/main.js` for production. During development you can run:
```bash
npm run dev
```
to start a development server with hot-reloading. When `DEBUG` is enabled,
the Django template pulls scripts from `http://localhost:5173` automatically.
In production, the prebuilt asset is referenced using the `{% static %}` tag.