Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
d39cd76
add dockerfiles
jmccand Dec 20, 2025
d5f0562
ignore root on pip install
jmccand Dec 20, 2025
dbfd760
use customizable base url
jmccand Dec 23, 2025
e019519
support CORS
jmccand Dec 24, 2025
7658d96
get docker working with env vars
jmccand Dec 24, 2025
d97dbdb
add production env example
williamschen23 Dec 24, 2025
2814497
support running test in docker as well
jmccand Dec 24, 2025
da655be
create profiles
jmccand Dec 24, 2025
48aa023
move nginx config to conf files
jmccand Dec 24, 2025
e14fa9a
improve docs
jmccand Dec 24, 2025
4d85a01
Merge branch 'main' into change-hosting
jmccand Dec 24, 2025
cb18b24
first shot at conversion
jmccand Dec 25, 2025
4f975bb
make initial migration
jmccand Dec 25, 2025
d48d2c5
remove old migrations folder
jmccand Dec 25, 2025
3659802
fix bugs caused by fastapi migration
jmccand Dec 25, 2025
7dde149
remove unnecessary backend serving frontend
jmccand Dec 25, 2025
6ec00bc
add composite indices
jmccand Dec 25, 2025
3ff1fe6
reduce cache time to 5 seconds
jmccand Dec 25, 2025
b205602
include API_KEY in settings
jmccand Dec 25, 2025
c9a2a0f
add cache invalidation
jmccand Dec 25, 2025
b353ab3
add missing import
jmccand Dec 25, 2025
10d7948
support cache invalidation
jmccand Dec 25, 2025
7ca602d
update locations and driver assignments in parallel
jmccand Dec 26, 2025
28464a4
update system requirements
williamschen23 Dec 26, 2025
10f4e1b
update test version
williamschen23 Dec 26, 2025
e1c7314
test server as well...
williamschen23 Dec 26, 2025
9716de6
update versions
jmccand Dec 26, 2025
d90e6b6
use uvicorn for deployment
jmccand Dec 26, 2025
6c4bdfd
add requests to requirements
jmccand Dec 26, 2025
49702da
merge change-hosting
jmccand Dec 26, 2025
427be45
remove Procfile
jmccand Dec 26, 2025
6fd6c51
refactor frontend into pages
jmccand Dec 30, 2025
9aaceee
rename frontend and backend
jmccand Dec 30, 2025
5ef8f2d
update with server->backend and client->frontend
jmccand Dec 30, 2025
7836102
move config to backend
jmccand Dec 31, 2025
5303bde
move config files to backend/
jmccand Dec 31, 2025
ce3003c
remove locations (stray)
jmccand Dec 31, 2025
797a888
containerize frontend, backend, shared
jmccand Dec 31, 2025
63d59ef
fix file paths
jmccand Dec 31, 2025
c13fe38
run build-client in frontend
jmccand Jan 10, 2026
4131b60
fix output directory
jmccand Jan 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Git
.git
.gitignore
.github

# Python
__pycache__
*.py[cod]
*$py.class
*.so
.Python
env/
venv/
ENV/
.venv
*.egg-info/
.eggs/
dist/
build/
.pytest_cache/
.python-version

# Node
node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.npm
.yarn
frontend/node_modules/
frontend/dist/
frontend/.vite/
test-client/node_modules/
test-client/dist/

# Environment
.env
.env.local
.env.*.local
.flaskenv

# IDE
.vscode/
.idea/
*.swp
*.swo
*~
.DS_Store

# Logs
*.log
logs/

# Database
*.db
*.sqlite
*.sqlite3
instance/

# Testing
.coverage
htmlcov/
.tox/

# Documentation
*.md
!README.md

# Misc
*.bak
*.tmp
.yamllint
62 changes: 62 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# =============================================================================
# SHUBBLE ENVIRONMENT CONFIGURATION
# =============================================================================
# Copy this file to .env and update with your values

# =============================================================================
# SERVICE PORTS (Docker)
# =============================================================================
# Configure which ports services are exposed on the host machine
FRONTEND_PORT=3000
BACKEND_PORT=8000
POSTGRES_PORT=5432
REDIS_PORT=6379
TEST_FRONTEND_PORT=5174
TEST_BACKEND_PORT=4000

# =============================================================================
# SERVICE URLS
# =============================================================================
# Configure URLs for all services
# Format: http://host:port (do not include trailing slash)

# Main application URLs
FRONTEND_URL=http://localhost:3000
VITE_FRONTEND_URL=http://localhost:3000
VITE_BACKEND_URL=http://localhost:8000

# Test/Mock service URLs (for development/testing)
TEST_FRONTEND_URL=http://localhost:5174
VITE_TEST_FRONTEND_URL=http://localhost:5174
VITE_TEST_BACKEND_URL=http://localhost:4000

# =============================================================================
# DATABASE
# =============================================================================
# PostgreSQL credentials
POSTGRES_DB=shubble
POSTGRES_USER=shubble
POSTGRES_PASSWORD=shubble

# PostgreSQL connection string
DATABASE_URL=postgresql://shubble:shubble@localhost:5432/shubble

# =============================================================================
# REDIS CACHE
# =============================================================================
# Redis connection string
REDIS_URL=redis://localhost:6379/0

# =============================================================================
# FASTAPI CONFIGURATION
# =============================================================================
ENV=development
DEBUG=true
LOG_LEVEL=info

# =============================================================================
# SAMSARA API (Optional - for production)
# =============================================================================
# Leave empty to use Mock Samsara API (test-server) in development
API_KEY=
SAMSARA_SECRET_BASE64=
27 changes: 27 additions & 0 deletions .env.prod.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# postgres
POSTGRES_DB=shubble
POSTGRES_USER=shubble
POSTGRES_PASSWORD=shubble
POSTGRES_PORT=5432

# python env variable
DATABASE_URL=postgresql://shubble:shubble@postgres:5432/shubble
DEBUG=false
LOG_LEVEL=info

# Backend Docker
FRONTEND_URL=http://localhost:3000
BACKEND_PORT=8000

# Secrets
API_KEY=
SAMSARA_SECRET=

# redis
REDIS_PORT=6379
REDIS_URL=redis://redis:6379/0

# Frontend Docker
FRONTEND_PORT=3000
# Vite
VITE_BACKEND_URL=http://localhost:8000
2 changes: 0 additions & 2 deletions .flaskenv

This file was deleted.

2 changes: 2 additions & 0 deletions .github/workflows/build-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ jobs:
node-version: '22'

- name: Install dependencies
working-directory: frontend
run: npm install

- name: Run build
working-directory: frontend
run: npm run build
4 changes: 2 additions & 2 deletions .github/workflows/schedule-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:
pull_request:
paths:
- 'data/schedule.json'
- 'shared/schedule.json'

jobs:
validate-schedule:
Expand Down Expand Up @@ -50,4 +50,4 @@ jobs:
else
"✅ Validation Passed: No duplicate bus schedules found"
end
' data/schedule.json
' shared/schedule.json
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

__pycache__/
**__pycache__/
node_modules/
.env
client/dist
frontend/dist
.DS_Store

.vscode/
Expand Down
1 change: 0 additions & 1 deletion .python-version

This file was deleted.

Loading