Skip to content

🚀 1. Getting Started

This guide will help you set up TaskNexus on your local machine for development.

🛠️ Prerequisites

Before you begin, ensure you have the following installed:

  1. Node.js: Version 18.x or higher is required.
    • Verify with: node -v
  2. npm: Comes bundled with Node.js.
    • Verify with: npm -v
  3. Git: For version control.
  4. Database: A PostgreSQL database (Local or Cloud).
    • Recommendation: Use Supabase or Neon for free tiered cloud instances, or a local Docker container.
  5. Code Editor: VS Code is recommended (with Prisma extension).

📥 Installation

  1. Clone the Repository

    git clone https://github.com/CurioNative/TN.git
    cd TaskNexus
    

  2. Install Dependencies We use standard npm for package management.

    npm install
    # or for a clean install based on lockfile:
    npm ci
    

🔑 Environment Configuration

The application relies on several environment variables for database connections, AI services, and security.

  1. Create a .env file in the root directory.
  2. Copy the following template:
# ------------------------------
# DATABASE
# ------------------------------
# Connection string for Prisma
# Format: postgresql://USER:PASSWORD@HOST:PORT/DATABASE?schema=public
DATABASE_URL="postgresql://postgres:password@localhost:5432/tasknexus"

# ------------------------------
# AI SERVICES (LLM Providers)
# ------------------------------
# Primary Provider (Required for optimal performance)
GEMINI_API_KEY="your_google_gemini_api_key_here"

# Fallback Providers (Optional but recommended for resilience)
# Used if Gemini hits rate limits (429) or is down
GROQ_API_KEY="your_groq_api_key_here"
MISTRAL_API_KEY="your_mistral_api_key_here"

# ------------------------------
# SECURITY & AUTH
# ------------------------------
# Secret key for signing sessions (if applicable) or other encryption
SESSION_SECRET="complex_random_string_at_least_32_chars"

# ------------------------------
# NODE CONFIG
# ------------------------------
# Use "development" locally, "production" on deployment
NODE_ENV="development"

Obtaining API Keys

💾 Database Setup

TaskNexus uses Prisma ORM to manage the database schema.

  1. Generate the Prisma Client: This creates the type-safe client based on your schema.

    npx prisma generate
    

  2. Push Schema to DB: This creates the tables in your database without needing migration files (great for dev).

    npx prisma db push
    

  3. Seed Data (Optional): If a prisma/seed.ts or scripts/seed.js exists, you can populate initial data.

    npx prisma db seed
    

🏃 Running the App

Start the development server:

npm run dev
  • Open http://localhost:3000 in your browser.
  • Login with default credentials (if seeded) or sign up a new user.

🔄 Common Commands Cheat Sheet

Command Description
npm run dev Starts dev server (hot reload enabled).
npm run build Builds the app for production.
npm start Starts the production server (after build).
npx prisma studio Opens a web GUI to view/edit database records.
npx prisma db push Syncs schema changes to the DB.

Next: System Architecture ➡️