Adds a 2.99 EUR/week plan with a 3-day free trial alongside the existing monthly and yearly subscriptions. Backend: weekly_pro joins the supported subscription products, the available product list and the Discord sales label. No schema change -- weekly Pro grants the same 100 credits per calendar month as monthly Pro, so no column is needed to tell the two apart. Paywall: weekly and yearly are the two prominent cards, monthly is a selectable row below them. Weekly is preselected. Cards only render when their RevenueCat package exists, and the selection falls back to a visible plan so the CTA can never buy a product that is not loaded. Trial eligibility: checkTrialOrIntroductoryPriceEligibility now gates the trial copy. Apple grants one intro offer per subscription group, so with two trial products a second free-trial promise would otherwise be shown to users who get charged immediately. Anything but a clear ELIGIBLE is treated as no trial, as the RevenueCat SDK recommends. Analytics: trial_started previously fired on every subscription purchase, including monthly which never had a trial. It now fires only for products that actually carry one. paywall_viewed distinguishes trial_enabled from trial_eligible and reports selected_plan. Tests: 9 new cases covering the entitlement path, credits, renewal period and trial allowance. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
GreenLens
Expo app for plant scanning, care tracking, billing, and profile management, backed by an Express API.
App development
npm install
npm run start
Backend development
The backend now targets PostgreSQL instead of SQLite.
cd server
npm install
npm run start
Required backend environment:
DATABASE_URLorPOSTGRES_HOST+POSTGRES_PORT+POSTGRES_DB+POSTGRES_USER+POSTGRES_PASSWORDJWT_SECRET
Optional integrations:
OPENAI_API_KEYREVENUECAT_WEBHOOK_SECRETPLANT_IMPORT_ADMIN_KEYMINIO_ENDPOINTMINIO_ACCESS_KEYMINIO_SECRET_KEYMINIO_BUCKETMINIO_PUBLIC_URL
Docker Compose
For backend-only local infrastructure use docker-compose.yml.
For the production-style self-hosted stack with landing page, API, PostgreSQL, and MinIO behind an external reverse proxy use greenlns-landing/docker-compose.yml.
Server deployment
Run the commands in this section from the repo root on your server:
cd /path/to/GreenLns
Example:
cd /var/www/GreenLns
1. Prepare environment
cp .env.example .env
Then fill at least:
SITE_DOMAINSITE_URLPOSTGRES_PASSWORDJWT_SECRETMINIO_SECRET_KEY- optional:
OPENAI_API_KEY,REVENUECAT_*
2. Start the full production stack
docker compose up --build -d
When you run this from the repo root, Docker Compose uses docker-compose.yml.
What gets built:
landingis built from./greenlns-landing/Dockerfileapiis built from./server/Dockerfile
What is not built locally, but pulled as ready-made images:
postgresusespostgres:16-alpineminiousesminio/minio:latest
So yes: docker compose up --build -d builds the landing page container and the API container, and it starts PostgreSQL as a container. PostgreSQL is not "built" from your code, it is started from the official Postgres image.
This starts:
landingapipostgresminio
Host ports for an external reverse proxy:
3000->landing3003->api9000->minioS3 API9001->minioconsole
3. Useful server commands
Check running containers:
docker compose ps
Follow all logs:
docker compose logs -f
Follow only API logs:
docker compose logs -f api
Follow only landing logs:
docker compose logs -f landing
Restart one service:
docker compose restart api
docker compose restart landing
Rebuild and restart after code changes:
docker compose up --build -d
Stop the stack:
docker compose down
Stop the stack and remove volumes:
docker compose down -v
4. Health checks after deploy
curl https://greenlenspro.com/health
curl https://greenlenspro.com/
curl https://greenlenspro.com/sitemap.xml
5. Production compose file location
If you want to run the same stack from inside the landing directory instead:
cd greenlns-landing
docker compose up --build -d
In that case Docker Compose uses greenlns-landing/docker-compose.yml.
There, too:
landingis built fromgreenlns-landing/Dockerfileapiis built from../server/Dockerfilepostgresandminioare started from official images
iOS TestFlight
npx eas-cli build:version:set -p ios
npx eas-cli build -p ios --profile production
npx eas-cli submit -p ios --latest