Skip to content

Intuitive map for BT (Base Transceiver) stations. Extended version of BTSearch.

License

Notifications You must be signed in to change notification settings

sakilabs/openbts

Repository files navigation

OpenBTS banner

OpenBTS

OpenBTS is an improved map of BTSearch that includes aggregated data of Polish BT stations & UKE permits and radiolines.

Features

  • View stations on simple to use map
  • See UKE (Urząd Komunikacji Elektronicznej) data in very simple view which is updated every 30 days
  • Very powerful & public REST API
  • Create private or public lists with your favorite stations
  • Fast & beautiful interface

and much more...

Getting started

Prerequisites

  • Bun (v1.0 or later)
  • Docker & Docker Compose (for the database)

1. Installation

Install dependencies from the root directory. Bun handles the pnpm workspace structure automatically.

bun install

Note: You may see a warning about the engines field preferring pnpm. You can safely ignore this when using Bun.

2. Database Setup

The server requires PostgreSQL and Redis. You can spin these up using the provided Docker Compose file.

# Start only the database and redis services
docker-compose up -d db redis

This docker compose file provides custom PostgreSQL build with PostGIS already installed since our server requires that.

Ensure the database is running before starting the server.

Database Migrations

Before running the server, apply the database schema:

cd packages/drizzle
export DATABASE_URL="postgres://user:password@localhost:5432/openbts"
bun run db:migrate

3. Server Setup (apps/server)

Configuration

  1. Navigate to the server directory:
    cd apps/server
  2. Copy the example environment file:
    cp .env.example .env
  3. Edit .env to match your local Docker setup:
    PORT=3030
    DATABASE_URL="postgres://user:password@localhost:5432/openbts"
    REDIS_URL="redis://localhost:6379"
    BETTER_AUTH_SECRET="your-generated-secret"

Running in Development

Start the server in watch mode:

bun run dev

The server will run on http://localhost:3030.

Building & Running Production

# Build the TypeScript code
bun run build

# Start the compiled server
bun run start

4. Client Setup (apps/client)

Configuration

The client uses environment variables to configure the API endpoint.

  1. Navigate to the client directory:
    cd apps/client
  2. Copy the example environment file:
    cp .env.example .env
  3. (Optional) Edit .env if your server is running on a different port:
    VITE_API_URL=http://localhost:3030/api/v1

Running in Development

Start the dev server:

bun run dev

Access the client at the URL shown in the terminal (usually http://localhost:5173).

Building & Previewing

To test the production build locally:

# Build the application
bun run build

# Preview the production build
bun run preview

Stack

About

Intuitive map for BT (Base Transceiver) stations. Extended version of BTSearch.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages