Bus Rapid Transit information app for the Dongdok–Talat Sao corridor in Vientiane, Laos.
- Backend: Go (net/http, pgx)
- Frontend: Next.js, React, TypeScript, Tailwind CSS
- Database: PostgreSQL 16
# Install frontend dependencies (first time only)
cd frontend && npm install && cd ..
# Start everything (database, migrations, backend, frontend)
./dev.sh- Backend: http://localhost:8080
- Frontend: http://localhost:3000
# Start database
docker compose up -d db
# Run migrations
cd backend && go run cmd/migrate/main.go up
# Start backend
cd backend && go run cmd/server/main.go
# Start frontend (in another terminal)
cd frontend && npm run dev| Method | Path | Description |
|---|---|---|
| GET | /api/health |
Health check |
| GET | /api/stations |
List all stations |
| GET | /api/stations/{id} |
Get station by ID |
| GET | /api/schedules |
List all schedules |
├── backend/
│ ├── cmd/
│ │ ├── server/ Entry point
│ │ └── migrate/ Migration runner
│ ├── internal/
│ │ ├── config/ Environment config
│ │ ├── database/ Connection pool
│ │ ├── handler/ HTTP handlers
│ │ ├── model/ Data structs
│ │ └── repository/ Database queries
│ └── migrations/ SQL migrations
├── frontend/
│ ├── app/ Next.js pages
│ ├── components/ React components
│ └── lib/ API client & types
├── docker-compose.yml PostgreSQL
├── dev.sh Start everything
└── Makefile Individual commands
Copy .env.example to .env and adjust as needed:
DATABASE_URL=postgres://brt:brt_dev_password@localhost:5435/brt_vientiane?sslmode=disable
BACKEND_PORT=8080
NEXT_PUBLIC_API_URL=http://localhost:8080