Requirements

What the server needs, and how to switch from SQLite to PostgreSQL.

Software

Version Why
Node.js 22.18 or newer Next.js 16; the seed and the unit tests import TypeScript directly
npm 10+ installs the packages
Python 3.10+ (optional) only for scripts/e2e_api.py, scripts/check_pages.py and scripts/gen_images.py

The stack: Next.js 16 (App Router), React 19, next-intl 4 (Arabic and English), Tailwind CSS 4, Prisma 6, zod 4, jose (signed sessions), lucide-react icons and marked (this documentation). There is no chart library: charts are small SVG components in src/components/ui/charts.tsx.

Server

A small virtual server is enough for one gym: 1 vCPU, 1 GB RAM, 5 GB disk. The sample database is about 7 MB (30 members × 90 days). Progress photos are the main growth: plan around 1 MB per photo.

Database

SQLite is the default: one file, nothing to install, fine for a gym with hundreds of members. For several app servers or heavy use, switch to PostgreSQL:

  1. In prisma/schema.prisma change provider = "sqlite" to provider = "postgresql".
  2. Set DATABASE_URL="postgresql://user:password@host:5432/liyaqa".
  3. Run npx prisma db push and npm run db:seed.

No code changes are needed: dates are stored as YYYY-MM-DD text and money as integers on both databases.

Several servers

Two things are kept in memory per process: the rate limiter (src/lib/api.ts) and nothing else. With more than one app server, put the limiter in a shared store (Redis) and keep storage/ on shared disk or object storage.

Browsers

The current versions of Chrome, Edge, Safari and Firefox, on phones and desktops. The dashboards are designed for phones first: members log sets between exercises.