Skip to main content
Blindly Logo Light

Overview

This guide helps you:
  • Set up the backend (Go + Fiber + GraphQL)
  • Prepare PostgreSQL & Redis locally
  • Run database migrations (Drizzle)
  • Develop the React Native app (Expo)
  • Test, debug, and iterate quickly

Architecture

Understand how backend, frontend, and database work together.

Self-host

Run locally with Docker Compose or deploy on Kubernetes.

Contribute

Follow guidelines to open PRs and build features confidently.

Prerequisites

Ensure you have the following tools installed:
  • Git (latest)
  • Go toolchain (matches services/go.mod toolchain)
  • Node.js 18+ or 20+ (for tooling and Drizzle CLI)
  • Package manager: bun or npm/yarn (repo includes bun.lock)
  • Docker & Docker Compose (recommended for local DB)
  • PostgreSQL 16+ (optional if not using Docker)
  • Redis 7+ (optional if not using Docker)
  • Expo CLI & Expo Go app (for mobile development)
  • A .env file for backend runtime secrets
The backend requires DATABASE_URL and REDIS_URL to run. In the Docker Compose setup, these are set automatically. When running outside Docker, you must set them yourself.

Clone the repo

1
Clone the repository and enter the project root:
git clone https://github.com/MelloB1989/blindly.git
cd blindly
2
Review the project layout:
  • services/ — Go backend
  • db/ — Drizzle schema and migrations
  • docs/ — Documentation site
  • expo/ — React Native app (Expo)

Environment configuration

Create a .env in the project root (blindly/.env) for runtime secrets used by the backend. Examples:
# Database & Cache
DATABASE_URL=postgres://blindly:blindly_password@localhost:5432/blindly?sslmode=disable
REDIS_URL=redis://localhost:6379

# App configuration
ENVIRONMENT=DEV
JWT_SECRET=replace_me
In Docker Compose, DATABASE_URL and REDIS_URL are set in the backend service. Other env vars still need to be provided via .env.

Bring up local infrastructure

The fastest way to get Postgres + Redis + migrations + backend is Docker Compose.
1
From the root (blindly/), run:
docker compose up --build
Or detached:
docker compose up --build -d
2
Verify services:
docker compose ps
curl http://localhost:9000/health
3
If you need to reset local data:
docker compose down -v
docker compose up --build
The migrate job automatically applies Drizzle migrations from db/drizzle/ before the backend starts.

Database migrations (manual run)

If you prefer to run migrations manually (without Docker):
1
Ensure Postgres is running and reachable at the connection in your .env.
2
Install Drizzle CLI tooling in the db/ directory:
cd db
npm install drizzle-kit drizzle-orm pg
3
Set required env for drizzle.config.ts:
export DB_HOST=localhost
export DB_USER=blindly
export DB_PASSWORD=blindly_password
export DB_NAME=blindly
export DB_PORT=5432
export DB_SSL=false
4
Run migrations:
npx drizzle-kit migrate

Run the backend (Go)

1
Enter the backend service directory:
cd services
2
Ensure DATABASE_URL and REDIS_URL are set in your environment or .env.
3
Install dependencies and build:
go mod download
go build -o blindly .
4
Run the server:
./blindly
The server should listen on port 9000.
5
Verify health:
curl http://localhost:9000/health
The backend serves GraphQL for most functionality and HTTP endpoints for health checks, webhooks, and specialized flows.

Frontend (React Native / Expo)

1
Install dependencies:
cd expo
bun install # or npm install / yarn install
2
Configure the app to point to your backend host and GraphQL endpoint (e.g., http://localhost:9000/graphql for local dev). Use your app config or environment strategy to switch between dev and prod.
3
Start the app:
bun run dev # or expo start
4
Open on device:
  • Install Expo Go on iOS/Android
  • Scan the QR to load the app
For production builds:
eas build -p android
eas build -p ios
To distribute quickly in testing, use EAS update and QR (works on iOS & Android).

Testing

  • Backend unit tests:
    cd services
    go test ./...
    
  • API smoke tests:
    • Hit /health
    • Exercise common GraphQL queries/mutations
  • Mobile:
    • Run on device and verify common flows (onboarding, match, chat, reveal)
Consider adding integration tests for GraphQL resolvers and DB interactions. Use a test database and deterministic seeds.

Debugging

  • Add structured logs with context (request IDs, user IDs)
  • Use verbose logging in dev (ENVIRONMENT=DEV)
  • Inspect Postgres with a client (e.g., psql or TablePlus)
  • Monitor Redis keys for sessions and rate-limits
  • Use network proxy tools (e.g., mitmproxy) to inspect mobile requests
If the backend doesn’t start, confirm DATABASE_URL and REDIS_URL are set and reachable. Also verify migrations have been applied.

Linting & Formatting

  • Go formatting:
    cd services
    go fmt ./...
    
  • JS/TS formatting (docs/expo/db tooling):
    bun run fmt # or npm run fmt / yarn fmt
    
  • Recommended: enable pre-commit hooks for formatting and basic checks.

Common Issues

  • Ensure Postgres is running and reachable at the host/port
  • Check credentials and database name
  • If using Docker, confirm port mappings and container health

Development Workflow

1
Create a feature branch:
git checkout -b feat/your-feature
2
Implement backend changes with tests, run go test ./....
3
Update GraphQL schema/resolvers and mobile consumers.
4
Run local stack via Docker Compose and validate end-to-end.
5
Format, lint, and open a PR following contribution guidelines.

Next steps

Self-host Blindly

Deploy locally or in Kubernetes and share with your team.

Contribution Guidelines

Learn how to propose changes, write tests, and land PRs smoothly.