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

@venturialstd/project

v0.0.7

Published

Project Management Module for Venturial - Project Entity Only

Downloads

478

Readme

@venturialstd/project

A NestJS module for managing organizational projects with CRUD operations and organization-specific project management.

📋 Table of Contents


✨ Features

  • 🏢 Project Management: Complete CRUD operations for projects
  • 🏷️ Project Attributes: Support for keys, statuses, tags, and date ranges
  • 📦 Organization Isolation: Each project belongs to a specific organization
  • 🔄 TypeORM Integration: Full database support with TypeORM
  • 📦 Fully Typed: Complete TypeScript support
  • 🎯 Archive Support: Archive and unarchive projects

📦 Installation

npm install @venturialstd/project

Peer Dependencies

{
  "@dataui/crud": "^6.0.0",
  "@dataui/crud-typeorm": "^6.0.0",
  "@nestjs/common": "^11.0.11",
  "@nestjs/core": "^11.0.5",
  "@nestjs/swagger": "^8.0.3",
  "@nestjs/typeorm": "^10.0.0",
  "class-transformer": "^0.5.1",
  "class-validator": "^0.14.1",
  "typeorm": "^0.3.20"
}

🚀 Quick Start

1. Import the Module

import { Module } from '@nestjs/common';
import { ProjectModule } from '@venturialstd/project';

@Module({
  imports: [ProjectModule],
})
export class AppModule {}

2. Use the Services

import { Injectable } from '@nestjs/common';
import { 
  OrganizationProjectService,
  CreateProjectDto,
  OrganizationProject,
} from '@venturialstd/project';

@Injectable()
export class YourService {
  constructor(
    private readonly projectService: OrganizationProjectService,
  ) {}

  async createProject(organizationId: string, name: string) {
    return this.projectService.createProjectForOrganization({
      organizationId,
      name,
      description: 'My new project',
      status: 'active',
    });
  }

  async getProjects(organizationId: string) {
    return this.projectService.getProjectsByOrganization(organizationId);
  }
}

📚 API Reference

Services

OrganizationProjectService

class OrganizationProjectService {
  // Create a new project
  createProjectForOrganization(dto: CreateProjectDto): Promise<OrganizationProject>

  // Update a project
  updateProject(id: string, dto: UpdateProjectDto): Promise<OrganizationProject | null>

  // Get all projects for an organization
  getProjectsByOrganization(
    organizationId: string,
    includeArchived?: boolean
  ): Promise<OrganizationProject[]>

  // Get project by ID
  getProjectById(id: string): Promise<OrganizationProject | null>

  // Get active projects
  getActiveProjectsByOrganization(organizationId: string): Promise<OrganizationProject[]>

  // Archive a project
  archiveProject(id: string): Promise<OrganizationProject | null>

  // Delete a project
  deleteProject(id: string): Promise<void>
}

Entities

OrganizationProject

class OrganizationProject {
  id: string;
  organizationId: string;
  name: string;
  description?: string;
  key?: string;              // Project key/code (e.g., "PROJ", "DEV")
  status?: string;           // e.g., "active", "completed", "archived", "on-hold"
  startDate?: Date;
  endDate?: Date;
  ownerId?: string;          // User who owns/leads the project
  tags?: string[];
  isArchived: boolean;
  createdAt: Date;
  updatedAt: Date;
}

DTOs

CreateProjectDto

class CreateProjectDto {
  organizationId: string;    // Required
  name: string;              // Required
  description?: string;
  key?: string;
  status?: string;
  startDate?: string;        // ISO date string
  endDate?: string;          // ISO date string
  ownerId?: string;
  tags?: string[];
  isArchived?: boolean;
}

UpdateProjectDto

class UpdateProjectDto {
  name?: string;
  description?: string;
  key?: string;
  status?: string;
  startDate?: string;
  endDate?: string;
  ownerId?: string;
  tags?: string[];
  isArchived?: boolean;
}

💻 Examples

Example 1: Create and Configure a Project

@Injectable()
export class ProjectSetupService {
  constructor(
    private readonly projectService: OrganizationProjectService,
  ) {}

  async setupNewProject(organizationId: string, ownerId: string) {
    const project = await this.projectService.createProjectForOrganization({
      organizationId,
      name: 'Q1 2024 Initiative',
      description: 'Strategic goals for Q1 2024',
      key: 'Q1-2024',
      status: 'active',
      startDate: '2024-01-01',
      endDate: '2024-03-31',
      ownerId,
      tags: ['strategic', 'quarterly'],
    });

    return project;
  }
}

Example 2: Get Active Projects

@Injectable()
export class DashboardService {
  constructor(
    private readonly projectService: OrganizationProjectService,
  ) {}

  async getActiveDashboard(organizationId: string) {
    const activeProjects = await this.projectService.getActiveProjectsByOrganization(
      organizationId
    );

    return {
      total: activeProjects.length,
      projects: activeProjects,
    };
  }
}

Example 3: Archive Completed Projects

@Injectable()
export class ProjectMaintenanceService {
  constructor(
    private readonly projectService: OrganizationProjectService,
  ) {}

  async archiveCompletedProjects(organizationId: string) {
    const projects = await this.projectService.getProjectsByOrganization(
      organizationId
    );

    const completedProjects = projects.filter(
      p => p.status === 'completed' && !p.isArchived
    );

    for (const project of completedProjects) {
      await this.projectService.archiveProject(project.id);
    }

    return { archived: completedProjects.length };
  }
}

📄 License

MIT


🤝 Contributing

Contributions welcome! Please read the contributing guidelines before submitting PRs.