Skip to content

Getting Started

This guide will help you set up the Nodesify Admin environment on your local machine for development.

Prerequisites

Before you begin, ensure you have the following installed:

  • Node.js: Version 20.12.0 or higher.
  • pnpm: Version 10.0.0 or higher.
  • Docker: Required for running the database (PostgreSQL) and cache (Valkey/Redis).

Installation

  1. Clone the repository:

    bash
    git clone https://github.com/your-org/nodesify-admin.git
    cd nodesify-admin
  2. Install dependencies:

    bash
    pnpm install

Setting up Infrastructure

  1. Start Docker services: We use Docker Compose to manage the PostgreSQL database and Valkey (Redis) cache.

    bash
    cd docker
    # Start services in the background
    docker compose up -d
    • PostgreSQL: Exposed on port 54331
    • Valkey: Exposed on port 63791
  2. Initialize the Database: Run the setup script to generate the Prisma client, apply migrations, and seed default data.

    bash
    cd ../apps/backend-api
    pnpm db:setup
    • This will create the default users (e.g., nodesify, admin) with password 123456.

Running the Application

Return to the root directory to start the development environment.

bash
# Go back to root
cd ../..

# Start both Frontend and Backend
pnpm dev

Common Commands

CommandDescription
pnpm devStarts the full stack (Frontend + Backend).
pnpm dev:eleStarts only the Frontend (apps/web-ele).
pnpm dev:docsStarts the Documentation server (apps/docs).
pnpm buildBuilds all applications for production.
pnpm checkRuns type checking and linting across the monorepo.
pnpm cleanRemoves node_modules and build artifacts.

Default Accounts

The database is seeded with the following accounts (Password: 123456):

  • Super Admin: nodesify
  • Administrator: admin
  • Regular User: jack
  • Finance User: finance_user
  • HR User: hr_user
  • Warehouse User: warehouse_user