Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/alexjohntomy/you-eye-sea/llms.txt

Use this file to discover all available pages before exploring further.

YouEyeSea uses PostgreSQL as its database and Prisma as the ORM. Before you can run the app or seed grade data, you need a running Postgres instance and the correct environment variables in place.

Prerequisites

  • PostgreSQL installed and running locally (version 14 or later recommended)
  • Node.js 18 or later with npm
  • The repository cloned and dependencies installed (npm install)

Set the DATABASE_URL

Create a .env file in the project root (or export the variable in your shell) with your Postgres connection string:
DATABASE_URL="postgresql://USER:PASSWORD@HOST:PORT/DATABASE"
Replace the placeholders with your actual values. For a default local Postgres installation, this is often:
DATABASE_URL="postgresql://postgres:password@localhost:5432/youeyesea"
prisma.config.ts reads DATABASE_URL at runtime using dotenv/config, so a .env file in the project root is the simplest way to set it. Add .env to your .gitignore to avoid committing credentials.

Generate the Prisma client

Running npm install automatically triggers prisma generate via the postinstall script. If you ever need to regenerate the client manually — for example after editing prisma/schema.prisma — run:
npx prisma generate
This outputs the generated client to src/generated/prisma/.

Apply migrations

The prisma/migrations/ directory contains the migration history for the project. To apply all pending migrations to your database, run:
npx prisma migrate deploy
prisma migrate deploy applies migrations in order and is intended for production-like environments. It will not prompt you for confirmation before making schema changes.
For local development you can also use db push, which syncs the schema without creating migration files:
npx prisma db push
db push is faster for rapid iteration on schema changes, but does not produce a migration history. Use migrate deploy when you want your local environment to match the committed migration state exactly.

Prisma Accelerate in production

The app uses @prisma/extension-accelerate for connection pooling when deployed to Vercel. Accelerate is applied in lib/prisma.ts:
import { PrismaClient } from "../src/generated/prisma/client";
import { withAccelerate } from "@prisma/extension-accelerate";

export const prisma = new PrismaClient({
  accelerateUrl: process.env.DATABASE_URL!,
}).$extends(withAccelerate());
Locally, DATABASE_URL is a standard Postgres connection string and Accelerate falls back to a direct connection. In production on Vercel, set DATABASE_URL to a Prisma Accelerate connection string (beginning with prisma://) to enable pooling. See the Prisma Accelerate docs for setup instructions.

Verify the connection

After applying migrations, you can open Prisma Studio to confirm the database schema looks correct:
npx prisma studio
This opens an interactive browser UI at http://localhost:5555 where you can inspect tables and rows.

Next steps

With your database ready, load grade data using the seed script:

Data ingestion

Learn how to download UIC CSVs and populate your database with the seed script.

Build docs developers (and LLMs) love