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 NaikeXTheShrikscd nayki-backend
cp .env.example .env
make dev # or: docker compose up --buildPrefer 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 8000Once 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.
| Variable | What it does |
|---|---|
| APP_ENV | local or production. |
| API_PORT | Port for the FastAPI server. Default 8000. |
| DATABASE_URL | Async Postgres URL with PostGIS. |
| SYNC_DATABASE_URL | Sync Postgres URL, used by Alembic migrations. |
| REDIS_URL | Redis connection string. |
| DEV_AUTH_ENABLED | Mock auth bypass. Local development only. |
| FIREBASE_PROJECT_ID, JWT_ISSUER | Firebase token validation. |
| H3_RESOLUTION | H3 grid resolution. Default 9. |
| LOG_LEVEL | info, 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: pytestAndroid 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
unknownuntil data is added. - The Android package is still
com.example.naykiand must be renamed before any release. - Nayki is not an emergency service. In an emergency, call your local emergency number.