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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@mashoor-tech/core-prisma

v1.1.5

Published

Shared Prisma schemas and clients for Mashoor microservices

Readme

@mashoor/core-prisma

Shared Prisma schemas and clients for Mashoor microservices architecture.


🚀 Installation

npm install @mashoor/core-prisma

⚡ Quick Start

1. Set Environment Variables

You can use a .env file (recommended) or set variables in your shell:

DATABASE_URL="postgresql://username:password@localhost:5432/mashoor"

2. Initialize Databases

mashoor-core-prisma init

🛠️ Common CLI Commands

All commands are run directly with mashoor-core-prisma. Replace COMMAND with one of the options below:

| Command | Description | |-----------|------------------------------------| | check | Check environment and status | | init | Initialize database and migrations | | migrate | Run all migrations | | generate | Generate Prisma client | | studio | Open Prisma Studio | | reset | Reset database (dev only!) | | push | Push schema changes | | format | Format Prisma schema | | deploy | Deploy migrations (production) | | status | Check migration status | | help | Show help message |

Example:

mashoor-core-prisma migrate

🌱 Usage Examples

Usage

import { PrismaClient } from '@mashoor-tech/core-prisma';

async function main() {
  const client = new PrismaClient();
  const users = await client.user.findMany();
  console.log(users);
}
main();

🧑‍💻 Development

Prerequisites

  • Node.js 18+
  • A PostgreSQL database

CLI Usage Only

All database and schema operations are performed using the CLI:

mashoor-core-prisma generate   # Generate Prisma client
mashoor-core-prisma migrate    # Run all migrations
mashoor-core-prisma deploy     # Deploy migrations (production)
mashoor-core-prisma status     # Check migration status
mashoor-core-prisma reset      # Reset database (dev only!)
mashoor-core-prisma push       # Push schema (no migration)
mashoor-core-prisma studio     # Open Prisma Studio
mashoor-core-prisma format     # Format Prisma schema
mashoor-core-prisma check      # Check environment setup
mashoor-core-prisma init       # Initialize database and migrations

🏛️ Architecture

This package contains the main Prisma schema and generates a Prisma client accessible via generated/index.js. You can use this client for all your database operations.


📄 License

MIT