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

@tako./resume-builder-prisma

v1.0.2

Published

Prisma schema and types for Resume persistence

Readme

@tako./resume-builder-prisma

Prisma schema and helpers for persisting Resume data (aligned with @tako./resume-builder-core).

Install

npm install @tako./resume-builder-prisma @prisma/client
npm install -D prisma

Adicionar modelos ao seu schema

Para injetar os modelos Resume, Basics, Work, etc. no schema do seu projeto (um único schema com seus modelos + resume-builder):

  1. Instale o pacote (acima).
  2. No diretório raiz do seu projeto, rode:
npx resume-builder-prisma-add

O script detecta seu schema em prisma/schema.prisma, schema.prisma ou a pasta prisma/schema/ (multi-file). Em schema único, os modelos são anexados dentro de um bloco marcado com // @@resume-builder-prisma start / end; em multi-file, é criado prisma/schema/resume-builder.prisma.

  1. Gere o client e rode as migrações como de costume:
npx prisma generate
npx prisma migrate dev

Assim você usa um único schema no projeto e prisma generate / prisma migrate normalmente.

Generate the client (schema separado no pacote)

Point Prisma at this package's schema (from your app root):

npx prisma generate --schema=node_modules/@tako./resume-builder-prisma/schema.prisma

Or use the path helper in code:

import { getSchemaPath } from "@tako./resume-builder-prisma"
// getSchemaPath() returns the absolute path to schema.prisma

Then set DATABASE_URL (e.g. SQLite: file:./dev.db) and run migrations:

npx prisma migrate dev --schema=node_modules/@tako./resume-builder-prisma/schema.prisma

Usage

Use PrismaClient from @prisma/client and the types from this package or core:

import { PrismaClient } from "@prisma/client"
import { validateResume, type Resume } from "@tako./resume-builder-prisma"

const prisma = new PrismaClient()

// Validate payload from API/form, then persist
const result = validateResume({ basics: { name: "Jane", email: "[email protected]" } })
if (!result.success) throw new Error("Invalid resume")

const { basics, work } = result.data
const resume = await prisma.resume.create({
  data: {
    basics: {
      create: {
        name: basics.name,
        email: basics.email,
        label: basics.label,
        phone: basics.phone,
        website: basics.website,
        summary: basics.summary,
        location: basics.location ?? undefined,
        profiles: basics.profiles ?? undefined,
      },
    },
    ...(work?.length
      ? {
          work: {
            create: work.map((w) => ({
              company: w.company,
              position: w.position,
              startDate: w.startDate,
              endDate: w.endDate ?? null,
              summary: w.summary ?? null,
              highlights: w.highlights ?? null,
            })),
          },
        }
      : {}),
  },
  include: { basics: true, work: true },
})

Database

Default schema uses SQLite. To use PostgreSQL, change in schema.prisma (or override in your app):

  • provider = "postgresql"
  • url = env("DATABASE_URL") (e.g. postgresql://user:pass@localhost:5432/db)

API

  • getSchemaPath(): string – path to this package's schema.prisma.
  • Re-exports Resume, Basics, WorkExperience, Education, Skill, Language, Project, Location, Profile, ValidateResult and validateResume from @tako./resume-builder-core.