npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

fitcheck-database-lib

v1.1.5

Published

Here is a **step-by-step guide to set up database** with **Prisma**, and a **Local Database** for easy development.

Readme

FitCheck Database

Here is a step-by-step guide to set up database with Prisma, and a Local Database for easy development.


1. Install Prerequisites

  • Install VSCode (Version Latest)
  • Install Node.js (Version ~22.14.0)
  • Install Git
  • Install Git Bash (optional, for better terminal experience)

2. Clone The repo using SSH

Setup all prerequisites prior to clone the repo and use the command:

	git clone [email protected]:Helix-Capital/fitcheck40-db.git
	cd fitcheck40-db
	# setup node-modules by running this comment at root folder
	npm install

3. Setup local PostgreSQL Database

- **Install [PostgreSQL](https://www.postgresql.org/download/) (Version Latest)**

Run the following commands in the CLI or pgadmin portal

	CREATE ROLE fitcheckdevad WITH
		LOGIN
		SUPERUSER
		CREATEDB
		CREATEROLE
		INHERIT
		REPLICATION
		BYPASSRLS
		CONNECTION LIMIT -1
		PASSWORD 'xxxxxx';

	CREATE DATABASE fitcheckdev
		WITH
		OWNER = fitcheckdevad
		ENCODING = 'UTF8'
		LOCALE_PROVIDER = 'libc'
		CONNECTION LIMIT = -1
		IS_TEMPLATE = False;

4. Turn database schema to Prisma Schema

Set the DATABASE_URL in the .env file to point to fitcheckdev database.

	DATABASE_URL="postgresql://fitcheckdevad:your_unique_password@localhost:5432/fitcheckdev?schema=public&sslmode=disable"

Setup prisma schema for the database and migrate to database.

	npx prisma db push
	# create prisma client
    npx prisma generate
	npx prisma migrate dev

5. Schema updates and modifications

🛠 Step 0: Dont's:

  • [ ] Do not modify the schema directly on postgres

  • [ ] Do not modify the schema through typescript either.

  • [Later] we will use regular user role for all application transactions not admin.

  • [ ] Pull the latest from GitHub repo prior to modification.

✅ Step 1: Update schema.prisma

Add or change your model in prisma/schema.prisma:

For example, to add a new Post table:

model Post {
  id        Int      @id @default(autoincrement())
  title     String
  content   String?
  published Boolean  @default(false)
  createdAt DateTime @default(now())
}

Or to modify an existing model:

 model User {
   id    Int    @id @default(autoincrement())
   email String @unique
+  name  String?
 }

✅ Step 2: Create a Migration

Generate a migration based on the change:

	npx prisma migrate dev --name add-post-model

This will: - Generate a new folder in prisma/migrations - Apply the changes to your local database - Update Prisma Client (auto-generated code for querying)

✅ Step 3: Use the Updated Prisma Client After migration, Prisma regenerates the client so you can now use the updated model:

const newPost = await prisma.post.create({
	data: {
		title: "Hello World",
		published: true,
	},
});

No need to manually regenerate Prisma Client — migrate dev does that for you.

🧪 Step 4: Test the New Table Use npx prisma studio to inspect your database via a GUI.