Docs

Run it yourself.

Everything here comes from the repository README and files. If a step is wrong, open an issue.

Backend

Start the API.

You need Docker. The compose file starts Postgres with PostGIS, Redis and the FastAPI app together.

git clone https://github.com/THE-SHRIKS/NaikeXTheShriks.git
cd NaikeXTheShriks
cd nayki-backend
cp .env.example .env
make dev            # or: docker compose up --build

Prefer running Python natively? Start only the databases in Docker, then run the server yourself.

make db-up           # Postgres/PostGIS and Redis in Docker
make migrate         # Alembic migrations
uvicorn app.main:app --reload --port 8000

Once it is up, interactive API docs are at http://localhost:8000/docs, and the health check is athttp://localhost:8000/health.

Configuration

Environment variables.

Copy .env.example to .env. Never commit real keys.

VariableWhat it does
APP_ENVlocal or production.
API_PORTPort for the FastAPI server. Default 8000.
DATABASE_URLAsync Postgres URL with PostGIS.
SYNC_DATABASE_URLSync Postgres URL, used by Alembic migrations.
REDIS_URLRedis connection string.
DEV_AUTH_ENABLEDMock auth bypass. Local development only.
FIREBASE_PROJECT_ID, JWT_ISSUERFirebase token validation.
H3_RESOLUTIONH3 grid resolution. Default 9.
LOG_LEVELinfo, debug or error.

Tests

Run the checks.

The backend has an automated test suite covering the health check, auth rules, spatial boundaries and the safety engine.

make test             # or: pytest

Android app

Open it in Android Studio.

The app is a Gradle project at the repository root. Open the folder in Android Studio, let Gradle sync, and run the app module on an emulator or device.

The app runs on sample data today. It does not connect to the backend yet.

Known limitations

Read before you rely on it.

  • The Android app and the backend are not connected. The app shows sample data.
  • No city has real safety data behind it. Risk levels will be unknown until data is added.
  • The Android package is still com.example.nayki and must be renamed before any release.
  • Nayki is not an emergency service. In an emergency, call your local emergency number.